public abstract class CasAnnotator_ImplBase extends Annotator_ImplBase
CAS
interface. An Annotator is an
AnalysisComponent
that may modify its input CAS, but never creates any new CASes as
output.Constructor and Description |
---|
CasAnnotator_ImplBase() |
Modifier and Type | Method and Description |
---|---|
Class<CAS> |
getRequiredCasInterface()
Returns the specific CAS interface that this AnalysisComponent requires the framework to pass
to its
AnalysisComponent.process(AbstractCas) method. |
void |
process(AbstractCas aCAS)
Inputs a CAS to the AnalysisComponent.
|
abstract void |
process(CAS aCAS)
Inputs a CAS to the AnalysisComponent.
|
void |
typeSystemInit(TypeSystem aTypeSystem)
Informs this annotator that the CAS TypeSystem has changed.
|
getCasInstancesRequired, hasNext, next
batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, initialize, reconfigure, setResultSpecification
public Class<CAS> getRequiredCasInterface()
AnalysisComponent
AnalysisComponent.process(AbstractCas)
method.AbstractCas
.public final void process(AbstractCas aCAS) throws AnalysisEngineProcessException
AnalysisComponent
AnalysisComponent.hasNext()
is called and returns false or until process
is called again
(see class description).aCAS
- A CAS that this AnalysisComponent should process. The framework will ensure that aCAS
implements the specific CAS interface specified by the
AnalysisComponent.getRequiredCasInterface()
method.AnalysisEngineProcessException
- if a problem occurs during processingpublic abstract void process(CAS aCAS) throws AnalysisEngineProcessException
aCAS
- A CAS that this AnalysisComponent should process.AnalysisEngineProcessException
- if a problem occurs during processingpublic void typeSystemInit(TypeSystem aTypeSystem) throws AnalysisEngineProcessException
AnalysisComponent_ImplBase.initialize(org.apache.uima.UimaContext)
, and will call
it again whenever the CAS TypeSystem changes.
In this method, the Annotator should use the TypeSystem
to resolve the names of Type
and Features to the actual Type
and
Feature
objects, which can then be used during processing.
aTypeSystem
- the new type system to use as input to your initializationAnalysisEngineProcessException
- if the provided type system is missing types or features required by this annotatorCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.