Package org.apache.uima.flow
Class JCasFlow_ImplBase
- java.lang.Object
-
- org.apache.uima.flow.JCasFlow_ImplBase
-
-
Constructor Summary
Constructors Constructor Description JCasFlow_ImplBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
aborted()
By default, does nothing.boolean
continueOnFailure(String failedAeKey, Exception failure)
By default, returns false, indicating that processing cannot continue after a failure.protected JCas
getJCas()
Gets the JCas being routed by this Flow object.Flow
newCasProduced(AbstractCas newCas, String producedBy)
Overriden to check thatnewCas
is an instanceofJCas
.protected Flow
newCasProduced(JCas newCas, String producedBy)
By default, throws an exception to indicate this this Flow object does not support new CASes being produced in the middle of the flow.void
setJCas(JCas aJCas)
Deprecated.this is done automatically by the framework with the Flow object is created
-
-
-
Method Detail
-
setJCas
@Deprecated public void setJCas(JCas aJCas)
Deprecated.this is done automatically by the framework with the Flow object is createdSets the JCas to be routed by this Flow object. This should be called from theFlowController.computeFlow(AbstractCas)
method after this Flow object is instantiated.- Parameters:
aJCas
- the JCas to be routed by this Flow object
-
newCasProduced
public final Flow newCasProduced(AbstractCas newCas, String producedBy) throws AnalysisEngineProcessException
Overriden to check thatnewCas
is an instanceofJCas
. If it is, thennewCasProduced(JCas,String)
is called. If not, an exception is thrown.- Specified by:
newCasProduced
in interfaceFlow
- Parameters:
newCas
- the new CASproducedBy
- key of the AnalysisEngine (CAS Multiplier) that produced the new CAS- Returns:
- a new Flow object that has responsibility for routing
aCAS
through the Aggregate Analysis Engine. - Throws:
AnalysisEngineProcessException
- passthru- See Also:
Flow.newCasProduced(AbstractCas, String)
-
continueOnFailure
public boolean continueOnFailure(String failedAeKey, Exception failure)
By default, returns false, indicating that processing cannot continue after a failure. May be overridden by subclasses to allow processing to continue.- Specified by:
continueOnFailure
in interfaceFlow
- Parameters:
failedAeKey
- The key of the analysis engine that failed.failure
- the Exception that occurred- Returns:
- true if the FlowController decides that processing of the CAS can continue; false if processing of the CAS should be aborted.
- See Also:
Flow.continueOnFailure(String, java.lang.Exception)
-
aborted
public void aborted()
By default, does nothing. May be overriden by subclasses to release resources when a flow is aborted.- Specified by:
aborted
in interfaceFlow
- See Also:
Flow.aborted()
-
newCasProduced
protected Flow newCasProduced(JCas newCas, String producedBy) throws AnalysisEngineProcessException
By default, throws an exception to indicate this this Flow object does not support new CASes being produced in the middle of the flow. Subclasses can override to implement handling for this.- Parameters:
newCas
- the new JCasproducedBy
- the key of the CAS Multiplier that produced this JCas- Returns:
- a Flow object that will be used to route the new JCas
- Throws:
AnalysisEngineProcessException
- -- See Also:
Flow.newCasProduced(AbstractCas, String)
-
getJCas
protected JCas getJCas()
Gets the JCas being routed by this Flow object.- Returns:
- the JCas being routed by this Flow object
-
-