Class Annotator_ImplBase
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
- All Implemented Interfaces:
AnalysisComponent
- Direct Known Subclasses:
CasAnnotator_ImplBase
,JCasAnnotator_ImplBase
Base class for all annotators. An Annotator is an
AnalysisComponent
that may modify its
input CAS, but never creates any new CASes as output. Typically, annotators should not extend
this class directly, but instead extend CasAnnotator_ImplBase
or
JCasAnnotator_ImplBase
depending on which CAS interface they wish to use.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
Returns 0, since annotators are not allowed to create new CAS instances.final boolean
hasNext()
Returns false, since annotators are not allowed to create new CAS instances.final AbstractCas
next()
Throws a UIMA_IllegalStateException, since annotators are not allowed to create new CAS instances.Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, getResultSpecification, initialize, reconfigure, setResultSpecification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.uima.analysis_component.AnalysisComponent
getRequiredCasInterface, process
-
Constructor Details
-
Annotator_ImplBase
public Annotator_ImplBase()
-
-
Method Details
-
getCasInstancesRequired
public final int getCasInstancesRequired()Returns 0, since annotators are not allowed to create new CAS instances. Only CasMultipliers are allowed to do this.- Returns:
- the number of CAS instances required by this AnalysisComponent.
-
hasNext
Returns false, since annotators are not allowed to create new CAS instances. Only CasMultipliers are allowed to do this.- Returns:
- true if this AnalysisComponent has another CAS to output, false if not.
- Throws:
AnalysisEngineProcessException
- if a problem occurs during processing
-
next
Throws a UIMA_IllegalStateException, since annotators are not allowed to create new CAS instances. Only CasMultipliers are allowed to do this.- Returns:
- the next output CAS.
- Throws:
AnalysisEngineProcessException
- if a problem occurs during processing
-