Class RoomNumberAnnotator
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.fit.component.JCasAnnotator_ImplBase
org.apache.uima.fit.examples.tutorial.ex2.RoomNumberAnnotator
- All Implemented Interfaces:
AnalysisComponent
This class demonstrates annotating member variables with the @ConfigurationParameter annotation.
Defining configuration parameters in this way in combination with using the
uimaFIT's JCasAnnotator_ImplBase
class obviates the need for an
initialize method at all because the super class initialize method calls
ConfigurationParameterInitializer.initialize(java.lang.Object, org.apache.uima.UimaContext)
. This method initializes member variables
annotated as configuration parameters using the configuration parameter information provided in
the UimaContext.
This class was copied from the uimaj-examples project and modified in following ways:
- The package name was changed to org.apache.uima.fit.tutorial.ex2
- The super class was changed to org.apache.uima.fit.component.JCasAnnotator_ImplBase
- The class is annotated with org.apache.uima.fit.descriptor.TypeCapability
- mPatterns and mLocations is annotated with @ConfigurationParameters
- the initialize method was removed
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.uima.fit.component.JCasAnnotator_ImplBase
initialize
Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
getRequiredCasInterface, process
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, reconfigure, setResultSpecification
-
Constructor Details
-
RoomNumberAnnotator
public RoomNumberAnnotator()
-
-
Method Details
-
process
Description copied from class:JCasAnnotator_ImplBase
This method should be overriden by subclasses. Inputs a JCAS to the AnalysisComponent. The AnalysisComponent "owns" this JCAS until such time asAnnotator_ImplBase.hasNext()
is called and returns false (seeAnalysisComponent
for details).- Specified by:
process
in classJCasAnnotator_ImplBase
- Parameters:
aJCas
- a JCAS that this AnalysisComponent should process.- Throws:
AnalysisEngineProcessException
- if a problem occurs during processing- See Also:
-