Package org.apache.uima.cas

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


    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

    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

    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

    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

//              + " 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

//              + " 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

//              + " 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();
    }

  }

  // public void testUimaTypeSystem2Ecore() throws Exception
View Full Code Here

    int result = 0;
    FSIterator idIter = aCasView.getAnnotationIndex(aCasView.getTypeSystem().getType(aTypeS)).iterator();
    while (idIter != null && idIter.isValid()) {
      org.apache.uima.cas.FeatureStructure idFS = idIter.get();
      result = idFS.getIntValue(aCasView.getTypeSystem().getFeatureByFullName(aTypeS + ":" + aFeatS));
      idIter.moveToNext();
    }
    return result;
  }

  /**
 
View Full Code Here

            .iterator();
    while (idIter != null && idIter.isValid()) {
      org.apache.uima.cas.FeatureStructure idFS = idIter.get();
      result = idFS.getStringValue(aCasView.getTypeSystem().getFeatureByFullName(
              aTypeS + ":" + aFeatS));
      idIter.moveToNext();
    }
    return result;
  }

  /**
 
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.