<?xml version="1.0" encoding="UTF-8" ?>
<!--
 * 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.
 -->

<taeDescription xmlns="http://uima.apache.org/resourceSpecifier">
<frameworkImplementation>org.apache.uima.java</frameworkImplementation>
<primitive>false</primitive>

<delegateAnalysisEngineSpecifiers>
<delegateAnalysisEngine key="Translator1">
<import location="TcasTransAnnotator.xml"/>
</delegateAnalysisEngine>
<delegateAnalysisEngine key="Translator2">
<import location="TransAnnotator.xml"/>
</delegateAnalysisEngine>
</delegateAnalysisEngineSpecifiers>
<!--For testing, specify FlowController and apply sofa mappings -->
<flowController key="MyFlowController">
	<import location="SofaFlowController.xml"/>
</flowController>


<analysisEngineMetaData>
<name>Aggregate TAE - 2 Translation Annotators</name>
<description>Does translation from English to German twice</description>
<version>1.0</version>
<vendor>The Apache Software Foundation</vendor>
<flowConstraints>
<fixedFlow>
<node>Translator1</node>
<node>Translator2</node>
</fixedFlow>
</flowConstraints>

<capabilities>
<capability>
<inputs></inputs>
<inputSofas>
<sofaName>SourceDocument</sofaName>
</inputSofas>
<!--outputs>
</outputs-->
<outputSofas>
<sofaName>OutputTranslator1</sofaName>
<sofaName>OutputTranslator2</sofaName>
</outputSofas>
<languagesSupported>
<language>en</language>
</languagesSupported>
</capability>
</capabilities>

</analysisEngineMetaData>

<!-- Map the SofA name specified as input/output by the delegate AE -->
<!-- to a SofA name assigned by this aggregate.                      -->
<sofaMappings>
	<sofaMapping>
		<componentKey>Translator1</componentKey>
		<componentSofaName>GermanDocument</componentSofaName>
		<aggregateSofaName>OutputTranslator1</aggregateSofaName>
	</sofaMapping>
	<sofaMapping>
		<componentKey>Translator1</componentKey>
		<!-- no component name; this maps to the input CAS -->
		<aggregateSofaName>SourceDocument</aggregateSofaName>
	</sofaMapping>
	<sofaMapping>
		<componentKey>Translator2</componentKey>
		<componentSofaName>EnglishDocument</componentSofaName>
		<aggregateSofaName>SourceDocument</aggregateSofaName>
	</sofaMapping>
	<sofaMapping>
		<componentKey>Translator2</componentKey>
		<componentSofaName>GermanDocument</componentSofaName>
		<aggregateSofaName>OutputTranslator2</aggregateSofaName>
	</sofaMapping>
	<sofaMapping>
		<componentKey>MyFlowController</componentKey>
		<componentSofaName>OriginalDocument</componentSofaName>
		<aggregateSofaName>SourceDocument</aggregateSofaName>
	</sofaMapping>
</sofaMappings>
</taeDescription>
