org.apache.uima.analysis_component

## 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

      public abstract class CasAnnotator_ImplBase
      extends Annotator_ImplBase

  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

    Constructors
    Constructor and Description
    `CasAnnotator_ImplBase()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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.

    - ### 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, initialize, reconfigure, setResultSpecification`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CasAnnotator_ImplBase

          public CasAnnotator_ImplBase()

  - ### Method Detail

    - #### getRequiredCasInterface

          public Class<CAS> getRequiredCasInterface()

      Description copied from interface: `AnalysisComponent`
      Returns the specific CAS interface that this AnalysisComponent requires the framework to pass to its `AnalysisComponent.process(AbstractCas)` method.
      Returns:
        the required CAS interface. This must specify a subtype of `AbstractCas`.

    - #### process

          public final void process(AbstractCas aCAS)
                             throws AnalysisEngineProcessException

      Description copied from interface: `AnalysisComponent`
      Inputs a CAS to the AnalysisComponent. The AnalysisComponent "owns" this CAS until such time as `AnalysisComponent.hasNext()` is called and returns false or until `process` 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 the `AnalysisComponent.getRequiredCasInterface()` method.
      Throws:
        `AnalysisEngineProcessException` - if a problem occurs during processing

    - #### process

          public abstract void process(CAS aCAS)
                                throws AnalysisEngineProcessException

      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

          public void typeSystemInit(TypeSystem aTypeSystem)
                              throws AnalysisEngineProcessException

      Informs this annotator that the CAS TypeSystem has changed. The Analysis Engine calls this method immediately following the call to `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.

      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

Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.