org.apache.uima.tutorial.ex5
Class RoomNumberAnnotator

java.lang.Object
  extended by org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      extended by org.apache.uima.analysis_component.Annotator_ImplBase
          extended by org.apache.uima.analysis_component.JCasAnnotator_ImplBase
              extended by org.apache.uima.tutorial.ex5.RoomNumberAnnotator
All Implemented Interfaces:
AnalysisComponent

public class RoomNumberAnnotator
extends JCasAnnotator_ImplBase

Example annotator that detects room numbers using Java 1.4 regular expressions.


Field Summary
static java.lang.String MESSAGE_DIGEST
           
 
Constructor Summary
RoomNumberAnnotator()
           
 
Method Summary
 void initialize(UimaContext aContext)
          Performs any startup tasks required by this component.
 void process(JCas aJCas)
          This method should be overriden by subclasses.
 
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, getResultSpecification, reconfigure, setResultSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_DIGEST

public static final java.lang.String MESSAGE_DIGEST
See Also:
Constant Field Values
Constructor Detail

RoomNumberAnnotator

public RoomNumberAnnotator()
Method Detail

initialize

public void initialize(UimaContext aContext)
                throws ResourceInitializationException
Description copied from interface: AnalysisComponent
Performs any startup tasks required by this component. The framework calls this method only once, just after the AnalysisComponent has been instantiated.

The framework supplies this AnalysisComponent with a reference to the UimaContext that it will use, for example to access configuration settings or resources. This AnalysisComponent should store a reference to its the UimaContext for later use.

Specified by:
initialize in interface AnalysisComponent
Overrides:
initialize in class AnalysisComponent_ImplBase
Parameters:
aContext - Provides access to services and resources managed by the framework. This includes configuration parameters, logging, and access to external resources.
Throws:
ResourceInitializationException - if this AnalysisComponent cannot initialize successfully.
See Also:
AnalysisComponent.initialize(UimaContext)

process

public void process(JCas aJCas)
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 as Annotator_ImplBase.hasNext() is called and returns false (see AnalysisComponent for details).

Specified by:
process in class JCasAnnotator_ImplBase
Parameters:
aJCas - a JCAS that this AnalysisComponent should process.
See Also:
JCasAnnotator_ImplBase.process(JCas)


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.