Class CasAnnotator_ImplBase
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.CasAnnotator_ImplBase
- All Implemented Interfaces:
AnalysisComponent
- Direct Known Subclasses:
CasAnnotator_ImplBase
,CasConsumer_ImplBase
,XmlDetagger
Base class to be extended by Annotators that use the
CAS
interface. An Annotator is an
AnalysisComponent
that may modify its input CAS, but never creates any new CASes as
output.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the specific CAS interface that this AnalysisComponent requires the framework to pass to itsAnalysisComponent.process(AbstractCas)
method.final void
process
(AbstractCas aCAS) Inputs a CAS to the AnalysisComponent.abstract void
Inputs a CAS to the AnalysisComponent.void
typeSystemInit
(TypeSystem aTypeSystem) Informs this annotator that the CAS TypeSystem has changed.Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, next
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, getResultSpecification, initialize, reconfigure, setResultSpecification
-
Constructor Details
-
CasAnnotator_ImplBase
public CasAnnotator_ImplBase()
-
-
Method Details
-
getRequiredCasInterface
Description copied from interface:AnalysisComponent
Returns the specific CAS interface that this AnalysisComponent requires the framework to pass to itsAnalysisComponent.process(AbstractCas)
method.- Returns:
- the required CAS interface. This must specify a subtype of
AbstractCas
.
-
process
Description copied from interface:AnalysisComponent
Inputs a CAS to the AnalysisComponent. The AnalysisComponent "owns" this CAS until such time asAnalysisComponent.hasNext()
is called and returns false or untilprocess
is called again (see class description).- Parameters:
aCAS
- A CAS that this AnalysisComponent should process. The framework will ensure that aCAS implements the specific CAS interface specified by theAnalysisComponent.getRequiredCasInterface()
method.- Throws:
AnalysisEngineProcessException
- if a problem occurs during processing
-
process
Inputs a CAS to the AnalysisComponent. This method should be overriden by subclasses to perform analysis of the CAS.- Parameters:
aCAS
- A CAS that this AnalysisComponent should process.- Throws:
AnalysisEngineProcessException
- if a problem occurs during processing
-
typeSystemInit
Informs this annotator that the CAS TypeSystem has changed. The Analysis Engine calls this from PrimitiveAnalysisEngine_impl which-calls CasAnnotator_ImplBase.process which-calls checkTypeSystemChangeIn this method, the Annotator should use the
TypeSystem
to resolve the names of Type and Features to the actualType
andFeature
objects, which can then be used during processing.- Parameters:
aTypeSystem
- the new type system to use as input to your initialization- Throws:
AnalysisEngineProcessException
- if the provided type system is missing types or features required by this annotator
-