Class AnnotationDefinedFlow
- java.lang.Object
-
- org.apache.uima.flow.JCasFlow_ImplBase
-
- de.julielab.jcore.flow.annotationdefined.AnnotationDefinedFlow
-
- All Implemented Interfaces:
org.apache.uima.flow.Flow
public class AnnotationDefinedFlow extends org.apache.uima.flow.JCasFlow_ImplBaseReturns steps according an existing
ToVisitannotation of the CAS or, if not present, the default aggregate flow.This is, for example, used by the XMLDBMultiplier to let CASes skip large parts of the pipeline when the currently read document already exists in the database.
-
-
Constructor Summary
Constructors Constructor Description AnnotationDefinedFlow(@Nullable ToVisit toVisit, org.apache.uima.analysis_engine.metadata.FlowConstraints flowConstraints, org.apache.uima.jcas.JCas jCas)Creates a flow that follows to entries inToVisit.getDelegateKeys()of toVisit or, if toVisit is null, falls back to the default fixed flow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.uima.flow.Stepnext()Routes the CAS to the next component defined by the CAS'esToVisitannotation or, if ToVisit was not found, to the next component as defined by the default fixed flow.
-
-
-
Constructor Detail
-
AnnotationDefinedFlow
public AnnotationDefinedFlow(@Nullable @Nullable ToVisit toVisit, org.apache.uima.analysis_engine.metadata.FlowConstraints flowConstraints, org.apache.uima.jcas.JCas jCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionCreates a flow that follows to entries in
ToVisit.getDelegateKeys()of toVisit or, if toVisit is null, falls back to the default fixed flow.If toVisit is not null but the delegateKeys are null or empty, no component in the aggregate using this flow will process the respective CAS.
- Parameters:
toVisit- An annotation containing the keys of the delegate AEs to visit. May be null which case the default fixed flow will be used.flowConstraints- The default fixed flow of the aggregate analysis engine.jCas-- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException- If flowConstraints is not a fixed flow.
-
-
Method Detail
-
next
public org.apache.uima.flow.Step next()
Routes the CAS to the next component defined by the CAS'es
ToVisitannotation or, if ToVisit was not found, to the next component as defined by the default fixed flow.- Returns:
- The next component to visit or the next default flow component.
-
-