Package org.apache.uima.flow
Class JCasFlowController_ImplBase
java.lang.Object
org.apache.uima.flow.FlowController_ImplBase
org.apache.uima.flow.JCasFlowController_ImplBase
- All Implemented Interfaces:
FlowController
Base class to be extended by FlowControllers that use the
JCas interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal FlowcomputeFlow(AbstractCas aCAS) Overriden to check thataCASis an instanceofJCas.abstract FlowcomputeFlow(JCas aJCas) This method must be overriden by subclasses.Returns the specific CAS interface that this FlowController requires the framework to pass to itsFlowController.computeFlow(AbstractCas)method.Methods inherited from class org.apache.uima.flow.FlowController_ImplBase
addAnalysisEngines, batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, initialize, reconfigure, removeAnalysisEngines
-
Constructor Details
-
JCasFlowController_ImplBase
public JCasFlowController_ImplBase()
-
-
Method Details
-
getRequiredCasInterface
Description copied from interface:FlowControllerReturns the specific CAS interface that this FlowController requires the framework to pass to itsFlowController.computeFlow(AbstractCas)method.- Returns:
- the required CAS interface. This must specify a subtype of
AbstractCas.
-
computeFlow
Overriden to check thataCASis an instanceofJCas. If it is, thencomputeFlow(JCas)is called. If not, an exception is thrown.- Parameters:
aCAS- A CAS that this FlowController should process. The framework will ensure that aCAS implements the specific CAS interface declared in the <casInterface> element of this FlowController's descriptor.- Returns:
- a Flow object that has responsibility for routing
aCASthrough the Aggregate Analysis Engine. - Throws:
AnalysisEngineProcessException- if this FlowController encounters a problem computing the flow for the CAS
-
computeFlow
This method must be overriden by subclasses. It takes aJCasand returns aFlowobject that is responsible for routing this particular JCas through the components of this Aggregate. TheFlowobject should be given a handle to the JCas, so that it can use information in the CAS to make routing decisions.FlowController implementations will typically define their own class that implements
Flowby extending from the base classJCasFlow_ImplBase. This method would then just instantiate the flow object, call itssetCasmethod to provide a handle to the JCas, and return the flow object.- Parameters:
aJCas- the JCas to be routed- Returns:
- a Flow object that will be used to route
aJCas - Throws:
AnalysisEngineProcessException- if a problem occurs during processing- See Also:
-