@Override public AnalysisEngine buildPipeline(AnyObject config, String pipeline, int stageId) throws Exception { try { return buildPipeline(config, pipeline, stageId, null, true); } catch (Exception e) { throw new ResourceInitializationException( ResourceInitializationException.ERROR_INITIALIZING_FROM_DESCRIPTOR, new Object[] { pipeline, config }, e); } }
@Override public AnalysisEngine buildPostProcess(AnyObject config, String pipeline, int stageId) throws Exception { try { return buildPipeline(config, pipeline, stageId, null, false); } catch (Exception e) { throw new ResourceInitializationException( ResourceInitializationException.ERROR_INITIALIZING_FROM_DESCRIPTOR, new Object[] { pipeline, config }, e); } }
@Override public AnalysisEngine buildPipeline(AnyObject config, String pipeline, int stageId, FixedFlow funnel) throws Exception { try { return buildPipeline(config, pipeline, stageId, funnel, true); } catch (Exception e) { Throwables.propagateIfInstanceOf(e, ResourceInitializationException.class); throw new ResourceInitializationException( ResourceInitializationException.ERROR_INITIALIZING_FROM_DESCRIPTOR, new Object[] { pipeline, config }, e); } }
@Override public AnalysisEngine buildPipeline(AnyObject config, String pipeline, int stageId, FixedFlow funnel, boolean outputNewCASes) throws Exception { loadTypePriorities(config); Iterable<AnyObject> iterable = config.getIterable(pipeline); FlowControllerDescription fcd = FlowControllerFactory .createFlowControllerDescription(FixedFlowController797182.class); AnalysisEngineDescription aee = buildPipeline(stageId, iterable, fcd); if (funnel != null) { FixedFlow fc = (FixedFlow) aee.getAnalysisEngineMetaData().getFlowConstraints(); funnel.setFixedFlow(fc.getFixedFlow()); aee.getAnalysisEngineMetaData().setFlowConstraints(funnel); } aee.getAnalysisEngineMetaData().getOperationalProperties().setOutputsNewCASes(outputNewCASes); aee.getAnalysisEngineMetaData().setName(pipeline); return AnalysisEngineFactory.createAggregate(aee); }