org.apache.uima.flow

## Class JCasFlowController_ImplBase

- java.lang.Object
- - org.apache.uima.flow.FlowController_ImplBase
  - - org.apache.uima.flow.JCasFlowController_ImplBase

- All Implemented Interfaces:
    FlowController

      public abstract class JCasFlowController_ImplBase
      extends FlowController_ImplBase

  Base class to be extended by FlowControllers that use the `JCas` interface.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JCasFlowController_ImplBase()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Flow` | `computeFlow(AbstractCas aCAS)` Overriden to check that `aCAS` is an instanceof `JCas`.
    `abstract Flow` | `computeFlow(JCas aJCas)` This method must be overriden by subclasses.
    `Class<JCas>` | `getRequiredCasInterface()` Returns the specific CAS interface that this FlowController requires the framework to pass to its `FlowController.computeFlow(AbstractCas)` method.

    - ### Methods inherited from class org.apache.uima.flow.FlowController_ImplBase

      `addAnalysisEngines, batchProcessComplete, collectionProcessComplete, destroy, getContext, initialize, reconfigure, removeAnalysisEngines`

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

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

- - ### Constructor Detail

    - #### JCasFlowController_ImplBase

          public JCasFlowController_ImplBase()

  - ### Method Detail

    - #### getRequiredCasInterface

          public Class<JCas> getRequiredCasInterface()

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

    - #### computeFlow

          public final Flow computeFlow(AbstractCas aCAS)
                                 throws AnalysisEngineProcessException

      Overriden to check that `aCAS` is an instanceof `JCas`. If it is, then `computeFlow(JCas)` is called. If not, an exception is thrown.
      Parameters:
        `aCAS` - A CAS that this FlowController should process. The framework will ensure that aCAS implements the specific CAS interface declared in the <casInterface> element of this FlowController's descriptor.
      Returns:
        a Flow object that has responsibility for routing `aCAS` through the Aggregate Analysis Engine.
      Throws:
        `AnalysisEngineProcessException` - if this FlowController encounters a problem computing the flow for the CAS

    - #### computeFlow

          public abstract Flow computeFlow(JCas aJCas)
                                    throws AnalysisEngineProcessException

      This method must be overriden by subclasses. It takes a `JCas` and returns a `Flow` object that is responsible for routing this particular JCas through the components of this Aggregate. The `Flow` object should be given a handle to the JCas, so that it can use information in the CAS to make routing decisions.

      FlowController implementations will typically define their own class that implements `Flow` by extending from the base class `JCasFlow_ImplBase`. This method would then just instantiate the flow object, call its `setCas` method to provide a handle to the JCas, and return the flow object.

      Parameters:
        `aJCas` - the JCas to be routed
      Returns:
        a Flow object that will be used to route `aJCas`
      Throws:
        `AnalysisEngineProcessException` - if a problem occurs during processing
      See Also:
        `FlowController.computeFlow(AbstractCas)`

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