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

	<!-- Simple FeaturePath matching -->	
    <concept name="annotCreation">
    	<rules>
			<rule regEx="SimpleRegex" matchStrategy="matchAll" matchType="uima.tcas.DocumentAnnotation">
			</rule>
	    </rules>
	    <createAnnotations>	
			<annotation type="org.apache.uima.TestAnnot">
				<begin group="0"/>
				<end group="0"/>
				<setFeature name="testFeature" type="String">SimpleFeaturePathMatchingTest</setFeature>
				<setFeature name="testFeatureInt" type="Integer">3243</setFeature>
				<setFeature name="testFeatureFloat" type="Float">324.34</setFeature>
		 	</annotation>
	 	</createAnnotations>
    </concept>

    <concept name="SimpleFeaturePathMatch" processAllRules="true">
    	<rules>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeature"/>
			<!-- only featurePath evaluation is tested - no matching occurs -->
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureInt"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureFloat"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureBoolean"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureShort"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureLong"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureByte"/>
			<rule regEx="FeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot" featurePath="testFeatureDouble"/>
	    </rules>
	    <createAnnotations>	
			<annotation type="org.apache.uima.TestAnnot1">
				<begin group="0"/>
				<end group="0"/>
				<setFeature name="testFeature" type="String">$0</setFeature>
		 	</annotation>
	 	</createAnnotations>
    </concept>
    
 
	<!-- Advanced FeaturePath matching -->	
    <concept name="AdvancedAnnotCreation">
    	<rules>
			<rule regEx="AdvancedRegex" matchStrategy="matchAll" matchType="uima.tcas.DocumentAnnotation">
			</rule>
	    </rules>
	    <createAnnotations>	
			<annotation id="annot1" type="org.apache.uima.TestAnnot">
				<begin group="0"/>
				<end group="0"/>
				<setFeature name="testFeature" type="String">MyAdvancedFeaturePathMatchingTest</setFeature>
		 	</annotation>
			<annotation id="annot2" type="org.apache.uima.TestAnnot1">
				<begin group="0"/>
				<end group="0"/>
				<setFeature name="refFeature" type="Reference">annot1</setFeature>
		 	</annotation>
	 	</createAnnotations>
	 	
    </concept>

    <concept name="AdvancedFeaturePathMatch">
    	<rules>
			<rule regEx="AdvancedFeaturePath" matchStrategy="matchAll" matchType="org.apache.uima.TestAnnot1" featurePath="refFeature/testFeature">
			</rule>
	    </rules>
	    <createAnnotations>	
			<annotation type="org.apache.uima.TestAnnot2">
				<begin group="0"/>
				<end group="0"/>
				<setFeature name="testFeature" type="String">$0</setFeature>
		 	</annotation>
	 	</createAnnotations>
    </concept>
        
</conceptSet>
