Examples of moveToNext()


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

    Assert.assertEquals("is", ((AnnotationFS) anIter.next()).getCoveredText());
    if ("is".equals(((AnnotationFS) anIter.get()).getCoveredText()))
      anIter.moveToNext();
    Assert.assertEquals("good", ((AnnotationFS) anIter.next()).getCoveredText());
    if (anIter.isValid() && "good".equals(((AnnotationFS) anIter.get()).getCoveredText()))
      anIter.moveToNext();
    Assert.assertFalse(anIter.hasNext());

    // print out annotations of the transalation SofA
    // System.out.println("\n----------------\n");
    CAS germanView = cas.getView("TranslatedDocument");
View Full Code Here

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

    FSIterator iter = mCAS.getAnnotationIndex().iterator();
    Hashtable checkBoxes = new Hashtable();
    HashSet checkBoxesDone = new HashSet();
    while (iter.isValid()) {
      AnnotationFS fs = (AnnotationFS) iter.get();
      iter.moveToNext();

      Type type = fs.getType();

      // have we seen this type before?
      JCheckBox checkbox = (JCheckBox) mTypeToCheckboxMap.get(type);
View Full Code Here

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

      throw new RuntimeException(e);
    }
    FSIterator iter = jcas.getAnnotationIndex().iterator();
    while (iter.isValid()) {
      Annotation annot = (Annotation) iter.get();
      iter.moveToNext();

      // find out what entity this annotation represents
      EntityResolver.Entity entity = mEntityResolver.getEntity(annot);

      //if not an entity, skip it
View Full Code Here

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

        }
      }
      // else if (getPanePosition(annot.getBegin()) > aPosition)
      else if (annot.getBegin() > aPosition)
        break;
      annotIter.moveToNext();
    }
    this.selectedAnnotationTreeModel.nodeStructureChanged(root);
    // expand first level
    // int row = 0;
    // while (row < this.selectedAnnotationTree.getRowCount())
View Full Code Here

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

    try
    {
      //iterate and print annotations
      FSIterator typeIterator = aCAS.getAnnotationIndex().iterator();

      for (typeIterator.moveToFirst(); typeIterator.isValid(); typeIterator.moveToNext())
      {
        Iterator it = types.keySet().iterator();

        while (it.hasNext())
        {
View Full Code Here

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

    assertNotNull(englishView.getSofa());
    FSIndex index = englishView.getAnnotationIndex();
    FSIterator iter = index.iterator();
    // skip document annotation
    AnnotationFS fs = (AnnotationFS) iter.get();
    iter.moveToNext();

    // the exampleType fs
    fs = (AnnotationFS) iter.get();
    FeatureStructureImplC fsImpl = (FeatureStructureImplC) fs;
    StringBuffer sb = new StringBuffer(1024);
View Full Code Here

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

    createExampleFS(cas);
    // get the example FS
    CAS englishView = cas.getView("EnglishDocument");
    FSIterator iter = englishView.getAnnotationIndex().iterator();
    // skip document annotation
    iter.moveToNext();
    // the exampleType fs
    AnnotationFS fs = (AnnotationFS) iter.get();

    // clone it
    AnnotationFS clone = (AnnotationFS) fs.clone();
View Full Code Here

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

    assertNotNull(englishView.getSofa());
    FSIndex index = englishView.getAnnotationIndex();
    FSIterator iter = index.iterator();
    // skip document annotation
    AnnotationFS fs = (AnnotationFS) iter.get();
    iter.moveToNext();

    // the exampleType fs
    fs = (AnnotationFS) iter.get();
    // System.out.print(fs.toString());
View Full Code Here

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

//              + " long=" + testfs.getLongValue(longFeature)
//              + " short=" + testfs.getShortValue(shortFeature));
      assertTrue(1+i == testfs.getDoubleValue(doubleFeature));
      assertTrue(5-i == testfs.getLongValue(longFeature));
      assertTrue(1+i == testfs.getShortValue(shortFeature));
      iter.moveToNext();
    }

    // test long as key
    iter = cas.getIndexRepository().getIndex("longIndex", exampleType).iterator();
//    System.out.println("\nLong");
View Full Code Here

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

//              + " long=" + testfs.getLongValue(longFeature)
//              + " short=" + testfs.getShortValue(shortFeature));
      assertTrue(1+i == testfs.getDoubleValue(doubleFeature));
      assertTrue(5-i == testfs.getLongValue(longFeature));
      assertTrue(1+i == testfs.getShortValue(shortFeature));
      iter.moveToNext();
    }

    // test short as key
    iter = cas.getIndexRepository().getIndex("shortIndex", exampleType).iterator();
//    System.out.println("\nShort");
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.