You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/05/15 23:34:41 UTC

svn commit: r1679650 - /uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java

Author: schor
Date: Fri May 15 21:34:41 2015
New Revision: 1679650

URL: http://svn.apache.org/r1679650
Log:
no Jira - add more dumping (under control of static boolean) for debugging

Modified:
    uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java?rev=1679650&r1=1679649&r2=1679650&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java Fri May 15 21:34:41 2015
@@ -180,20 +180,31 @@ public class AnnotationIteratorTest exte
     FSIndexRepository ir = this.cas.getIndexRepository();
     int annotCount = 1; // Init with document annotation.
     // create token and sentence annotations
+    AnnotationFS fs;
     for (int i = 0; i < text.length() - 5; i++) {
       ++annotCount;
-      ir.addFS(this.cas.createAnnotation(this.tokenType, i, i + 5));
+      ir.addFS(fs = this.cas.createAnnotation(this.tokenType, i, i + 5));
+      if (showFSs) {
+        System.out.format("creating: %d begin: %d end: %d type: %s%n", annotCount, fs.getBegin(), fs.getEnd(), fs.getType().getName() );
+      }
     }
     // for (int i = 0; i < text.length() - 5; i++) {
     // cas.getIndexRepository().addFS(cas.createAnnotation(tokenType, i, i+5));
     // }
     for (int i = 0; i < text.length() - 10; i += 5) {
       ++annotCount;
-      ir.addFS(this.cas.createAnnotation(this.sentenceType, i, i + 10));
+      ir.addFS(fs = this.cas.createAnnotation(this.sentenceType, i, i + 10));
+      if (showFSs) {
+        System.out.format("creating: %d begin: %d end: %d type: %s%n", annotCount, fs.getBegin(), fs.getEnd(), fs.getType().getName() );
+      }
     }
     
     ++annotCount;
-    ir.addFS(this.cas.createAnnotation(this.sentenceType,  12, 31));
+    ir.addFS(fs = this.cas.createAnnotation(this.sentenceType,  12, 31));
+    if (showFSs) {
+      System.out.format("creating: %d begin: %d end: %d type: %s%n", annotCount, fs.getBegin(), fs.getEnd(), fs.getType().getName() );
+    }
+
 
     /***************************************************
      * iterate over them