<?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.
 -->

<!-- Descriptor for testing configuration groups. -->

<flowControllerDescription xmlns="http://uima.apache.org/resourceSpecifier">
<frameworkImplementation>org.apache.uima.java</frameworkImplementation>
<implementationName>org.apache.uima.analysis_engine.impl.SegmentDroppingFlowController</implementationName>
 
<processingResourceMetaData>
<name>FlowController With Configuration Groups</name>
<description>For testing parameter overrides on FlowControllers.</description>
<version>1.0</version>
<vendor>The Apache Software Foundation</vendor>
 
<!-- Configuration Parameter Definitions -->
<configurationParameters defaultGroup="en" searchStrategy="language_fallback"> 

<commonParameters>
  <configurationParameter>
    <name>StringParam</name>
    <description/>
    <type>String</type>
  </configurationParameter>
  <configurationParameter>
    <name>StringArrayParam</name>
    <description/>
    <type>String</type>
    <multiValued>true</multiValued>
  </configurationParameter>  
</commonParameters>

<configurationGroup names="en en-US de">
  <configurationParameter>
    <name>IntegerParam</name>
    <description/>
    <type>Integer</type>
  </configurationParameter>
  <configurationParameter>
    <name>IntegerArrayParam</name>
    <description/>
    <type>Integer</type>
    <multiValued>true</multiValued>
  </configurationParameter>
</configurationGroup>

<configurationGroup names="zh">
  <configurationParameter>
    <name>FloatParam</name>
    <description/>
    <type>Float</type>
  </configurationParameter>
  <configurationParameter>
    <name>FloatArrayParam</name>
    <description/>
    <type>Float</type>
    <multiValued>true</multiValued>
  </configurationParameter>  
</configurationGroup>

<configurationGroup names="x-unspecified"/>

<configurationGroup names="test"/>

</configurationParameters>

<!-- Values for the configuration parameters -->
<configurationParameterSettings>

<settingsForGroup name="en">
  <nameValuePair>
    <name>StringParam</name>
    <value><string>en</string></value>
  </nameValuePair>
  <nameValuePair>
    <name>StringArrayParam</name>
    <value><array>
      <string>e</string>
      <string>n</string>
    </array></value>
  </nameValuePair>
  <nameValuePair>
    <name>IntegerParam</name>
    <value><integer>42</integer></value>
  </nameValuePair>
  <nameValuePair>
    <name>IntegerArrayParam</name>
    <value><array>
      <integer>1</integer>
      <integer>2</integer>
      <integer>3</integer>
    </array></value>
  </nameValuePair>
</settingsForGroup>

<settingsForGroup name="en-US">
  <nameValuePair>
    <name>StringArrayParam</name>
    <value><array>
      <string>e</string>
      <string>n</string>
      <string>-</string>
      <string>U</string>
      <string>S</string>
    </array></value>
  </nameValuePair>
  <nameValuePair>
    <name>IntegerParam</name>
    <value><integer>1776</integer></value>
  </nameValuePair>
</settingsForGroup>

<settingsForGroup name="de">
  <nameValuePair>
    <name>StringParam</name>
    <value><string>de</string></value>
  </nameValuePair>
  <nameValuePair>
    <name>StringArrayParam</name>
    <value><array>
      <string>d</string>
      <string>e</string>
    </array></value>
  </nameValuePair>
  <nameValuePair>
    <name>IntegerArrayParam</name>
    <value><array>
      <integer>4</integer>
      <integer>5</integer>
      <integer>6</integer>
    </array></value>
  </nameValuePair>
</settingsForGroup>
  
<settingsForGroup name="zh">
  <nameValuePair>
    <name>StringParam</name>
    <value><string>zh</string></value>
  </nameValuePair>
  <nameValuePair>
    <name>StringArrayParam</name>
    <value><array>
      <string>z</string>
      <string>h</string>
    </array></value>
  </nameValuePair>
  <nameValuePair>
    <name>FloatParam</name>
    <value><float>3.14</float></value>
  </nameValuePair>
</settingsForGroup>

<!-- Test Empty String Array -->
<settingsForGroup name="x-unspecified">
  <nameValuePair>
    <name>StringArrayParam</name>
    <value>
    	<array></array>
    </value>
  </nameValuePair>
</settingsForGroup>

<!-- Test Empty settingsForGroup -->
<settingsForGroup name="test"/>

</configurationParameterSettings>

<typeSystemDescription>
<types/>
</typeSystemDescription>

<!-- Capabilities: Inputs and Outputs -->
<capabilities>
<capability>
<inputs/>
<outputs/>
<languagesSupported/>
</capability>
</capabilities>

</processingResourceMetaData>
</flowControllerDescription>
