@Test public void testErrorNoCR() throws Exception { String yaml = Files.asCharSource(getFile("errorNoCRConfig.yaml"), StandardCharsets.UTF_8).read(); PipelineBuilder pb = new PipelineBuilder("Test Pipeline", new YamlPipelineConfiguration(yaml)); try { pb.createNewPipeline(); fail("Expected exception not thrown"); } catch (BaleenException be) { } }
public BaleenPipeline createNewPipeline() throws BaleenException { LOGGER.info("Creating pipeline {}", name); readConfiguration(); resourceDescriptors = new HashMap<>(); try { resourceManager = ResourceManagerFactory.newResourceManager(); } catch (UIMAException ue) { throw new BaleenException("Could not create Resource Manager", ue); } LOGGER.debug("Configuring pipeline orderer"); IPipelineOrderer orderer = createPipelineOrderer(); configureResources(); LOGGER.debug("Creating collection reader"); CollectionReader collectionReader = createCollectionReader(); List<AnalysisEngine> annotators; if (annotatorsConfig != null && !annotatorsConfig.isEmpty()) { LOGGER.debug("Creating annotators"); annotators = createAnnotators(); } else { annotators = Collections.emptyList(); } List<AnalysisEngine> consumers; if (consumersConfig != null && !consumersConfig.isEmpty()) { LOGGER.debug("Creating consumers"); consumers = createConsumers(); } else { consumers = Collections.emptyList(); } return toPipeline(name, yaml, orderer, collectionReader, annotators, consumers); }
PipelineBuilder { public BaleenPipeline createNewPipeline() throws BaleenException { LOGGER.info("Creating pipeline {}", name); readConfiguration(); resourceDescriptors = new HashMap<>(); try { resourceManager = ResourceManagerFactory.newResourceManager(); } catch (UIMAException ue) { throw new BaleenException("Could not create Resource Manager", ue); } LOGGER.debug("Configuring pipeline orderer"); IPipelineOrderer orderer = createPipelineOrderer(); configureResources(); LOGGER.debug("Creating collection reader"); CollectionReader collectionReader = createCollectionReader(); List<AnalysisEngine> annotators; if (annotatorsConfig != null && !annotatorsConfig.isEmpty()) { LOGGER.debug("Creating annotators"); annotators = createAnnotators(); } else { annotators = Collections.emptyList(); } List<AnalysisEngine> consumers; if (consumersConfig != null && !consumersConfig.isEmpty()) { LOGGER.debug("Creating consumers"); consumers = createConsumers(); } else { consumers = Collections.emptyList(); } return toPipeline(name, yaml, orderer, collectionReader, annotators, consumers); } }
PipelineBuilder { public BaleenPipeline createNewPipeline() throws BaleenException { LOGGER.info("Creating pipeline {}", name); readConfiguration(); resourceDescriptors = new HashMap<>(); try { resourceManager = ResourceManagerFactory.newResourceManager(); } catch (UIMAException ue) { throw new BaleenException("Could not create Resource Manager", ue); } LOGGER.debug("Configuring pipeline orderer"); IPipelineOrderer orderer = createPipelineOrderer(); configureResources(); LOGGER.debug("Creating collection reader"); CollectionReader collectionReader = createCollectionReader(); List<AnalysisEngine> annotators; if (annotatorsConfig != null && !annotatorsConfig.isEmpty()) { LOGGER.debug("Creating annotators"); annotators = createAnnotators(); } else { annotators = Collections.emptyList(); } List<AnalysisEngine> consumers; if (consumersConfig != null && !consumersConfig.isEmpty()) { LOGGER.debug("Creating consumers"); consumers = createConsumers(); } else { consumers = Collections.emptyList(); } return toPipeline(name, yaml, orderer, collectionReader, annotators, consumers); } @Deprecated  PipelineBuilder(String name, String yaml);  PipelineBuilder(String name, PipelineConfiguration yaml); }
PipelineBuilder { public BaleenPipeline createNewPipeline() throws BaleenException { LOGGER.info("Creating pipeline {}", name); readConfiguration(); resourceDescriptors = new HashMap<>(); try { resourceManager = ResourceManagerFactory.newResourceManager(); } catch (UIMAException ue) { throw new BaleenException("Could not create Resource Manager", ue); } LOGGER.debug("Configuring pipeline orderer"); IPipelineOrderer orderer = createPipelineOrderer(); configureResources(); LOGGER.debug("Creating collection reader"); CollectionReader collectionReader = createCollectionReader(); List<AnalysisEngine> annotators; if (annotatorsConfig != null && !annotatorsConfig.isEmpty()) { LOGGER.debug("Creating annotators"); annotators = createAnnotators(); } else { annotators = Collections.emptyList(); } List<AnalysisEngine> consumers; if (consumersConfig != null && !consumersConfig.isEmpty()) { LOGGER.debug("Creating consumers"); consumers = createConsumers(); } else { consumers = Collections.emptyList(); } return toPipeline(name, yaml, orderer, collectionReader, annotators, consumers); } @Deprecated  PipelineBuilder(String name, String yaml);  PipelineBuilder(String name, PipelineConfiguration yaml); BaleenPipeline createNewPipeline(); }
PipelineBuilder { public BaleenPipeline createNewPipeline() throws BaleenException { LOGGER.info("Creating pipeline {}", name); readConfiguration(); resourceDescriptors = new HashMap<>(); try { resourceManager = ResourceManagerFactory.newResourceManager(); } catch (UIMAException ue) { throw new BaleenException("Could not create Resource Manager", ue); } LOGGER.debug("Configuring pipeline orderer"); IPipelineOrderer orderer = createPipelineOrderer(); configureResources(); LOGGER.debug("Creating collection reader"); CollectionReader collectionReader = createCollectionReader(); List<AnalysisEngine> annotators; if (annotatorsConfig != null && !annotatorsConfig.isEmpty()) { LOGGER.debug("Creating annotators"); annotators = createAnnotators(); } else { annotators = Collections.emptyList(); } List<AnalysisEngine> consumers; if (consumersConfig != null && !consumersConfig.isEmpty()) { LOGGER.debug("Creating consumers"); consumers = createConsumers(); } else { consumers = Collections.emptyList(); } return toPipeline(name, yaml, orderer, collectionReader, annotators, consumers); } @Deprecated  PipelineBuilder(String name, String yaml);  PipelineBuilder(String name, PipelineConfiguration yaml); BaleenPipeline createNewPipeline(); static final String PIPELINE_NAME; static final String ANNOTATOR_UUID; static final String BALEEN_HISTORY; static final String CONTENT_EXTRACTOR; static final String ORIGINAL_CONFIG; }