Interface ASB
- All Superinterfaces:
Resource
- All Known Implementing Classes:
ASB_impl
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
Modifier and TypeFieldDescriptionstatic final String
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_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
-
Method Summary
Modifier and TypeMethodDescriptionGets the metadata for all components known to this ASB.Gets metadata for all of the component AnalysisEngines known to thisASB
.Gets references to the component AnalysisEngines known to thisASB
.Gets theFlowControllerContainer
known to this ASB.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 Details
-
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:
-
-
Method Details
-
setup
void setup(Map<String, ResourceSpecifier> aComponentSpecifiers, UimaContextAdmin aParentContext, FlowControllerDeclaration aFlowControllerDeclaration, AnalysisEngineMetaData aAggregateMetadata) throws ResourceInitializationExceptionCalled 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. EachResourceSpecifier
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 toResourceSpecifier
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 theResourceFactory
could not create or acquire a CasObjectProcessor instance for one of the specifiers inaComponentSpecifiers
.
-
getComponentAnalysisEngineMetaData
Map<String,AnalysisEngineMetaData> getComponentAnalysisEngineMetaData()Gets metadata for all of the component AnalysisEngines known to thisASB
.- Returns:
- a Map from String keys (the same keys used in
AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()
toAnalysisEngineMetaData
values. - Throws:
UIMA_IllegalStateException
- ifsetup(Map, UimaContextAdmin, FlowControllerDeclaration, AnalysisEngineMetaData)
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 thisASB
.- Returns:
- a Map from String keys (the same keys used in
AnalysisEngineDescription.getDelegateAnalysisEngineSpecifiers()
toAnalysisEngine
objects. - Throws:
UIMA_IllegalStateException
- ifsetup(Map, UimaContextAdmin, FlowControllerDeclaration, AnalysisEngineMetaData)
has not been called yet.
-
process
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 theCasIterator
.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
FlowControllerContainer getFlowControllerContainer()Gets theFlowControllerContainer
known to this ASB. This includes the FlowController as well as the component AnalysisEngines.- Returns:
- an instance of
FlowControllerContainer
-