org.apache.uima.flow
Interface Flow

All Known Implementing Classes:
CasFlow_ImplBase, JCasFlow_ImplBase

public interface Flow

A Flow object is responsible for routing a single CAS through an Aggregate Analysis Engine.

Typically, developers extend CasFlow_ImplBase or JCasFlow_ImplBase depending on which CAS interface they wish to use.


Method Summary
 Flow newCasProduced(AbstractCas newCas, String producedBy)
          Called by the framework if the CAS that is being routed by this Flow has been sent to a CAS Multiplier which has then created a new CAS derived from that original CAS.
 Step next()
          Gets the next destination for the CAS.
 

Method Detail

next

Step next()
          throws AnalysisEngineProcessException
Gets the next destination for the CAS. This is defined by a Step object. There may be different kinds of Step objects to indicate different kinds of routing actions.

Returns:
the next destination for the CAS
Throws:
AnalysisEngineProcessException - if a failure occurs while determining the next destination

newCasProduced

Flow newCasProduced(AbstractCas newCas,
                    String producedBy)
                    throws AnalysisEngineProcessException
Called by the framework if the CAS that is being routed by this Flow has been sent to a CAS Multiplier which has then created a new CAS derived from that original CAS.

It is not required for a Flow implementation to support the production of new CASes in the middle of the flow, in which case this method may throw an exception.

If implemented, this method should construct a new Flow object that will be used to route the new CAS. The new Flow object then takes over all responsibility for that CAS.

Parameters:
newCas - the new CAS
producedBy - key of the AnalysisEngine (CAS Multiplier) that produced the new CAS
Returns:
a new Flow object that has responsibility for routing aCAS through the Aggregate Analysis Engine.
Throws:
AnalysisEngineProcessException


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