Examples of moveToNext()


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

      while (iter.isValid()) {
        if (iter.get().getType() == subtypeHandle) // expected
          break;
        if (iter.get().getType() == supertypeHandle) // unexpected
          fail();
        iter.moveToNext();
      }

      // test that passing an invalid object causes an error
      descList.add(new ConfigurationParameter_impl());
      try {
View Full Code Here

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

      JFSIndexRepository jfsi = jcas.getJFSIndexRepository();
      FSIndex fsi1 = jfsi.getIndex("all", Root.type);
      FSIterator fsit1 = fsi1.iterator();
      assertTrue(fsit1.isValid());
      assertTrue(r2 == fsit1.get());
      fsit1.moveToNext();
      assertTrue(fsit1.isValid());
      assertTrue(r1 == fsit1.get());
      /*
       * while (fsit1.isValid()) { System.out.println("Iterator getting: " +
       * fsit1.get().toString()); fsit1.moveToNext(); }
View Full Code Here

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

      FSIterator it = jir.getIndex("all", Root.type).iterator();
      // System.out.print("\nTesting Random: ");
      while (it.isValid()) {
        root1.test(it.get());
        // System.out.print("t");
        it.moveToNext();
      }
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here

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

      try {

        while (it.isValid()) {
          Object o = it.get();
          assertTrue(o instanceof Annotation);
          it.moveToNext();
        }
      } catch (Exception e) {
        System.out.println("failed: nonJCasCovered by JCas");
      }
    } catch (Exception e) {
View Full Code Here

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

      FSIndex frIndex = indexes.getAnnotationIndex(Annotation.type);
      FSIterator sofaIter = jcas.getSofaIterator();
      int numSofas = 0;
      while (sofaIter.isValid()) {
        numSofas++;
        sofaIter.moveToNext();
      }
      // assertTrue(sofaIndex.size() == 3); // 3 sofas
      assertTrue(numSofas == 3);
      assertTrue(engIndex.size() == 5); // 4 annots plus documentAnnotation
      assertTrue(gerIndex.size() == 5); // 4 annots plus documentAnnotation
View Full Code Here

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

      assertTrue((CAS.TYPE_NAME_DOCUMENT_ANNOTATION).equals(gerAnnot.getType().getName()));
      assertTrue((CAS.TYPE_NAME_DOCUMENT_ANNOTATION).equals(frAnnot.getType().getName()));

      engIt.moveToNext();
      gerIt.moveToNext();
      frIt.moveToNext();
      engAnnot = (Annotation) engIt.get();
      CrossAnnotation gerCrossAnnot = (CrossAnnotation) gerIt.get();
      frAnnot = (Annotation) frIt.get();
      assertTrue((CAS.TYPE_NAME_ANNOTATION).equals(engAnnot.getType().getName()));
      assertTrue(("this").equals(engAnnot.getCoveredText()));
View Full Code Here

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

                    example.getDocument(), consideredFeatures));
            result.add(term);
          }
        }
      }
      iterator.moveToNext();
    }
    return result;
  }

  private List<WhiskRuleItem> getTermsBefore(WhiskRuleItem whiskRuleItem, TextRulerExample example) {
View Full Code Here

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

            break;
          }
          if (a.getBegin() == firstBegin)
            startAs.add(a);
        }
        iterator.moveToNext();
      } else {
        iterator.moveToNext();
      }
    }
View Full Code Here

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

          if (a.getBegin() == firstBegin)
            startAs.add(a);
        }
        iterator.moveToNext();
      } else {
        iterator.moveToNext();
      }
    }

    for (AnnotationFS annotation : startAs) {
      List<WhiskRuleItem> startList = new ArrayList<WhiskRuleItem>();
View Full Code Here

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

      if (a.getBegin() >= begin && a.getEnd() <= end) {
        if (!filterSetWithSlotNames.contains(a.getType().getName())) {
          return false;
        }
      }
      iterator.moveToNext();
    }
    return true;
  }
}
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.