List of usage examples for org.apache.commons.pipeline Pipeline getStages
public final List<Stage> getStages()
From source file:edu.scripps.fl.pubchem.app.RelatedCurveProcessor.java
public static void main(String[] args) throws Exception { CommandLineHandler clh = new CommandLineHandler(); args = clh.handle(args);//w ww . j a va 2 s.co m Integer[] list = (Integer[]) ConvertUtils.convert(args, Integer[].class); Integer referenceAid = list[0]; Integer[] relatedAids = new Integer[list.length - 1]; System.arraycopy(list, 1, relatedAids, 0, list.length - 1); URL url = PipelineUtils.class.getClassLoader() .getResource("edu/scripps/fl/pubchem/RelatedCurvesPipeline.xml"); Pipeline pipeline = new PipelineUtils().createPipeline(url, Arrays.asList(relatedAids)); List<Stage> stages = pipeline.getStages(); BeanUtils.setProperty(stages.get(1), "referenceAID", referenceAid); pipeline.run(); new PipelineUtils().logErrors(pipeline); }
From source file:edu.scripps.fl.pubchem.app.CIDDownloader.java
public void process(Iterator<?> iterator) throws Exception { URL url = getClass().getResource("/edu/scripps/fl/pubchem/SDFDownloadPipeline.xml"); Pipeline pipeline = new PipelineUtils().createPipeline(url, iterator); List<Stage> stages = pipeline.getStages(); pipeline.run();//w w w . ja va2 s .c o m new PipelineUtils().logErrors(pipeline); }
From source file:edu.scripps.fl.pubchem.app.AssayDownloader.java
public Pipeline assayXML(final Set<Long> processAids) throws Exception { URL url = PipelineUtils.class.getClassLoader() .getResource("edu/scripps/fl/pubchem/BioAssayXMLPipeline.xml"); Pipeline pipeline = new PipelineUtils().createPipeline(url, processAids); for (Stage stage : pipeline.getStages()) if (stage instanceof ReadDocumentStage) ((ReadDocumentStage) stage).setDataUrl(dataUrl); pipeline.run();/*from w w w . j ava 2 s . c om*/ new PipelineUtils().logErrors(pipeline); return pipeline; }
From source file:edu.scripps.fl.pubchem.app.ResultDownloader.java
protected void process(Iterator<Integer> processAids) throws Exception { URL url = PipelineUtils.class.getClassLoader() .getResource("edu/scripps/fl/pubchem/BioAssayResultsPipeline.xml"); Pipeline pipeline = new PipelineUtils().createPipeline(url, processAids, CollectionUtils.createMap("CsvResultsSource", SourceColumnsInfo.Type.FTP)); for (Stage stage : pipeline.getStages()) if (stage instanceof DownloadCsvStage) ((DownloadCsvStage) stage).setDataUrl(dataUrl); pipeline.run();// ww w.j a v a 2s . c om new PipelineUtils().logErrors(pipeline); }