org.apache.uima.analysis_engine.asb
Interface ASB

All Superinterfaces:
Resource

public interface ASB
extends Resource

The Analysis Structure Broker (ASB) is the component responsible for the details of communicating with Analysis Engines that may potentially be distributed across different physical machines. The ASB hides all such details from the rest of the AnalysisEngine, which should be able to operate with no knowledge of whether Analysis Engines are co-located or distributed.


Field Summary
static String PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME
          Key for the initialization parameter whose value is the name of the aggregate analysis engine that owns this ASB.
 
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
 
Method Summary
 Map<String,ProcessingResourceMetaData> getAllComponentMetaData()
          Gets the metadata for all components known to this ASB.
 Map<String,AnalysisEngineMetaData> getComponentAnalysisEngineMetaData()
          Gets metadata for all of the component AnalysisEngines known to this ASB.
 Map<String,AnalysisEngine> getComponentAnalysisEngines()
          Gets references to the component AnalysisEngines known to this ASB.
 org.apache.uima.analysis_engine.asb.impl.FlowControllerContainer getFlowControllerContainer()
          Gets the FlowControllerContainer known to this ASB.
 CasIterator process(CAS aCAS)
          Invokes the processing of the aggregate on the given input CAS.
 void setup(Map<String,ResourceSpecifier> aComponentSpecifiers, UimaContextAdmin aParentContext, FlowControllerDeclaration aFlowControllerDeclaration, AnalysisEngineMetaData aAggregateMetadata)
          Called by the Aggregate Analysis Engine to provide this ASB with information it needs to operate.
 
Methods inherited from interface org.apache.uima.resource.Resource
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
 

Field Detail

PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME

static final String PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME
Key for the initialization parameter whose value is the name of the aggregate analysis engine that owns this ASB. This is used for recording ProcessTrace events.

See Also:
Constant Field Values
Method Detail

setup

void setup(Map<String,ResourceSpecifier> aComponentSpecifiers,
           UimaContextAdmin aParentContext,
           FlowControllerDeclaration aFlowControllerDeclaration,
           AnalysisEngineMetaData aAggregateMetadata)
           throws ResourceInitializationException
Called by the Aggregate Analysis Engine to provide this ASB with information it needs to operate.

This includes a collection of ResourceSpecifier objects that describe how to create or locate the component AnalysisEngines within the aggregate. Each ResourceSpecifier has an associated key, which the aggregate Analysis Engine and the FlowController use to identify that component.

This method is where the component AnalysisEngines and the FlowController are instantiated.

Parameters:
aComponentSpecifiers - a Map from String keys to ResourceSpecifier values, which specify how to create or locate the component CasObjectProcessors.
aParentContext - the UIMA Context of the parent AnalysisEngine, used to construct the subcontexts for the components.
aFlowControllerDeclaration - declaration (key and specifier) of FlowController to be used for this aggregate.
aAggregateMetadata - metadata for the Aggregate AE, needed by the FlowController
Throws:
ResourceInitializationException - if the ResourceFactory could not create or acquire a CasObjectProcessor instance for one of the specifiers in aComponentSpecifiers.

getComponentAnalysisEngineMetaData

Map<String,AnalysisEngineMetaData> getComponentAnalysisEngineMetaData()
Gets metadata for all of the component AnalysisEngines known to this ASB.

Returns:
a Map from String keys (the same keys used in AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers() to AnalysisEngineMetaData values.
Throws:
UIMA_IllegalStateException - if #setup() has not been called yet.

getAllComponentMetaData

Map<String,ProcessingResourceMetaData> getAllComponentMetaData()
Gets the metadata for all components known to this ASB. This includes the FlowController as well as the component AnalysisEngines.

Returns:
a Map from String keys (the same keys used in the aggregate AE descriptor) to ProcessingResourceMetaData values.

getComponentAnalysisEngines

Map<String,AnalysisEngine> getComponentAnalysisEngines()
Gets references to the component AnalysisEngines known to this ASB.

Returns:
a Map from String keys (the same keys used in AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers() to AnalysisEngine objects.
Throws:
UIMA_IllegalStateException - if #setup() has not been called yet.

process

CasIterator process(CAS aCAS)
                    throws AnalysisEngineProcessException
Invokes the processing of the aggregate on the given input CAS. This returns a CasIterator that provides access to the one or more output CASes generated from the processing. The input CAS, including any modifications made to it during processing, will always be the very last element returned by the CasIterator.

If the aggregate does not generate any output CASes of the input CAS, an empty CasIterator will be returned.

Parameters:
aCAS - the CAS to process
Returns:
an iterator over all output CASes
Throws:
AnalysisEngineProcessException

getFlowControllerContainer

org.apache.uima.analysis_engine.asb.impl.FlowControllerContainer getFlowControllerContainer()
Gets the FlowControllerContainer known to this ASB. This includes the FlowController as well as the component AnalysisEngines.

Returns:
an instance of FlowControllerContainer


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