org.apache.uima.analysis_component
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
public abstract class Annotator_ImplBase
- extends AnalysisComponent_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.
Method Summary |
int |
getCasInstancesRequired()
Returns 0, since annotators are not allowed to create new CAS instances. |
boolean |
hasNext()
Returns false, since annotators are not allowed to create new CAS instances. |
AbstractCas |
next()
Throws a UIMA_IllegalStateException, since annotators are not allowed to create new CAS
instances. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Annotator_ImplBase
public Annotator_ImplBase()
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
public final boolean hasNext()
throws AnalysisEngineProcessException
- 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
public final AbstractCas next()
throws AnalysisEngineProcessException
- 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
Copyright © 2010 The Apache Software Foundation. All Rights Reserved.