[NO JIRA] Copying v3 tag to a branch under the v2 spot so it gets included in the GitHub mirror.

git-svn-id: https://svn.apache.org/repos/asf/uima/ruta/tags/ruta-3.0.0@1877152 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/README b/README
index b33208b..9d8bdbb 100644
--- a/README
+++ b/README
@@ -1,12 +1,15 @@
 

-Apache UIMA Ruta (TM) v2.8.0

+Apache UIMA Ruta (TM) v3.0.0

 -------------------------------------------------------------------------

 

+This release is compatible with UIMA v3, but not compatible with UIMA v2. 

+For compatibility to UIMA v2, please refer to the latest UIMA Ruta v2 release, e.g., 2.8.0.

+

 Building from the Source Distribution

 -------------------------------------

 

 We use Maven 3.0 and Java 8 or later for building; download this if needed, 

-and set the environment variable MAVEN_OPTS to -Xmx800m -XX:MaxPermSize=256m.

+and set the environment variable MAVEN_OPTS to -Xmx800m.

 

 Then do the build by going into the UIMA Ruta directory, and issuing the command

    

@@ -49,3 +52,23 @@
   </typeSystemExcludes>

 </configuration>

 

+-------------------------------------

+

+If you use the uimaFIT JCasGenPomFriendly in Maven and want to use UIMA Ruta 

+as a standalone annotator you have to exclude the generated UIMA Ruta basic 

+type files from the build, e.g., by adding:

+

+

+<plugin>

+  <groupId>org.apache.maven.plugins</groupId>

+  <artifactId>maven-compiler-plugin</artifactId>

+  <version>3.0</version>

+  <configuration>

+    <excludes>

+      <exclude>org/apache/uima/ruta/type/*.java</exclude>

+    </excludes>

+  </configuration>

+</plugin> 

+

+

+

diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index d24a37a..45087af 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -21,10 +21,10 @@
    -->

 

 <head>

-  <title>Apache UIMA Ruta v2.8.0 Release Notes</title>

+  <title>Apache UIMA Ruta v3.0.0 Release Notes</title>

 </head>

 <body>

-<h1>Apache UIMA Ruta&#8482; v2.8.0 Release Notes</h1>

+<h1>Apache UIMA Ruta&#8482; v3.0.0 Release Notes</h1>

 

 <h2>Contents</h2>

 <p>

@@ -37,37 +37,35 @@
    

 <h2><a name="what.is.uima-ruta">1. What is UIMA Ruta?</a></h2>

 

-     <p>

-  			Apache UIMA Ruta&#8482; is a rule-based script language supported by Eclipse-based tooling.

-      The language is designed to enable rapid development of text processing applications within Apache UIMA&#8482;. 

-      A special focus lies on the intuitive and flexible domain specific language for defining 

-      patterns of annotations. The Eclipse-based tooling for Ruta, called the Ruta Workbench,

-      was created to support the user and to facilitate every step when writing Ruta rules. Both the 

-      Ruta rule language and the Ruta Workbench integrate smoothly with Apache UIMA.

-			</p>

+<p>

+  Apache UIMA Ruta&#8482; is a rule-based script language supported by Eclipse-based tooling.

+  The language is designed to enable rapid development of text processing applications within Apache UIMA&#8482;. 

+  A special focus lies on the intuitive and flexible domain specific language for defining 

+  patterns of annotations. The Eclipse-based tooling for Ruta, called the Ruta Workbench,

+  was created to support the user and to facilitate every step when writing Ruta rules. Both the 

+  Ruta rule language and the Ruta Workbench integrate smoothly with Apache UIMA.

+</p>

 

 <h2><a name="major.changes">2. Major Changes in this Release</a></h2>

 <p>

-    This release contains changed in the analysis engine descriptor and the type system descriptors 

-    and therefore requires an update of the Ruta projects. This can be accomplished for example by 

-    right-click on the Ruta project, selecting "UIMA Ruta" and then "Update Project".

+  This release provides compatibility to UIMA v3. An upgrade from UIMA Ruta v2 to this version requires 

+  also an update to UIMA v3 of the overall application or Eclipse installation. Please refer to the 

+  UIMA v3 user's guide for detailed information: https://uima.apache.org/d/uimaj-3.0.0/version_3_users_guide.html

+</p>

+<p>

+  This release contains changed in the analysis engine descriptor and the type system descriptors 

+  and therefore requires an update of the Ruta projects. This can be accomplished, for example, by 

+  right-clicking on the Ruta project, selecting "UIMA Ruta" and then "Update Project".

 </p>

 <p>

   <p>UIMA Ruta Language and Analysis Engine:</p>

   <ul>

-  	<li>The analysis engine is able to generate debug information about inlined rules which includes also an extension of the ruta type system.</li>

-    <li>Type expressions in dot notation for annotation expressions a new supported: a1:ANY a2:ANY{a1.type==a2.type -> Type};</li>

-    <li>Matching on string literals is no more restricted to single RutaBasic annotations, e.g., it is not possible to write: "This is a test"{-> Test};</li>

-    <li>Dictionary matching is now more robust concerning white spaces in the word list. The parameter dictRemoveWS is now also set to true by default.</li>

-    <li>Fixed anchors at composed rule elements.</li>

-    <li>Labels at macro actions are supported now.</li>

-    <li>Fixed several bugs.</li>

+    <li>Depends on UIMA 3.1.1 and uimaFIT 3.0.0</li>

+    <li>Provides compatibility to UIMA v3</li>

   </ul>

   <p>UIMA Ruta Workbench:</p>

   <ul>

-  	<li>New view for visualizing the explanation of inlined rules.</li>

-    <li>Fixed problem with blocked build processes in Ruta projects with many scripts.</li>

-    <li>Fixed bugs.</li>

+    <li>Depends on UIMA v3 and provides compatibility to UIMA v3</li>

   </ul>

 </p>

  

@@ -91,7 +89,8 @@
 <h2><a name="list.issues">5. List of JIRA Issues Fixed in this Release</a></h2>

 

 Click <a href="issuesFixed/jira-report.html">issuesFixed/jira-report.html</a> for the list of 

-issues fixed in this release.

+issues fixed in this release. This list contains all issues that have been fixed to prepare the synchronous releases

+of UIMA Ruta 2.8.0 and UIMA Ruta 3.0.0.

 

 </body>

 </html>
\ No newline at end of file
diff --git a/example-projects/ruta-ep-example-extensions/pom.xml b/example-projects/ruta-ep-example-extensions/pom.xml
index c53acaf..6fe7811 100644
--- a/example-projects/ruta-ep-example-extensions/pom.xml
+++ b/example-projects/ruta-ep-example-extensions/pom.xml
@@ -25,7 +25,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

diff --git a/example-projects/ruta-maven-example/pom.xml b/example-projects/ruta-maven-example/pom.xml
index c56fc91..3a559f6 100644
--- a/example-projects/ruta-maven-example/pom.xml
+++ b/example-projects/ruta-maven-example/pom.xml
@@ -15,7 +15,7 @@
 	<parent>
 		<groupId>org.apache.uima</groupId>
 		<artifactId>ruta-parent</artifactId>
-		<version>2.8.1-SNAPSHOT</version>
+		<version>3.0.0</version>
 		<relativePath>../../ruta-parent/pom.xml</relativePath>
 	</parent>
 	<url>${uimaWebsiteUrl}</url>
@@ -25,9 +25,9 @@
     <uimaScmProject>${project.artifactId}</uimaScmProject>
   </properties>
 	<scm>
-		<url>http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/ruta-maven-example</url>
-		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</connection>
-		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</developerConnection>
+		<url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/example-projects/ruta-maven-example</url>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/example-projects/ruta-maven-example</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/example-projects/ruta-maven-example</developerConnection>
 	</scm>
 	<dependencies>
 		<dependency>
diff --git a/pom.xml b/pom.xml
index 9ec7409..0c47d77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>ruta-parent/pom.xml</relativePath>

   </parent>

 

@@ -22,7 +22,7 @@
   <description>The top project for Apache UIMA Ruta</description>

   <url>${uimaWebsiteUrl}</url>

   <properties>

-    <jiraVersion>12345012</jiraVersion>

+    <jiraVersion>12326294</jiraVersion>

     <!-- 

      <assembly.attach>false</assembly.attach>

      -->

@@ -39,9 +39,9 @@
     elements from the chain of parent poms, if this is omitted. Keeping this a bit factored allows cutting/pasting 

     the <scm> element, and just changing the following two properties -->

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0</developerConnection>

   </scm>

 

   <!-- dependencies used during assembly -->

diff --git a/ruta-basic-type/pom.xml b/ruta-basic-type/pom.xml
index fe82bc8..045930a 100644
--- a/ruta-basic-type/pom.xml
+++ b/ruta-basic-type/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>3.0.0</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
   
@@ -43,9 +43,9 @@
 
   </dependencies>
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-basic-type</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-basic-type</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-basic-type</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-basic-type</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-basic-type</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-basic-type</developerConnection>
   </scm>
   <build>
     <pluginManagement>
diff --git a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
index a2b80f6..dd204b5 100644
--- a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
+++ b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
@@ -18,6 +18,8 @@
  */
 package org.apache.uima.ruta.type;
 
+import java.lang.invoke.CallSite;
+import java.lang.invoke.MethodHandle;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -25,18 +27,17 @@
 
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.TypeSystem;
+import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.cas.impl.TypeSystemImpl;
 import org.apache.uima.cas.text.AnnotationFS;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
 import org.apache.uima.jcas.tcas.Annotation;
 
 /**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
+ * Updated by JCasGen Fri Feb 16 11:29:59 CET 2018 XML source:
+ * C:/work/ws/ws-uima-ruta/ruta-v3/ruta-typesystem/target/jcasgen/typesystem.xml
  * 
  * @generated
  */
@@ -348,45 +349,85 @@
    * @generated
    * @ordered
    */
+  @SuppressWarnings("hiding")
+  public final static String _TypeName = "org.apache.uima.ruta.type.RutaBasic";
+
+  /**
+   * @generated
+   * @ordered
+   */
+  @SuppressWarnings("hiding")
   public final static int typeIndexID = JCasRegistry.register(RutaBasic.class);
 
   /**
    * @generated
    * @ordered
    */
+  @SuppressWarnings("hiding")
   public final static int type = typeIndexID;
 
-  /** @generated */
+  /**
+   * @generated
+   * @return index of the type
+   */
   @Override
   public int getTypeIndexID() {
     return typeIndexID;
   }
 
+  /*
+   * ******************* Feature Offsets *
+   *******************/
+
+  public final static String _FeatName_replacement = "replacement";
+
+  /* Feature Adjusted Offsets */
+  private final static CallSite _FC_replacement = TypeSystemImpl.createCallSite(RutaBasic.class,
+          "replacement");
+
+  private final static MethodHandle _FH_replacement = _FC_replacement.dynamicInvoker();
+
   /**
    * Never called. Disable default constructor
    * 
    * @generated
    */
-  protected RutaBasic() {/* intentionally empty block */
-  }
+  protected RutaBasic() {
+    /* intentionally empty block */}
 
   /**
    * Internal - constructor used by generator
    * 
    * @generated
+   * @param casImpl
+   *          the CAS this Feature Structure belongs to
+   * @param type
+   *          the type of this Feature Structure
    */
-  public RutaBasic(int addr, TOP_Type type) {
-    super(addr, type);
+  public RutaBasic(TypeImpl type, CASImpl casImpl) {
+    super(type, casImpl);
     readObject();
   }
 
-  /** @generated */
+  /**
+   * @generated
+   * @param jcas
+   *          JCas to which this Feature Structure belongs
+   */
   public RutaBasic(JCas jcas) {
     super(jcas);
     readObject();
   }
 
-  /** @generated */
+  /**
+   * @generated
+   * @param jcas
+   *          JCas to which this Feature Structure belongs
+   * @param begin
+   *          offset to the begin spot in the SofA
+   * @param end
+   *          offset to the end spot in the SofA
+   */
   public RutaBasic(JCas jcas, int begin, int end) {
     super(jcas);
     setBegin(begin);
@@ -396,36 +437,34 @@
 
   /**
    * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
+   *
    * @generated modifiable
    */
   private void readObject() {
-  }
+    /* default - does nothing empty block */}
 
   // *--------------*
-  // * Feature: Replacement
+  // * Feature: replacement
 
   /**
-   * getter for Replacement - gets
+   * getter for replacement - gets
    * 
    * @generated
+   * @return value of the feature
    */
   public String getReplacement() {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaBasic_Type) jcasType).casFeatCode_replacement);
+    return _getStringValueNc(wrapGetIntCatchException(_FH_replacement));
   }
 
   /**
-   * setter for Replacement - sets
+   * setter for replacement - sets
    * 
    * @generated
+   * @param v
+   *          value to set into the feature
    */
   public void setReplacement(String v) {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaBasic_Type) jcasType).casFeatCode_replacement, v);
+    _setStringValueNfc(wrapGetIntCatchException(_FH_replacement), v);
   }
 
 }
diff --git a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
deleted file mode 100644
index 0b6f364..0000000
--- a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class RutaBasic_Type extends Annotation_Type {
-  /** @generated */
-  @SuppressWarnings({ "unchecked", "rawtypes" })
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  @SuppressWarnings("rawtypes")
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaBasic_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaBasic_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaBasic(addr, RutaBasic_Type.this);
-          RutaBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaBasic(addr, RutaBasic_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaBasic.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaBasic");
-
-  /** @generated */
-  final Feature casFeat_replacement;
-
-  /** @generated */
-  final int casFeatCode_replacement;
-
-  /** @generated */
-  public String getReplacement(int addr) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_replacement);
-  }
-
-  /** @generated */
-  public void setReplacement(int addr, String v) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    ll_cas.ll_setStringValue(addr, casFeatCode_replacement, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaBasic_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_replacement = jcas.getRequiredFeatureDE(casType, "replacement", "uima.cas.String",
-            featOkTst);
-    casFeatCode_replacement = (null == casFeat_replacement) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_replacement).getCode();
-
-  }
-}
diff --git a/ruta-core-ext/pom.xml b/ruta-core-ext/pom.xml
index e156247..7ac9a59 100644
--- a/ruta-core-ext/pom.xml
+++ b/ruta-core-ext/pom.xml
@@ -21,7 +21,7 @@
 	<parent>
 		<groupId>org.apache.uima</groupId>
 		<artifactId>ruta-parent</artifactId>
-		<version>2.8.1-SNAPSHOT</version>
+		<version>3.0.0</version>
 		<relativePath>../ruta-parent/pom.xml</relativePath>
 	</parent>
 	<properties>
@@ -47,9 +47,9 @@
     </dependency>
 	</dependencies>
 	<scm>
-		<url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core-ext</url>
-		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-core-ext</connection>
-		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-core-ext</developerConnection>
+		<url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core-ext</url>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core-ext</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core-ext</developerConnection>
 	</scm>
 	<build>
 		<pluginManagement>
diff --git a/ruta-core/pom.xml b/ruta-core/pom.xml
index cb92108..f9e9916 100644
--- a/ruta-core/pom.xml
+++ b/ruta-core/pom.xml
@@ -13,11 +13,11 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <artifactId>ruta-core</artifactId>

-  <version>2.8.1-SNAPSHOT</version>

+  <version>3.0.0</version>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

   

@@ -139,9 +139,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-core</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-core</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-core</developerConnection>

   </scm>

   <build>

     <pluginManagement>

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java b/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
index a6e630e..855ff9b 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
@@ -194,8 +194,10 @@
 

   public FSIterator<AnnotationFS> createFilteredIterator(CAS cas, Type basicType) {

     if (windowAnnotation != null) {

-      FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType)

-              .subiterator(windowAnnotation);

+      FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType).select()

+              .coveredBy(windowAnnotation).fsIterator();

+//     was: FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType)

+//              .subiterator(windowAnnotation);

       FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(windowIt,

               createCurrentConstraint(false));

       return iterator;

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
index 9e5e250..22f8cfd 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
@@ -50,7 +50,6 @@
 import org.apache.uima.cas.StringArrayFS;

 import org.apache.uima.cas.Type;

 import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.impl.FSIteratorImplBase;

 import org.apache.uima.cas.text.AnnotationFS;

 import org.apache.uima.cas.text.AnnotationIndex;

 import org.apache.uima.fit.util.CasUtil;

@@ -87,7 +86,7 @@
 import org.apache.uima.ruta.utils.UIMAUtils;

 import org.apache.uima.ruta.visitor.InferenceCrowd;

 

-public class RutaStream extends FSIteratorImplBase<AnnotationFS> {

+public class RutaStream {

 

   private final CAS cas;

 

@@ -200,7 +199,9 @@
   private void updateIterators(CAS cas, Type basicType, FilterManager filter,

           AnnotationFS additionalWindow) {

     if (additionalWindow != null) {

-      this.basicIt = cas.getAnnotationIndex(basicType).subiterator(additionalWindow);

+      this.basicIt = cas.getAnnotationIndex(basicType).select().coveredBy(additionalWindow)

+              .fsIterator();

+      // was: this.basicIt = cas.getAnnotationIndex(basicType).subiterator(additionalWindow);

     } else {

       this.basicIt = cas.getAnnotationIndex(basicType).iterator();

     }

@@ -493,8 +494,7 @@
     return stream;

   }

 

-  @Override

-  public FSIterator<AnnotationFS> copy() {

+  public RutaStream copy() {

     RutaStream stream = new RutaStream(cas, basicType, beginAnchors, endAnchors, filter,

             lowMemoryProfile, simpleGreedyForComposed, emptyIsInvisible, typeUsage, crowd);

     stream.setDynamicAnchoring(dynamicAnchoring);

@@ -505,17 +505,14 @@
     return stream;

   }

 

-  @Override

   public AnnotationFS get() throws NoSuchElementException {

     return currentIt.get();

   }

 

-  @Override

   public boolean isValid() {

     return currentIt.isValid();

   }

 

-  @Override

   public void moveTo(FeatureStructure fs) {

     try {

       currentIt.moveTo(fs);

@@ -524,22 +521,26 @@
     }

   }

 

-  @Override

+  public boolean hasNext() {

+    return currentIt.hasNext();

+  }

+

+  public AnnotationFS next() {

+    return currentIt.next();

+  }

+

   public void moveToFirst() {

     currentIt.moveToFirst();

   }

 

-  @Override

   public void moveToLast() {

     currentIt.moveToLast();

   }

 

-  @Override

   public void moveToNext() {

     currentIt.moveToNext();

   }

 

-  @Override

   public void moveToPrevious() {

     currentIt.moveToPrevious();

   }

@@ -691,7 +692,10 @@
     }

     FSMatchConstraint defaultConstraint = filter.getDefaultConstraint();

     FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(

-            cas.getAnnotationIndex(basicType).subiterator(windowAnnotation), defaultConstraint);

+            cas.getAnnotationIndex(basicType).select().coveredBy(windowAnnotation).fsIterator(),

+            defaultConstraint);

+//    FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(

+//            cas.getAnnotationIndex(basicType).subiterator(windowAnnotation), defaultConstraint);

 

     while (iterator.isValid()) {

       result.add((RutaBasic) iterator.get());

@@ -728,6 +732,10 @@
     return basicIt;

   }

 

+  public FSIterator<AnnotationFS> getCurrentIterator() {

+    return currentIt;

+  }

+

   public AnnotationFS getDocumentAnnotation() {

     return documentAnnotation;

   }

@@ -890,6 +898,9 @@
     Set<Type> currentHiddenTypes = filter.getCurrentHiddenTypes();

     RutaBasic beginAnchor = getBeginAnchor(begin);

     if (beginAnchor != null) {

+      if (beginAnchor.isEmpty() && emptyIsInvisible) {

+        return false;

+      }

       for (Type type : currentHiddenTypes) {

         boolean partOf = beginAnchor.isPartOf(type);

         if (partOf) {

@@ -899,6 +910,9 @@
     }

     RutaBasic endAnchor = getEndAnchor(end);

     if (endAnchor != null) {

+      if (endAnchor.isEmpty() && emptyIsInvisible) {

+        return false;

+      }

       for (Type type : currentHiddenTypes) {

         boolean partOf = endAnchor.isPartOf(type);

         if (partOf) {

@@ -933,9 +947,13 @@
                     || windowAnnotation.getEnd() != cas.getDocumentAnnotation().getEnd())) {

       AnnotationFS frame = cas.createAnnotation(cas.getTypeSystem().getType(RutaEngine.FRAME_TYPE),

               windowAnnotation.getBegin(), windowAnnotation.getEnd());

-      FSIterator<AnnotationFS> subiterator = cas.getAnnotationIndex(type).subiterator(frame);

-      while (subiterator.hasNext()) {

-        AnnotationFS each = subiterator.next();

+      FSIterator<AnnotationFS> iterator = cas.getAnnotationIndex(type).select().coveredBy(frame)

+              .fsIterator();

+      // was: FSIterator<AnnotationFS> subiterator =

+      // cas.getAnnotationIndex(type).subiterator(frame);

+

+      while (iterator.hasNext()) {

+        AnnotationFS each = iterator.next();

         if (isVisible(each)) {

           result.add(each);

         }

@@ -1008,12 +1026,12 @@
       if (value instanceof IStringListExpression) {

         IStringListExpression stringListExpr = (IStringListExpression) value;

         List<String> stringList = stringListExpr.getStringList(context, this);

-        StringArrayFS stringArray = FSCollectionFactory.createStringArray(cas, stringList);

+        StringArrayFS stringArray = FSCollectionFactory.createStringArrayFS(cas, stringList);

         annotation.setFeatureValue(feature, stringArray);

       } else if (value instanceof IStringExpression) {

         IStringExpression stringExpr = (IStringExpression) value;

         String string = stringExpr.getStringValue(context, this);

-        StringArrayFS array = FSCollectionFactory.createStringArray(cas, new String[] { string });

+        StringArrayFS array = FSCollectionFactory.createStringArrayFS(cas, new String[] { string });

         annotation.setFeatureValue(feature, array);

       }

     } else if (rangeName.equals(CAS.TYPE_NAME_INTEGER) || rangeName.equals(CAS.TYPE_NAME_LONG)

@@ -1035,12 +1053,13 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         int v = numberExpr.getIntegerValue(context, this);

-        IntArrayFS array = FSCollectionFactory.createIntArray(cas, new int[] { v });

+        IntArrayFS array = FSCollectionFactory.createIntArrayFS(cas, new int[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        IntArrayFS array = FSCollectionFactory.createIntArray(cas, RutaListUtils.toIntArray(list));

+        IntArrayFS array = FSCollectionFactory.createIntArrayFS(cas,

+                RutaListUtils.toIntArray(list));

         annotation.setFeatureValue(feature, array);

       }

     } else if (rangeName.equals(CAS.TYPE_NAME_DOUBLE)) {

@@ -1053,12 +1072,12 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         double v = numberExpr.getDoubleValue(context, this);

-        DoubleArrayFS array = FSCollectionFactory.createDoubleArray(cas, new double[] { v });

+        DoubleArrayFS array = FSCollectionFactory.createDoubleArrayFS(cas, new double[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        DoubleArrayFS array = FSCollectionFactory.createDoubleArray(cas,

+        DoubleArrayFS array = FSCollectionFactory.createDoubleArrayFS(cas,

                 RutaListUtils.toDoubleArray(list));

         annotation.setFeatureValue(feature, array);

       }

@@ -1072,12 +1091,12 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         float v = numberExpr.getFloatValue(context, this);

-        FloatArrayFS array = FSCollectionFactory.createFloatArray(cas, new float[] { v });

+        FloatArrayFS array = FSCollectionFactory.createFloatArrayFS(cas, new float[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        FloatArrayFS array = FSCollectionFactory.createFloatArray(cas,

+        FloatArrayFS array = FSCollectionFactory.createFloatArrayFS(cas,

                 RutaListUtils.toFloatArray(list));

         annotation.setFeatureValue(feature, array);

       }

@@ -1091,12 +1110,12 @@
       if (value instanceof IBooleanListExpression) {

         IBooleanListExpression expr = (IBooleanListExpression) value;

         List<Boolean> list = expr.getBooleanList(context, this);

-        BooleanArrayFS array = FSCollectionFactory.createBooleanArray(cas, list);

+        BooleanArrayFS array = FSCollectionFactory.createBooleanArrayFS(cas, list);

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof IBooleanExpression) {

         IBooleanExpression expr = (IBooleanExpression) value;

         Boolean v = expr.getBooleanValue(context, this);

-        BooleanArrayFS array = FSCollectionFactory.createBooleanArray(cas, new boolean[] { v });

+        BooleanArrayFS array = FSCollectionFactory.createBooleanArrayFS(cas, new boolean[] { v });

         annotation.setFeatureValue(feature, array);

       }

     } else if (value instanceof AnnotationTypeExpression && !range.isPrimitive()) {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java b/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
index 4330eed..e788e7a 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
@@ -67,7 +67,7 @@
     int minValue = min.getIntegerValue(context, stream);

     boolean forwardValue = forward.getBooleanValue(context, stream);

 

-    FSIterator<AnnotationFS> it = filtered.getBooleanValue(context, stream) ? stream

+    FSIterator<AnnotationFS> it = filtered.getBooleanValue(context, stream) ? stream.getCurrentIterator()

             : stream.getUnfilteredBasicIterator();

     AnnotationFS pointer = null;

     if (forwardValue) {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
index 74047d7..c382c38 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
@@ -823,7 +823,7 @@
 

     Collection<AnnotationFS> results = new HashSet<AnnotationFS>();

     stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

+    RutaStream streamPointer = stream.copy();

 

     while (stream.isValid()) {

       RutaBasic anchorBasic = (RutaBasic) stream.get();

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java b/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
index 7c9d6e7..4c1ca1e 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
@@ -329,7 +329,7 @@
           char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {

     ArrayList<AnnotationFS> results = new ArrayList<AnnotationFS>();

     stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

+    RutaStream streamPointer = stream.copy();

     while (stream.isValid()) {

       RutaBasic anchorBasic = (RutaBasic) stream.get();

       streamPointer.moveTo(anchorBasic);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
index 8c3ab92..c053d20 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
@@ -18,13 +18,17 @@
  */
 package org.apache.uima.ruta.rule;
 
+import java.util.Comparator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
+import org.apache.commons.lang3.NotImplementedException;
 import org.apache.uima.cas.FSIterator;
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.impl.FSIteratorImplBase;
+import org.apache.uima.cas.impl.LowLevelIndex;
 import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.jcas.cas.TOP;
 
 public class AnnotationListFSIterator extends FSIteratorImplBase<AnnotationFS> {
 
@@ -89,4 +93,94 @@
     return new AnnotationListFSIterator(list);
   }
 
+  @Override
+  public int ll_indexSizeMaybeNotCurrent() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public LowLevelIndex<AnnotationFS> ll_getIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int ll_maxAnnotSpan() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean isIndexesHaveBeenUpdated() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean maybeReinitIterator() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToFirstNoReinit() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToLastNoReinit() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToNoReinit(FeatureStructure fs) {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public Comparator<TOP> getComparator() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public AnnotationFS getNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToNextNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToPreviousNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean hasPrevious() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public AnnotationFS previous() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int nextIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int previousIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void set(AnnotationFS e) {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void add(AnnotationFS e) {
+    throw new NotImplementedException("Not supported.");
+  }
+
 }
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
index 474b03e..37239c8 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
@@ -106,95 +106,67 @@
     if (annotation.getEnd() == stream.getDocumentAnnotation().getEnd()) {
       return Collections.emptyList();
     }
-    RutaBasic lastBasic = stream.getEndAnchor(annotation.getEnd());
-    int end = 0;
-    if (lastBasic == null) {
-      if (annotation.getEnd() != 0) {
-        return Collections.emptyList();
-      }
-    } else {
-      end = lastBasic.getEnd();
-    }
-    if (end == stream.getDocumentAnnotation().getBegin()) {
-      // non existing wildcard match
-      stream.moveToFirst();
-    } else if (annotation.getEnd() > 0) {
-      stream.moveTo(lastBasic);
-      if (stream.isVisible(lastBasic) && stream.isValid()
-              && stream.get().getEnd() == lastBasic.getEnd()) {
-        stream.moveToNext();
-      }
-    } else {
-      stream.moveToFirst();
+    RutaBasic nextBasic = stream.getBasicNextTo(false, annotation);
+    if (nextBasic == null) {
+      return Collections.emptyList();
     }
 
-    if (stream.isValid()) {
-      RutaBasic nextBasic = (RutaBasic) stream.get();
-      // TODO HOTFIX for annotation of length 0
-      while (stream.isValid() && nextBasic.getBegin() < end) {
-        stream.moveToNext();
-        if (stream.isValid()) {
-          nextBasic = (RutaBasic) stream.get();
+    MatchContext context = new MatchContext(parent);
+    // just for forcing expression top initialize
+    expression.getType(context, stream);
+    if (expression.getAnnotationExpression() != null) {
+
+      AnnotationFS ref = expression.getAnnotation(context, stream);
+      if (ref != null) {
+        boolean beginsWith = nextBasic.getBegin() == ref.getBegin();
+        if (beginsWith) {
+          Collection<AnnotationFS> result = new ArrayList<>(1);
+          result.add(ref);
+          return result;
         }
       }
-
-      MatchContext context = new MatchContext(parent);
-      // just for forcing expression top initialize
-      expression.getType(context, stream);
-      if (expression.getAnnotationExpression() != null) {
-
-        AnnotationFS ref = expression.getAnnotation(context, stream);
-        if (ref != null) {
-          boolean beginsWith = nextBasic.getBegin() == ref.getBegin();
-          if (beginsWith) {
-            Collection<AnnotationFS> result = new ArrayList<>(1);
-            result.add(ref);
-            return result;
-          }
+    } else if (expression.getAnnotationListExpression() != null) {
+      List<AnnotationFS> annotations = expression.getAnnotationList(context, stream);
+      Collection<AnnotationFS> result = new ArrayList<>();
+      for (AnnotationFS each : annotations) {
+        boolean beginsWith = nextBasic.getBegin() == each.getBegin();
+        if (beginsWith) {
+          result.add(each);
         }
-      } else if (expression.getAnnotationListExpression() != null) {
-        List<AnnotationFS> annotations = expression.getAnnotationList(context, stream);
-        Collection<AnnotationFS> result = new ArrayList<>();
-        for (AnnotationFS each : annotations) {
-          boolean beginsWith = nextBasic.getBegin() == each.getBegin();
-          if (beginsWith) {
-            result.add(each);
-          }
-        }
-        return result;
+      }
+      return result;
+    } else {
+      List<Type> types = null;
+      if (expression.getTypeListExpression() != null) {
+        types = expression.getTypeListExpression().getTypeList(context, stream);
       } else {
-        List<Type> types = null;
-        if (expression.getTypeListExpression() != null) {
-          types = expression.getTypeListExpression().getTypeList(context, stream);
-        } else {
-          Type type = getType(context.getParent(), stream);
-          types = new ArrayList<>(1);
-          types.add(type);
-        }
-        List<AnnotationFS> annotations = new ArrayList<>();
-        for (Type type : types) {
-          Collection<AnnotationFS> anchors = new ArrayList<>();
-          Collection<AnnotationFS> beginAnchors = nextBasic.getBeginAnchors(type);
-          if (beginAnchors != null) {
-            for (AnnotationFS afs : beginAnchors) {
-              if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()
-                      && afs.getEnd() <= stream.getDocumentAnnotation().getEnd()) {
-                anchors.add(afs);
-              }
+        Type type = getType(context.getParent(), stream);
+        types = new ArrayList<>(1);
+        types.add(type);
+      }
+      List<AnnotationFS> annotations = new ArrayList<>();
+      for (Type type : types) {
+        Collection<AnnotationFS> anchors = new ArrayList<>();
+        Collection<AnnotationFS> beginAnchors = nextBasic.getBeginAnchors(type);
+        if (beginAnchors != null) {
+          for (AnnotationFS afs : beginAnchors) {
+            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()
+                    && afs.getEnd() <= stream.getDocumentAnnotation().getEnd()) {
+              anchors.add(afs);
             }
           }
-          if (expression.getFeatureExpression() != null) {
-            annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
-                    CHECK_ON_FEATURE, context, stream));
-          } else {
-            annotations.addAll(anchors);
-          }
-
         }
-        return annotations;
-      }
+        if (expression.getFeatureExpression() != null) {
+          annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
+                  CHECK_ON_FEATURE, context, stream));
+        } else {
+          annotations.addAll(anchors);
+        }
 
+      }
+      return annotations;
     }
+
     return Collections.emptyList();
   }
 
@@ -204,80 +176,61 @@
     if (annotation.getBegin() == stream.getDocumentAnnotation().getBegin()) {
       return Collections.emptyList();
     }
-    RutaBasic firstBasic = stream.getBeginAnchor(annotation.getBegin());
-    if (firstBasic == null) {
+    RutaBasic nextBasic = stream.getBasicNextTo(true, annotation);
+    if (nextBasic == null) {
       return Collections.emptyList();
     }
-    stream.moveTo(firstBasic);
-    if (stream.isVisible(firstBasic)) {
-      stream.moveToPrevious();
-    }
-    if (firstBasic.getBegin() == stream.getDocumentAnnotation().getEnd()) {
-      // non existing wildcard match
-      stream.moveToLast();
-    }
 
-    if (stream.isValid()) {
-      RutaBasic nextBasic = (RutaBasic) stream.get();
-      // TODO HOTFIX for annotation of length 0
-      while (stream.isValid() && nextBasic.getEnd() > firstBasic.getBegin()) {
-        stream.moveToPrevious();
-        if (stream.isValid()) {
-          nextBasic = (RutaBasic) stream.get();
-        }
+    MatchContext context = new MatchContext(parent);
+    // just for forcing expression top initialize
+    expression.getType(context, stream);
+    if (expression.getAnnotationExpression() != null) {
+      AnnotationFS ref = expression.getAnnotationExpression().getAnnotation(context, stream);
+      boolean endsWith = nextBasic.getEnd() == ref.getEnd();
+      if (endsWith) {
+        Collection<AnnotationFS> result = new ArrayList<>(1);
+        result.add(ref);
+        return result;
       }
-
-      MatchContext context = new MatchContext(parent);
-      // just for forcing expression top initialize
-      expression.getType(context, stream);
-      if (expression.getAnnotationExpression() != null) {
-        AnnotationFS ref = expression.getAnnotationExpression().getAnnotation(context, stream);
-        boolean endsWith = nextBasic.getEnd() == ref.getEnd();
+    } else if (expression.getAnnotationListExpression() != null) {
+      List<AnnotationFS> annotations = expression.getAnnotationListExpression()
+              .getAnnotationList(context, stream);
+      for (AnnotationFS each : annotations) {
+        boolean endsWith = nextBasic.getEnd() == each.getEnd();
         if (endsWith) {
-          Collection<AnnotationFS> result = new ArrayList<>(1);
-          result.add(ref);
+          Collection<AnnotationFS> result = new ArrayList<>();
+          result.add(each);
           return result;
         }
-      } else if (expression.getAnnotationListExpression() != null) {
-        List<AnnotationFS> annotations = expression.getAnnotationListExpression()
-                .getAnnotationList(context, stream);
-        for (AnnotationFS each : annotations) {
-          boolean endsWith = nextBasic.getEnd() == each.getEnd();
-          if (endsWith) {
-            Collection<AnnotationFS> result = new ArrayList<>();
-            result.add(each);
-            return result;
-          }
-        }
+      }
+    } else {
+      List<Type> types = null;
+      if (expression.getTypeListExpression() != null) {
+        types = expression.getTypeListExpression().getTypeList(context, stream);
       } else {
-        List<Type> types = null;
-        if (expression.getTypeListExpression() != null) {
-          types = expression.getTypeListExpression().getTypeList(context, stream);
-        } else {
-          Type type = getType(context.getParent(), stream);
-          types = new ArrayList<>(1);
-          types.add(type);
-        }
-        List<AnnotationFS> annotations = new ArrayList<>();
-        for (Type type : types) {
-          Collection<AnnotationFS> anchors = new ArrayList<>();
-          Collection<AnnotationFS> endAnchors = nextBasic.getEndAnchors(type);
-          if (endAnchors != null) {
-            for (AnnotationFS afs : endAnchors) {
-              if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()) {
-                anchors.add(afs);
-              }
+        Type type = getType(context.getParent(), stream);
+        types = new ArrayList<>(1);
+        types.add(type);
+      }
+      List<AnnotationFS> annotations = new ArrayList<>();
+      for (Type type : types) {
+        Collection<AnnotationFS> anchors = new ArrayList<>();
+        Collection<AnnotationFS> endAnchors = nextBasic.getEndAnchors(type);
+        if (endAnchors != null) {
+          for (AnnotationFS afs : endAnchors) {
+            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()) {
+              anchors.add(afs);
             }
           }
-          if (expression.getFeatureExpression() != null) {
-            annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
-                    CHECK_ON_FEATURE, context, stream));
-          } else {
-            annotations.addAll(anchors);
-          }
         }
-        return annotations;
+        if (expression.getFeatureExpression() != null) {
+          annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
+                  CHECK_ON_FEATURE, context, stream));
+        } else {
+          annotations.addAll(anchors);
+        }
       }
+      return annotations;
     }
     return Collections.emptyList();
   }
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
index 76c7285..08564d8 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
@@ -27,11 +27,9 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;

 import org.apache.commons.lang3.tuple.Pair;

 import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

 import org.apache.uima.cas.FSIterator;

 import org.apache.uima.cas.Type;

 import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

 import org.apache.uima.ruta.RutaEnvironment;

 import org.apache.uima.ruta.RutaStream;

 import org.apache.uima.ruta.action.AbstractRutaAction;

@@ -41,7 +39,6 @@
 import org.apache.uima.ruta.expression.AnnotationTypeExpression;

 import org.apache.uima.ruta.expression.string.IStringExpression;

 import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.type.RutaFrame;

 import org.apache.uima.ruta.visitor.InferenceCrowd;

 

 public class WildCardRuleElement extends AbstractRuleElement {

@@ -505,14 +502,20 @@
     } else {

       iterator = getIteratorOfType(after, defaultType, annotation, stream);

     }

-    if (iterator != null && iterator.isValid() && iterator.get().equals(annotation)) {

-      moveOn(after, iterator, stream);

+    if (annotation != null && iterator != null && iterator.isValid()) {

+      AnnotationFS pointer = iterator.get();

+      if ((after && pointer.getEnd() == annotation.getEnd())

+              || (!after && pointer.getBegin() == annotation.getBegin())) {

+        moveOn(after, iterator, stream);

+      }

     }

     return iterator;

   }

 

   private FSIterator<AnnotationFS> getIteratorOfType(boolean after, Type type,

           AnnotationFS annotation, RutaStream stream) {

+    // TODO reimplement with cas select logic

+

     CAS cas = stream.getCas();

     // TODO adapt logic to changes in UIMA iterator behavior!

     FSIterator<AnnotationFS> result = null;

@@ -559,23 +562,17 @@
         }

       }

     } else {

-      JCas jcas = null;

-      try {

-        jcas = cas.getJCas();

-      } catch (CASException e) {

-        e.printStackTrace();

-      }

-      RutaFrame window = new RutaFrame(jcas, stream.getDocumentAnnotation().getBegin(),

-              stream.getDocumentAnnotation().getEnd());

+

+      result = cas.getAnnotationIndex(type).select().coveredBy(stream.getDocumentAnnotation())

+              .fsIterator();

       if (annotation == null) {

-        result = cas.getAnnotationIndex(type).subiterator(window);

       } else {

-        result = cas.getAnnotationIndex(type).subiterator(window);

         AnnotationFS pointer = stream.getAnchor(after, annotation);

         result.moveTo(pointer);

+

         if (!result.isValid()) {

           if (after) {

-            // result.moveToFirst();

+//            result.moveToFirst();

           } else {

             // TODO due to type priorities: RutaBasic is last -> moveTo will not work

             result.moveToLast();

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java
index 18ff5b7..da7b55a 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/NewCASPipelineTest.java
@@ -23,6 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.uima.UIMAFramework;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineDescription;
 import org.apache.uima.cas.CAS;
@@ -30,6 +31,7 @@
 import org.apache.uima.fit.factory.AnalysisEngineFactory;
 import org.apache.uima.fit.factory.TypeSystemDescriptionFactory;
 import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.resource.ResourceManager;
 import org.apache.uima.resource.metadata.ResourceMetaData;
 import org.apache.uima.resource.metadata.TypeSystemDescription;
 import org.apache.uima.ruta.engine.RutaEngine;
@@ -60,7 +62,9 @@
     ruta.getAnalysisEngineMetaData().getTypeSystem().addType(TEST_TYPE, "Type for Testing",
             "uima.tcas.Annotation");
 
-    return AnalysisEngineFactory.createEngine(ruta);
+    ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager();
+
+    return UIMAFramework.produceAnalysisEngine(ruta, resourceManager, null);
   }
 
   @Test
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/DummySeeder.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/DummySeeder.java
index 840f8dc..b403f03 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/DummySeeder.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/DummySeeder.java
@@ -1,37 +1,37 @@
-/*
- * 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.ruta.engine;
-
-import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.ruta.seed.RutaAnnotationSeeder;
-import org.apache.uima.ruta.seed.TextSeeder;
-
-public class DummySeeder implements RutaAnnotationSeeder{
-
-  @Override
-  public Type seed(String text, CAS cas) {
-    Type type = cas.getTypeSystem().getType(TextSeeder.seedType);
-    AnnotationFS annotation = cas.createAnnotation(type, 0, text.length());
-    cas.addFsToIndexes(annotation);
-    return type;
-  }
-
-}
+/*

+ * 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.ruta.engine;

+

+import org.apache.uima.cas.CAS;

+import org.apache.uima.cas.Type;

+import org.apache.uima.cas.text.AnnotationFS;

+import org.apache.uima.ruta.seed.RutaAnnotationSeeder;

+import org.apache.uima.ruta.seed.TextSeeder;

+

+public class DummySeeder implements RutaAnnotationSeeder{

+

+  @Override

+  public Type seed(String text, CAS cas) {

+    Type type = cas.getTypeSystem().getType(TextSeeder.seedType);

+    AnnotationFS annotation = cas.createAnnotation(type, 0, text.length());

+    cas.addFsToIndexes(annotation);

+    return type;

+  }

+

+}

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
index 4dc4595..2cb8fc9 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
@@ -1,50 +1,50 @@
-/*
- * 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.ruta.engine;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.util.JCasUtil;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.ruta.type.ALL;
-import org.apache.uima.ruta.type.TruePositive;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class MultipleSeedersTest {
-
-  @Test
-  public void test() throws ResourceInitializationException, AnalysisEngineProcessException {
-    
-    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, 
-            RutaEngine.PARAM_RULES, "TokenSeed{-> TruePositive};",
-            RutaEngine.PARAM_SEEDERS, new String[] {DummySeeder.class.getName(),DummySeeder.class.getName()});
-    
-    JCas jcas = ae.newJCas();
-    jcas.setDocumentText("Dummy text.");
-    ae.process(jcas);
-    
-    Assert.assertEquals(2, JCasUtil.select(jcas, TruePositive.class).size());
-    Assert.assertEquals(0, JCasUtil.select(jcas, ALL.class).size());
-    
-  }
-  
-}
+/*

+ * 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.ruta.engine;

+

+import org.apache.uima.analysis_engine.AnalysisEngine;

+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

+import org.apache.uima.fit.factory.AnalysisEngineFactory;

+import org.apache.uima.fit.util.JCasUtil;

+import org.apache.uima.jcas.JCas;

+import org.apache.uima.resource.ResourceInitializationException;

+import org.apache.uima.ruta.type.ALL;

+import org.apache.uima.ruta.type.TruePositive;

+import org.junit.Assert;

+import org.junit.Test;

+

+public class MultipleSeedersTest {

+

+  @Test

+  public void test() throws ResourceInitializationException, AnalysisEngineProcessException {

+    

+    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, 

+            RutaEngine.PARAM_RULES, "TokenSeed{-> TruePositive};",

+            RutaEngine.PARAM_SEEDERS, new String[] {DummySeeder.class.getName(),DummySeeder.class.getName()});

+    

+    JCas jcas = ae.newJCas();

+    jcas.setDocumentText("Dummy text.");

+    ae.process(jcas);

+    

+    Assert.assertEquals(2, JCasUtil.select(jcas, TruePositive.class).size());

+    Assert.assertEquals(0, JCasUtil.select(jcas, ALL.class).size());

+    

+  }

+  

+}

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/NoSeedersTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/NoSeedersTest.java
index 3ec0e0f..74dba86 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/NoSeedersTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/NoSeedersTest.java
@@ -30,7 +30,7 @@
   public void test() throws Exception {
     CAS cas = RutaTestUtils.getCAS("This is a test.");
     JCas jcas = cas.getJCas();
-    
+
     String script = "";
     script += "\"This\"-> T1;";
     script += "\"is\"-> T2;";
@@ -41,13 +41,12 @@
     script += "T1{-> T7};";
     script += "T2 T3{-> T8};";
     script += "T1 # T4{-> T9};";
-    
-    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, 
-            RutaEngine.PARAM_RULES, script,
-            RutaEngine.PARAM_SEEDERS, new String[0]);
-    
+
+    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, RutaEngine.PARAM_RULES,
+            script, RutaEngine.PARAM_SEEDERS, new String[0]);
+
     ae.process(jcas);
-    
+
     RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "This");
     RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "is", "is");
     RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "a");
@@ -57,7 +56,7 @@
     RutaTestUtils.assertAnnotationsEquals(cas, 7, 1, "This");
     RutaTestUtils.assertAnnotationsEquals(cas, 8, 1, "a");
     RutaTestUtils.assertAnnotationsEquals(cas, 9, 1, "test");
-    
+
   }
-  
+
 }
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
index 927226c..6588a91 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
@@ -1,76 +1,76 @@
-/*
- * 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.ruta.resource;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.IOException;
-
-import org.junit.Test;
-
-public class CSVTableTest {
-  private static final String CUSTOM_SEPARATOR = "#|#";
-
-  @Test
-  public void testDefaultLookup() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CSVTable.DEFAULT_CSV_SEPARATOR);
-    checkValue(csvTable, 0, 0, "this is the first line first column");
-    checkValue(csvTable, 0, 1, "ONE");
-    checkValue(csvTable, 1, 0, "this is the second line first column");
-    checkValue(csvTable, 1, 1, "TWO");
-    checkValue(csvTable, 2, 0, "this is the a line with custom");
-    checkValue(csvTable, 2, 1, " non default separator used#|#THREE");
-  }
-
-  @Test
-  public void testDefaultLookupWithEmptyColumn() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CSVTable.DEFAULT_CSV_SEPARATOR);
-    checkValue(csvTable, 3, 0, "line with empty column");
-    checkValue(csvTable, 3, 1, " "); // spacer added by table implementation
-    checkValue(csvTable, 3, 2, "AFTER_EMPTY_COLUMN");
-  }
-
-  @Test
-  public void testLookupWithCustomSeparator() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CUSTOM_SEPARATOR);
-    checkValue(csvTable, 0, 0, "this is the first line first column;ONE");
-    checkValue(csvTable, 1, 0, "this is the second line first column;TWO");
-    checkValue(csvTable, 2, 0, "this is the a line with custom; non default separator used");
-    checkValue(csvTable, 2, 1, "THREE");
-  }
-
-  @Test
-  public void testLookupWithCustomSeparatorAndEmptyColumn() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CUSTOM_SEPARATOR);
-    checkValue(csvTable, 4, 0, "line with empty column custom separator");
-    checkValue(csvTable, 4, 1, " "); // spacer added by table implementation
-    checkValue(csvTable, 4, 2, "AFTER_EMPTY_COLUMN2");
-  }
-
-  private void checkValue(CSVTable table, int row, int column, String expectedValue) {
-    String actualValue = table.getEntry(row, column);
-    assertThat(actualValue, is(expectedValue));
-  }
-
+/*

+ * 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.ruta.resource;

+

+import static org.hamcrest.CoreMatchers.is;

+import static org.junit.Assert.assertThat;

+

+import java.io.IOException;

+

+import org.junit.Test;

+

+public class CSVTableTest {

+  private static final String CUSTOM_SEPARATOR = "#|#";

+

+  @Test

+  public void testDefaultLookup() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CSVTable.DEFAULT_CSV_SEPARATOR);

+    checkValue(csvTable, 0, 0, "this is the first line first column");

+    checkValue(csvTable, 0, 1, "ONE");

+    checkValue(csvTable, 1, 0, "this is the second line first column");

+    checkValue(csvTable, 1, 1, "TWO");

+    checkValue(csvTable, 2, 0, "this is the a line with custom");

+    checkValue(csvTable, 2, 1, " non default separator used#|#THREE");

+  }

+

+  @Test

+  public void testDefaultLookupWithEmptyColumn() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CSVTable.DEFAULT_CSV_SEPARATOR);

+    checkValue(csvTable, 3, 0, "line with empty column");

+    checkValue(csvTable, 3, 1, " "); // spacer added by table implementation

+    checkValue(csvTable, 3, 2, "AFTER_EMPTY_COLUMN");

+  }

+

+  @Test

+  public void testLookupWithCustomSeparator() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CUSTOM_SEPARATOR);

+    checkValue(csvTable, 0, 0, "this is the first line first column;ONE");

+    checkValue(csvTable, 1, 0, "this is the second line first column;TWO");

+    checkValue(csvTable, 2, 0, "this is the a line with custom; non default separator used");

+    checkValue(csvTable, 2, 1, "THREE");

+  }

+

+  @Test

+  public void testLookupWithCustomSeparatorAndEmptyColumn() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CUSTOM_SEPARATOR);

+    checkValue(csvTable, 4, 0, "line with empty column custom separator");

+    checkValue(csvTable, 4, 1, " "); // spacer added by table implementation

+    checkValue(csvTable, 4, 2, "AFTER_EMPTY_COLUMN2");

+  }

+

+  private void checkValue(CSVTable table, int row, int column, String expectedValue) {

+    String actualValue = table.getEntry(row, column);

+    assertThat(actualValue, is(expectedValue));

+  }

+

 }
\ No newline at end of file
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/rule/ManualAnchoringTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/rule/ManualAnchoringTest.java
index 64b7561..151e586 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/rule/ManualAnchoringTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/rule/ManualAnchoringTest.java
@@ -33,11 +33,34 @@
     script += "CW{-> T1};\n";
     script += "\"and\"{-> T2};\n";
     script += "T1 (COMMA T1)* @T2 T1 {->MARK(T3,1,4)};\n";
+
     CAS cas = RutaTestUtils.getCAS(document);
     Ruta.apply(cas, script);
 
     RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "A, B and C");
-
-    cas.release();
   }
+
+  @Test
+  public void testInWindow() throws Exception {
+    String document = "A, B and C. A, B and C.";
+    String script = "";
+    script += "ANY+{-PARTOF({PERIOD,T1}) -> T1};\n";
+    script += "BLOCK(block) T1{}{\n";
+    script += "SW CW{-> T2};\n";
+    script += "SW @CW{-> T3};\n";
+    script += "}\n";
+    script += "T1->{\n";
+    script += "SW CW{-> T4};\n";
+    script += "SW @CW{-> T5};\n";
+    script += "};\n";
+
+    CAS cas = RutaTestUtils.getCAS(document);
+    Ruta.apply(cas, script);
+
+    RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "C", "C");
+    RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "C", "C");
+    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "C", "C");
+    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, "C", "C");
+  }
+
 }
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/rule/RuleInference3Test.java b/ruta-core/src/test/java/org/apache/uima/ruta/rule/RuleInference3Test.java
index d68f843..2c7f590 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/rule/RuleInference3Test.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/rule/RuleInference3Test.java
@@ -31,7 +31,5 @@
     CAS cas = RutaTestUtils.processTestScript(this.getClass());

 

     RutaTestUtils.assertAnnotationsEquals(cas, 4, 4, "[1]", "[2]", "[3]", "[4]");

-

-    cas.release();

   }

 }

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
index 937bfeb..720670b 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
@@ -271,4 +271,18 @@
     RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);

   }

 

+  @Test

+  public void testLastElementAlsoAnnotatedWithLookahead() throws Exception {

+    String document = "a b c. a b c.";

+    String script = "ANY+{-PARTOF({PERIOD, T1})->T1};\n";

+    script += "\"a\" -> T2, T3;\n";

+    script += "\"c\" -> T3;\n";

+    script += "T1 -> { T2 # T3{-> T4};};\n";

+

+    CAS cas = RutaTestUtils.getCAS(document, null, null, false);

+    Ruta.apply(cas, script);

+

+    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "c", "c");

+  }

+

 }

diff --git a/ruta-docbook/pom.xml b/ruta-docbook/pom.xml
index 9423c4f..97e2ea9 100644
--- a/ruta-docbook/pom.xml
+++ b/ruta-docbook/pom.xml
@@ -24,15 +24,15 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

   <name>Apache UIMA Ruta Documentation</name>

   <url>${uimaWebsiteUrl}</url>

   <scm>

-  	<url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-docbook</url>

-  	<connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-docbook</connection>

-  	<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-docbook</developerConnection>

+  	<url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-docbook</url>

+  	<connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-docbook</connection>

+  	<developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-docbook</developerConnection>

   </scm>

   <properties>

   	<uimaScmProject>${project.artifactId}</uimaScmProject>

diff --git a/ruta-docbook/src/docbook/tools.ruta.howtos.xml b/ruta-docbook/src/docbook/tools.ruta.howtos.xml
index b72f687..36bfe41 100644
--- a/ruta-docbook/src/docbook/tools.ruta.howtos.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.howtos.xml
@@ -239,7 +239,7 @@
 			the more efficient structures, tree word list and multi tree word
 			list. The usage and configuration is shortly summarized in the
 			following. An exemplary maven project for UIMA Ruta is given here:
-			<code>https://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example</code>
+			<code>https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/trunk/example-projects/ruta-maven-example</code>
 		</para>
 		<section>
 		<title>generate goal</title>
@@ -250,7 +250,7 @@
 		<programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
+<version>3.0.0</version>
 <configuration>
 
  <!-- This is a exemplary configuration, which explicitly specifies the 
@@ -384,12 +384,12 @@
     or the configuration of the generated analysis engine descriptor, e.g., 
     the values of the configuration parameter scriptPaths.
     However, there are also other parameters: addRutaNature and buildPaths. 
-    Both can be utilzed to configure the current Eclipse project (due to the missing m2e connector).
-    This is required if the functionality of the UIMA Ruta Workbench, e.g., syntax checking or auto-completeion,
+    Both can be utilized to configure the current Eclipse project (due to the missing m2e connector).
+    This is required if the functionality of the UIMA Ruta Workbench, e.g., syntax checking or auto-completion,
      should be available in the maven project. If the parameter addRutaNature is set to true, then
      the UIMA Ruta Workbench will recognize the project as a script project. Only then, 
      the buildpath of the UIMA Ruta project can be configured using the buildPaths parameter, which specifies 
-     the three important source folders of the UIMA Ruta project. In normal UIMA Ruta Workbnech projects, 
+     the three important source folders of the UIMA Ruta project. In normal UIMA Ruta Workbench projects, 
      these are script, descriptor and resources.
     </para>
 		</section>
@@ -403,7 +403,7 @@
     <programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
+<version>3.0.0</version>
 <configuration></configuration>
 <executions>
 <execution>
@@ -456,7 +456,7 @@
     <programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.3.0</version>
+<version>3.0.0</version>
 <configuration></configuration>
 <executions>
 <execution>
@@ -527,7 +527,7 @@
     </para>  
     
     <programlisting><![CDATA[mvn archetype:generate -DarchetypeGroupId=org.apache.uima 
-    -DarchetypeArtifactId=ruta-maven-archetype -DarchetypeVersion=2.6.0
+    -DarchetypeArtifactId=ruta-maven-archetype -DarchetypeVersion=3.0.0
     -DgroupId=my.domain -DartifactId=my-ruta-project]]></programlisting>
     
     <para>
diff --git a/ruta-eclipse-feature/pom.xml b/ruta-eclipse-feature/pom.xml
index 13de5ac..c5c2739 100644
--- a/ruta-eclipse-feature/pom.xml
+++ b/ruta-eclipse-feature/pom.xml
@@ -23,7 +23,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

     

@@ -44,13 +44,13 @@
        element, and just changing the following two properties -->  

   <scm>

     <connection>

-      scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-feature

+      scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-eclipse-feature

     </connection>

     <developerConnection>

-      scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-feature

+      scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-eclipse-feature

     </developerConnection>

     <url>

-      http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-eclipse-feature

+      http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-eclipse-feature

     </url>

   </scm>

   

diff --git a/ruta-eclipse-update-site/category.xml b/ruta-eclipse-update-site/category.xml
index 4bd05bb..b53d5f7 100644
--- a/ruta-eclipse-update-site/category.xml
+++ b/ruta-eclipse-update-site/category.xml
@@ -20,7 +20,7 @@
    ***************************************************************
    -->
 <site>
-   <feature url="features/org.apache.uima.ruta.feature_2.6.0.jar" id="org.apache.uima.ruta.feature" version="2.6.0">
+   <feature url="features/org.apache.uima.ruta.feature_3.0.0.jar" id="org.apache.uima.ruta.feature" version="3.0.0">
       <category name="apache-uima-ruta"/>
    </feature>
    <category-def name="apache-uima-ruta" label="Apache UIMA Ruta">
diff --git a/ruta-eclipse-update-site/pom.xml b/ruta-eclipse-update-site/pom.xml
index 4f2a093..e4de7cf 100644
--- a/ruta-eclipse-update-site/pom.xml
+++ b/ruta-eclipse-update-site/pom.xml
@@ -29,7 +29,7 @@
   

 	<artifactId>ruta-eclipse-update-site</artifactId>

 	<packaging>pom</packaging>

-	<version>2.8.0</version>

+	<version>3.0.0</version>

   

 	<name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

   <description>The UIMA Ruta Eclipse update site</description>

@@ -37,22 +37,22 @@
 

   <scm>

     <connection>

-      scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-update-site

+      scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/trunk/ruta-eclipse-update-site

     </connection>

     <developerConnection>

-      scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-eclipse-update-site

+      scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/trunk/ruta-eclipse-update-site

     </developerConnection>

     <url>

-      http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-eclipse-update-site

+      http://svn.apache.org/viewvc/uima/uv3/ruta-v3/trunk/ruta-eclipse-update-site

     </url>

   </scm>

   

   <properties>

     <uimaScmProject>${project.artifactId}</uimaScmProject>

     <eclipseUpdateSiteComponent>ruta</eclipseUpdateSiteComponent>

-    <eclipseUpdateSubSite>${project.build.directory}/eclipse-update-site/${eclipseUpdateSiteComponent}</eclipseUpdateSubSite>

-    <item-maven-release-version>2.8.0</item-maven-release-version>

-    <item-eclipse-release-version>2.8.0</item-eclipse-release-version>

+    <eclipseUpdateSubSite>${project.build.directory}/eclipse-update-site-v3/${eclipseUpdateSiteComponent}</eclipseUpdateSubSite>

+    <item-maven-release-version>3.0.0</item-maven-release-version>

+    <item-eclipse-release-version>3.0.0</item-eclipse-release-version>

     <dropPrevVersions>false</dropPrevVersions>

   </properties>

 	<build>

@@ -93,7 +93,7 @@
                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide</artifactId>            <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide_${item-eclipse-release-version}.jar      </destFileName></artifactItem>

                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-ide-ui</artifactId>         <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.ide.ui_${item-eclipse-release-version}.jar   </destFileName></artifactItem>

                 <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-textruler</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.textruler_${item-eclipse-release-version}.jar</destFileName></artifactItem>

-                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-core-ext</artifactId>      <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.core.ext_${item-eclipse-release-version}.jar</destFileName></artifactItem>

+                <artifactItem><groupId>org.apache.uima</groupId><artifactId>ruta-ep-core-ext</artifactId>       <version>${item-maven-release-version}</version><destFileName>org.apache.uima.ruta.core.ext_${item-eclipse-release-version}.jar</destFileName></artifactItem>

               </artifactItems>            

               <outputDirectory>${toBePacked}</outputDirectory>              

             </configuration>

@@ -162,7 +162,7 @@
 	                        <delete dir="${eclipseUpdateSubSite}" quiet="true" />

 	                        <exec executable="svn" failonerror="true">

 	                          <arg value="checkout" />

-	                          <arg value="${distsvnroot}repos/dist/release/uima/eclipse-update-site/${eclipseUpdateSiteComponent}" />

+	                          <arg value="${distsvnroot}repos/dist/release/uima/eclipse-update-site-v3/${eclipseUpdateSiteComponent}" />

 	                          <arg value="${eclipseUpdateSubSite}" />

 	                        </exec> 

 	                        

diff --git a/ruta-ep-addons/pom.xml b/ruta-ep-addons/pom.xml
index f00cb47..0fb8771 100644
--- a/ruta-ep-addons/pom.xml
+++ b/ruta-ep-addons/pom.xml
@@ -23,7 +23,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -137,9 +137,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-addons</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-addons</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-addons</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-addons</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-addons</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-addons</developerConnection>

   </scm>

   <build>

     <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
index 1268cbe..9c0ea11 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
@@ -107,7 +107,7 @@
             debugInlinedBlock.getAsCondition(), debugInlinedBlock.getMatched(), ts);

     parent.addChild(inlinedBlockNode);

 

-    FSArray inlinedRules = debugInlinedBlock.getInlinedRules();

+    FSArray<DebugScriptApply> inlinedRules = debugInlinedBlock.getInlinedRules();

     if (inlinedRules != null) {

       for (FeatureStructure each : inlinedRules) {

         buildTree(each, inlinedBlockNode, ts, offset, onlyRules);

@@ -234,7 +234,7 @@
       }

     }

 

-    FSArray inlinedActionBlocks = fs.getInlinedActionBlocks();

+    FSArray<DebugInlinedBlock> inlinedActionBlocks = fs.getInlinedActionBlocks();

     if (inlinedActionBlocks != null) {

       InlinedRootNode inlinedRootNode = new InlinedRootNode(remsNode, ts);

       remsNode.setInlined(inlinedRootNode);

@@ -269,7 +269,7 @@
         buildTree(each, remNode, ts, offset, onlyRules);

       }

     }

-    FSArray inlinedConditionBlocks = fs.getInlinedConditionBlocks();

+    FSArray<DebugInlinedBlock> inlinedConditionBlocks = fs.getInlinedConditionBlocks();

     if (inlinedConditionBlocks != null) {

       InlinedRootNode inlinedRootNode = new InlinedRootNode(remNode, ts);

       remNode.setInlined(inlinedRootNode);

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
index 2ef1a35..39d8fe0 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
@@ -27,8 +27,8 @@
 import org.apache.uima.ruta.caseditor.view.tree.IAnnotationNode;

 import org.apache.uima.ruta.explain.ExplainConstants;

 

-public class RuleElementMatchNode extends ExplainAbstractTreeNode implements IEvaluatedNode,

-        IAnnotationNode {

+public class RuleElementMatchNode extends ExplainAbstractTreeNode

+        implements IEvaluatedNode, IAnnotationNode {

 

   private boolean matched;

 

@@ -40,7 +40,8 @@
     matched = baseFS.getBooleanValue(baseFeat);

 

     f = fs.getType().getFeatureByBaseName(ExplainConstants.CONDITIONS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(f);

+    @SuppressWarnings("unchecked")

+    ArrayFS<FeatureStructure> value = (ArrayFS<FeatureStructure>) fs.getFeatureValue(f);

     if (value != null) {

       FeatureStructure[] fsarray = value.toArray();

       for (FeatureStructure each : fsarray) {

diff --git a/ruta-ep-caseditor/pom.xml b/ruta-ep-caseditor/pom.xml
index eb14b24..884a021 100644
--- a/ruta-ep-caseditor/pom.xml
+++ b/ruta-ep-caseditor/pom.xml
@@ -23,7 +23,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -33,9 +33,9 @@
   <url>${uimaWebsiteUrl}</url>

   <description>Provides additional views for the CAS Editor</description>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-caseditor</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-caseditor</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-caseditor</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-caseditor</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-caseditor</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-caseditor</developerConnection>

   </scm>

   <dependencies>

     <dependency>

diff --git a/ruta-ep-core-ext/pom.xml b/ruta-ep-core-ext/pom.xml
index 4f3104d..05e6e4b 100644
--- a/ruta-ep-core-ext/pom.xml
+++ b/ruta-ep-core-ext/pom.xml
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-ep-parent</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>3.0.0</version>
     <relativePath>../ruta-ep-parent/pom.xml</relativePath>
   </parent>
   <properties>
@@ -33,9 +33,9 @@
   </properties>
   <url>${uimaWebsiteUrl}</url>
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-core-ext</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-core-ext</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-core-ext</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-core-ext</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-core-ext</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-core-ext</developerConnection>
   </scm>
   <dependencies>
     <dependency>
diff --git a/ruta-ep-engine/pom.xml b/ruta-ep-engine/pom.xml
index 1bd3de5..b2c1752 100644
--- a/ruta-ep-engine/pom.xml
+++ b/ruta-ep-engine/pom.xml
@@ -16,7 +16,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -184,9 +184,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-engine</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-engine</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-engine</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-engine</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-engine</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-engine</developerConnection>

   </scm>

   <build>

     <!-- don't use artifactId as first part of finalName, follow instead 

diff --git a/ruta-ep-ide-ui/pom.xml b/ruta-ep-ide-ui/pom.xml
index 04c028f..7fd5e2a 100644
--- a/ruta-ep-ide-ui/pom.xml
+++ b/ruta-ep-ide-ui/pom.xml
@@ -24,7 +24,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -204,9 +204,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-ide-ui</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-ide-ui</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-ide-ui</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide-ui</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide-ui</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide-ui</developerConnection>

   </scm>

   <build>

     <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

diff --git a/ruta-ep-ide/pom.xml b/ruta-ep-ide/pom.xml
index 2c36131..1cf585c 100644
--- a/ruta-ep-ide/pom.xml
+++ b/ruta-ep-ide/pom.xml
@@ -24,7 +24,7 @@
     <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -104,9 +104,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-ide</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-ide</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-ide</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-ide</developerConnection>

   </scm>

   <build>

     <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

diff --git a/ruta-ep-parent/pom.xml b/ruta-ep-parent/pom.xml
index 7a09b33..0b46d54 100644
--- a/ruta-ep-parent/pom.xml
+++ b/ruta-ep-parent/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>3.0.0</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
 
@@ -44,9 +44,9 @@
        Keeping this a bit factored allows cutting/pasting the <scm>
        element, and just changing the following two properties -->
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-parent</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-parent</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-parent</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-parent</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-parent</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-parent</developerConnection>
   </scm>
   
   <properties>
diff --git a/ruta-ep-textruler/pom.xml b/ruta-ep-textruler/pom.xml
index 4d1aa61..6548dcb 100644
--- a/ruta-ep-textruler/pom.xml
+++ b/ruta-ep-textruler/pom.xml
@@ -23,7 +23,7 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.8.1-SNAPSHOT</version>

+    <version>3.0.0</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -97,9 +97,9 @@
     </dependency>

   </dependencies>

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-textruler</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-textruler</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-ep-textruler</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-textruler</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-textruler</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-ep-textruler</developerConnection>

   </scm>

   <build>

     <!-- don't use artifactId as first part of finalName, follow instead the eclipse convention -->

diff --git a/ruta-maven-archetype/pom.xml b/ruta-maven-archetype/pom.xml
index cc9963c..7b780dd 100644
--- a/ruta-maven-archetype/pom.xml
+++ b/ruta-maven-archetype/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>3.0.0</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
   <properties>
@@ -22,9 +22,9 @@
   </properties>
   <url>${uimaWebsiteUrl}</url>
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-maven-archetype</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-archetype</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-archetype</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-archetype</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-archetype</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-archetype</developerConnection>
   </scm>
   <build>
     <extensions>
diff --git a/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml b/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
index 55a3da4..3eea8b2 100644
--- a/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
@@ -35,7 +35,7 @@
 
   <properties>
     <junit-version>4.11</junit-version>
-    <uima-version>2.10.4</uima-version>
+    <uima-version>3.1.1</uima-version>
     <ruta-version>${archetypeVersion}</ruta-version>
   </properties>
 
diff --git a/ruta-maven-plugin/pom.xml b/ruta-maven-plugin/pom.xml
index 3e83fc9..874684f 100644
--- a/ruta-maven-plugin/pom.xml
+++ b/ruta-maven-plugin/pom.xml
@@ -30,7 +30,7 @@
 	<parent>
 		<groupId>org.apache.uima</groupId>
 		<artifactId>ruta-parent</artifactId>
-		<version>2.8.1-SNAPSHOT</version>
+		<version>3.0.0</version>
 		<relativePath>../ruta-parent/pom.xml</relativePath>
 	</parent>
 	<properties>
@@ -38,9 +38,9 @@
   </properties>
   <url>${uimaWebsiteUrl}</url>
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-maven-plugin</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-plugin</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-plugin</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-plugin</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-plugin</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-maven-plugin</developerConnection>
   </scm>
   
   <dependencyManagement>
diff --git a/ruta-parent/pom.xml b/ruta-parent/pom.xml
index e9cf406..5a4efa1 100644
--- a/ruta-parent/pom.xml
+++ b/ruta-parent/pom.xml
@@ -30,7 +30,7 @@
 

   <artifactId>ruta-parent</artifactId>

   <packaging>pom</packaging>

-  <version>2.8.1-SNAPSHOT</version>

+  <version>3.0.0</version>

   <name>Apache UIMA Ruta: ${project.artifactId}</name>

   <url>${uimaWebsiteUrl}</url>

   <inceptionYear>2011</inceptionYear>

@@ -45,9 +45,9 @@
        Keeping this a bit factored allows cutting/pasting the <scm>

        element, and just changing the following two properties -->

   <scm>

-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-parent</url>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-parent</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-parent</developerConnection>

+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-parent</url>

+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-parent</connection>

+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-parent</developerConnection>

   </scm>

 

   <!-- The repositories and pluginRepositories section is duplicated from the parent pom one, and adds 

@@ -127,8 +127,8 @@
 (http://www.famfamfam.com/lab/icons/silk/), licensed under the 

 Creative Commons Attribution 3.0 License.

     </postNoticeText>

-    <uimaVersion>2.10.4</uimaVersion>

-    <uimafit-version>2.4.0</uimafit-version>

+    <uimaVersion>3.1.1</uimaVersion>

+    <uimafit-version>3.0.0</uimafit-version>

     <spring-version>4.3.22.RELEASE</spring-version>

      <!-- 

      BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)

diff --git a/ruta-typesystem/pom.xml b/ruta-typesystem/pom.xml
index 216dca3..963a2d3 100644
--- a/ruta-typesystem/pom.xml
+++ b/ruta-typesystem/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.8.1-SNAPSHOT</version>
+    <version>3.0.0</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
   
@@ -50,9 +50,9 @@
 
   </dependencies>
   <scm>
-    <url>http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-typesystem</url>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-typesystem</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-typesystem</developerConnection>
+    <url>http://svn.apache.org/viewvc/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-typesystem</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-typesystem</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/uima/uv3/ruta-v3/tags/ruta-3.0.0/ruta-typesystem</developerConnection>
   </scm>
   <build>
     <pluginManagement>