You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2011/10/21 13:33:27 UTC

svn commit: r1187303 [3/3] - in /uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker: ./ action/ engine/ expression/ expression/bool/ expression/type/ parser/ rule/ verbalize/

Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java?rev=1187303&r1=1187302&r2=1187303&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/rule/TextMarkerTypeMatcher.java Fri Oct 21 11:33:26 2011
@@ -57,7 +57,7 @@ public class TextMarkerTypeMatcher imple
     for (Type type : types) {
       String name = type.getName();
       if ("uima.tcas.DocumentAnnotation".equals(name)
-              || "uima.tcas.DocumentAnnotation".equals(name)
+              || "org.apache.uima.textmarker.type.Document".equals(name)
               || (stream.getDocumentAnnotationType().getName().equals(name) && stream
                       .getFirstBasicOfAll().beginsWith(type))) {
         // TODO what about dynamic windowing?

Modified: uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java?rev=1187303&r1=1187302&r2=1187303&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java (original)
+++ uima/sandbox/trunk/TextMarker/uimaj-ep-textmarker-engine/src/main/java/org/apache/uima/textmarker/verbalize/ExpressionVerbalizer.java Fri Oct 21 11:33:26 2011
@@ -21,7 +21,6 @@ package org.apache.uima.textmarker.verba
 
 import java.util.Iterator;
 
-import org.apache.uima.cas.Type;
 import org.apache.uima.textmarker.expression.TextMarkerExpression;
 import org.apache.uima.textmarker.expression.bool.BooleanExpression;
 import org.apache.uima.textmarker.expression.bool.BooleanNumberExpression;
@@ -240,12 +239,15 @@ public class ExpressionVerbalizer {
   public String verbalize(TypeExpression expression) {
     if (expression instanceof SimpleTypeExpression) {
       SimpleTypeExpression e = (SimpleTypeExpression) expression;
-      Type type = e.getType(null);
-      String shortName = type.getShortName();
-      if (shortName.equals("DocumentAnnotation")) {
-        shortName = "Document";
+      String type = e.getTypeString();
+      int indexOf = type.lastIndexOf(".");
+      if (indexOf != -1) {
+        type = type.substring(indexOf + 1, type.length());
       }
-      return shortName;
+      if (type.equals("DocumentAnnotation")) {
+        type = "Document";
+      }
+      return type;
     } else if (expression instanceof ReferenceTypeExpression) {
       ReferenceTypeExpression e = (ReferenceTypeExpression) expression;
       return e.getVar();