public class WhiteboardFlowController2 extends CasFlowController_ImplBase
Limitations: only looks at types, not features. Ignores languagesSupported. Does not handle multiple Sofas or CasMultipliers.
This is an alternative implementation of
WhiteboardFlowController. It is slightly more complex but
should acheive better performance because CAS Type handles are resolved once, during
intitialization, instead of repeatedly resolved at each step of the flow.
| Constructor and Description |
|---|
WhiteboardFlowController2() |
| Modifier and Type | Method and Description |
|---|---|
Flow |
computeFlow(CAS aCAS)
This method must be overriden by subclasses.
|
void |
initialize(FlowControllerContext aContext)
Performs any startup tasks required by this component.
|
void |
typeSystemInit(TypeSystem aTypeSystem)
This method may be overriden by subclasses.
|
computeFlow, getRequiredCasInterfaceaddAnalysisEngines, batchProcessComplete, collectionProcessComplete, destroy, getContext, reconfigure, removeAnalysisEnginespublic void initialize(FlowControllerContext aContext) throws ResourceInitializationException
FlowController
The framework supplies this FlowController with a reference to the
FlowControllerContext that it will use, for example to access configuration settings or
resources. This FlowController should store a reference to this Context for later use.
initialize in interface FlowControllerinitialize in class FlowController_ImplBaseaContext - Provides access to services and resources managed by the framework. This includes
configuration parameters, logging, and access to external resources. Also provides the
FlowController with the metadata of all of the AnalysisEngines that are possible
targets for routing CASes.ResourceInitializationException - if the FlowController cannot initialize successfully.public void typeSystemInit(TypeSystem aTypeSystem) throws AnalysisEngineProcessException
CasFlowController_ImplBaseCasFlowController_ImplBase.computeFlow(CAS), and will be called again whenever the CAS TypeSystem changes.
In this method, the FlowController can use the TypeSystem to resolve the names of Type
and Features to the actual Type and
Feature objects, which can then be used to access information from
the CAS during routing.
typeSystemInit in class CasFlowController_ImplBaseaTypeSystem - the typesystemAnalysisEngineProcessException - if a problem occurs during processingpublic Flow computeFlow(CAS aCAS) throws AnalysisEngineProcessException
CasFlowController_ImplBaseCAS and returns a Flow
object that is responsible for routing this particular CAS through the components of this
Aggregate. The Flow object should be given a handle to the CAS, so that it can
use information in the CAS to make routing decisions.
FlowController implementations will typically define their own class that implements
Flow by extending from the base class CasFlow_ImplBase. This method would then
just instantiate the flow object, call its setCas method to provide a handle to
the CAS, and return the flow object.
computeFlow in class CasFlowController_ImplBaseaCAS - the CAS to be routedaCASAnalysisEngineProcessException - if a problem occurs during processingFlowController.computeFlow(AbstractCas)Copyright © 2015. All rights reserved.