blob: 4145bb5369a9e532d16ec219536b41415b494d2f [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.uima.flow;
import java.util.Map;
import org.apache.uima.UimaContext;
import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
/**
* A subtype of {@link UimaContext} used by {@link FlowController} components. In addition to access
* to resources and configuration settings (provided by <code>UimaContext</code>), the
* <code>FlowControllerContext</code> provides access to other infomration that the FlowController
* can use to make routing decitions. This includes:
* <ul>
* <li>A map from AnalysisEngine key to AnalysisEngineMetaData for all AnalysisEngines that the
* FlowController can route CASes to</li>
* <li>Declared Capabilities of the Aggregate AnalysisEngine containing this FlowController.</li>
* </ul>
*/
public interface FlowControllerContext extends UimaContext {
/**
* Gets a map from Analysis Engine key (a String) to {@link AnalysisEngineMetaData}. This map
* contains an entry for all Analysis Engines to which the FlowController can route CASes.
*
* @return a map with <code>String</code> keys, and {@link AnalysisEngineMetaData} values
*/
Map<String, AnalysisEngineMetaData> getAnalysisEngineMetaDataMap();
/**
* Gets the metadata of the Aggregate AnalysisEngine containing this FlowController. This includes
* the specification of the inputs and outputs of the aggregate, which may be useful for some
* FlowController implementations.
*
* @return the Capabilities of the aggregate containing this FlowController.
*/
AnalysisEngineMetaData getAggregateMetadata();
}