private void initializePipeLine() { fcMapper = new FilterConfigurationMapper(); DefaultFilters.setMappings(fcMapper, false, true); fcMapper.setCustomConfigurationsDirectory(configData.filterConfigurationDirectory); fcMapper.updateCustomConfigurations(); context = new ExecutionContext(); driver = new PipelineDriver(); driver.setFilterConfigurationMapper(fcMapper); // driver.setRootDirectories(new File("bin").getAbsolutePath(), new // File("bin").getAbsolutePath()); driver.setRootDirectories(new File("").getAbsolutePath(), new File("").getAbsolutePath()); driver.setExecutionContext(context); }
private void addRawDocumentsIntoPipeline(LocaleId locale) { String.format("adding RawDocuments (locale: [%s]) to pipeline", locale); for (L10nFile f : project.getFiles()) { RawDocument rd = null; if (!project.createTM) { rd = new RawDocument(f.getURI(), f.getEncoding(), project.sourceLocale, locale); } else { rd = new RawDocument(f.getURI(locale), f.getEncoding(locale), locale, locale); } rd.setFilterConfigId(f.getFilterConfigurationId()); URI targetUri; if (!project.createTM) targetUri = new File(f.getLocalXliffPath(locale)).toURI(); else { targetUri = new File(f.getLocalXliffPath_SourceWithLocaleCodeBeforeXliffExtension(locale)).toURI(); } driver.addBatchItem(rd, targetUri, f.getEncoding(locale)); projetLogger.debug( String.format( "[%s] added to the pipeline driver (target uri: [%s])", f.getURI(), targetUri.toString())); } }
private void addSaveXliffStep() { // adding step to write .xlf file FilterEventsWriterStep fewStep = new FilterEventsWriterStep(); XLIFFWriterParameters paramsXliff; XLIFFWriter writer = new XLIFFWriter(); fewStep.setFilterWriter(writer); paramsXliff = (XLIFFWriterParameters) writer.getParameters(); paramsXliff.setPlaceholderMode(true); // paramsXliff.setCopySource(extOptCopy); // paramsXliff.setIncludeAltTrans(extOptAltTrans); // paramsXliff.setIncludeCodeAttrs(extOptCodeAttrs); // OfewStep.setDocumentRoots(baseDir.getAbsolutePath()); driver.addStep(fewStep); }
private void addInvestigateTextUnitStep() { InvestigateTextUnitStep itus = new InvestigateTextUnitStep(); driver.addStep(itus); Helper.LogAddStep(itus); }
private void addTextUnitLoggerStep() { TextUnitLogger tul = new TextUnitLogger(); driver.addStep(tul); Helper.LogAddStep(tul); }
public void addFilterEventsWriterStep() { FilterEventsWriterStep fewStep = new FilterEventsWriterStep(); driver.addStep(fewStep); Helper.LogAddStep(fewStep); }
private void addSyncStep() { SyncStep syncStep = new SyncStep(project); driver.addStep(syncStep); Helper.LogAddStep(syncStep); }
private void addRawDocumentToFilterEventStep() { RawDocumentToFilterEventsStep rd2feStep = new RawDocumentToFilterEventsStep(); driver.addStep(rd2feStep); Helper.LogAddStep(rd2feStep); }
private void addPseudoLocalizationStep() { PseudoLocalizationStep pls = new PseudoLocalizationStep(project); driver.addStep(pls); Helper.LogAddStep(pls); }
private void processSyncFlowPipeline() { driver.processBatch(); }