<?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.
 -->
<conceptSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://incubator.apache.org/uima/regex" xsi:schemaLocation="concept.xsd">
	
    <concept name="ConceptName" processAllRules="true">
    	<rules>
			<rule ruleId="ID1" regEx="someRegex" matchStrategy="matchAll" matchType="uima.tcas.DocumentAnnotation" confidence="1.0">
				<matchTypeFilter>
					<feature featurePath="language">regexExpression</feature>
				</matchTypeFilter>
				<updateMatchTypeAnnotation>
			 		<setFeature name="language" type="String">$0</setFeature>
			 	</updateMatchTypeAnnotation>	
			 	<ruleExceptions>	
	  				<exception matchType="uima.tcas.DocumentAnnotation">regexExpression</exception>
  				</ruleExceptions>
			</rule>
      		<rule ruleId="ID2" regEx="someOtherRegex" matchStrategy="matchFirst" matchType="uima.tcas.DocumentAnnotation" confidence="0.7">
				<matchTypeFilter>
					<feature featurePath="language">regexExpression</feature>
				</matchTypeFilter>
			</rule>
			<rule ruleId="ID3" regEx="anotherRegex" matchStrategy="matchComplete" matchType="uima.tcas.DocumentAnnotation" confidence="0.3" featurePath="valid/feature/path">
				<matchTypeFilter>
					<feature featurePath="language">regexExpression</feature>
				</matchTypeFilter>
			</rule>		
	    </rules>
	    <createAnnotations>	
			<annotation id="testannot" type="org.apache.uima.TestAnnot">
				<begin group="0" location="end"/>
				<end group="0" location="start"/>
				<setFeature name="testFeature" type="String" normalization="ToLowerCase">$0</setFeature>		
				<setFeature name="customNormalized" type="String" normalization="Custom" class="my.package.Normalizer">$0</setFeature>
				<setFeature name="testFeature1" type="Reference">testannot1</setFeature>
				<setFeature name="confidenceValue" type="Confidence"/>
				<setFeature name="ruleId" type="RuleId" normalization="ToUpperCase"/>
				<setFeature name="testFeature2" type="RuleId" normalization="Trim"/>
		 	</annotation>
		 			 	
		 	<annotation id="testannot1" type="org.apache.uima.TestAnnot1" validate="my.package.Validator">
				<begin group="8"/>
				<end group="3"/>
		 	</annotation>
	 	</createAnnotations>
    </concept>
    
    <!-- minimal configuration -->
    <concept>
    	<rules>
			<rule regEx="regexExpression" matchStrategy="matchAll" matchType="uima.tcas.DocumentAnnotation"/>
 	    </rules>
	    <createAnnotations>
		 	<annotation id="testannotation" type="org.apache.uima.TestAnnot1">
				<begin group="0"/>
				<end group="0"/>
		 	</annotation>
	 	</createAnnotations>
    </concept>
    
</conceptSet>
