Examples of moveToLast()


Examples of org.apache.uima.cas.FSIterator.moveToLast()

    }
    // System.out.println("Number of annotations: " + v.size());
    assertTrue(v.size() == ((10 * 3) + (10 * 3)));

    it = setIndex.iterator();
    it.moveToLast();
    int current = v.size() - 1;
    while (it.isValid() && (current >= 0)) {
      // System.out.println("Current: " + current);
      a = (AnnotationFS) it.get();
      // System.out.println(
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

    // /////////////////////////////////////////////////////////////////////////
    // Test fast fail.

    it = bagIndex.iterator(); // use bag index, remove add last one
    // (preserves order for other tests).
    it.moveToLast();
    a = (AnnotationFS) it.get();
    it = setIndex.iterator(); // back to set iterator to do testing
    this.cas.getIndexRepository().removeFS(a);
    this.cas.getIndexRepository().addFS(a);
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

    // /////////////////////////////////////////////////////////////////////////
    // Test fast fail.

    it = bagIndex.iterator(); // use bag index, remove add last one
    // (preserves order for other tests).
    it.moveToLast();
    a = (AnnotationFS) it.get();
    // for (it = sortedIndex.iterator(); it.hasNext(); it.next()) {
    // System.out.println(it.get());
    // }
    it = sortedIndex.iterator();
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      it.moveToNext();
    }
    assertTrue(bagIndex.size() == v.size());

    // Check that reverse iterator produces reverse sequence.
    it.moveToLast();
    for (int i = v.size() - 1; i >= 0; i--) {
      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(i));
      it.moveToPrevious();
    }
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

            }
         }
      } else {
         // iterator is invalid lets try to move the iterator to the last FS and
         // check the FS
         iterator.moveToLast();
         // check if the iterator is valid after we move it
         if (iterator.isValid()) {
            // get FS
            coverFs = (AnnotationFS) iterator.get();
            // check the found coverFS covers the current match type annotation
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      // System.out.println("Annotation from " + a.getBegin() + " to " + a.getEnd());
      it.moveToNext();
    }
    assertTrue(count == 32);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 32);
    // System.out.println("Size of subiterator(true, true): " + count);
    it = annotIndex.subiterator(bigAnnot, false, true);
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      it.moveToNext();
    }
    assertTrue(count == 3);
    // System.out.println("Size of subiterator(false, true): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 3);
    it = annotIndex.subiterator(bigAnnot, true, false);
    count = 0;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      it.moveToNext();
    }
    assertTrue(count == 39);
    // System.out.println("Size of subiterator(true, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 39);
    it = annotIndex.subiterator(bigAnnot, false, false);
    count = 0;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      it.moveToNext();
    }
    assertTrue(count == 4);
    // System.out.println("Size of subiterator(false, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 4);
    AnnotationFS sent = (AnnotationFS) this.cas.getAnnotationIndex(this.sentenceType).iterator().get();
    it = annotIndex.subiterator(sent, false, true);
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToLast()

      it.moveToNext();
    }
    assertTrue(count == 2);
    // System.out.println("Size of subiterator(false, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 2);
  }
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.