Examples of JFSIndexRepository


Examples of org.apache.uima.jcas.JFSIndexRepository

  public void testIteratorCopy() {
    Annotation something = new Annotation(jcas);
    something.addToIndexes();

    JFSIndexRepository ir = jcas.getJFSIndexRepository();
    FSIterator i1 = ir.getAnnotationIndex().iterator();
    FSIterator i2 = i1.copy();
    FSIterator i3 = i2.copy();
    assertTrue(i3 != null);
  }
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      assertTrue(null == r2.getArrayRef());

      r2.addToIndexes();
      r1.addToIndexes();

      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());
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      // System.out.print("Making Random: ");
      for (int i = 0; i < 50; i++) {
        root1.make();
        // System.out.print("m");
      }
      JFSIndexRepository jir = jcas.getJFSIndexRepository();
      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();
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      Annotation a1 = new Annotation(jcas);
      a1.addToIndexes();
      FeatureStructure f1 = localCas.createFS(subTok);
      localCas.getIndexRepository().addFS(f1);

      JFSIndexRepository ir = jcas.getJFSIndexRepository();
      FSIndex index = ir.getAnnotationIndex();
      FSIterator it = index.iterator();

      try {

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

Examples of org.apache.uima.jcas.JFSIndexRepository

        gerAnnot.setOtherAnnotation(engAnnot);
        gerAnnot.addToIndexes();
      }

      // Test that the annotations are in separate index spaces, and that Sofas are indexed
      JFSIndexRepository indexes = jcas.getJFSIndexRepository();
      // FSIndex sofaIndex = indexes.getIndex(CAS.SOFA_INDEX_NAME);
      indexes = engJcas.getJFSIndexRepository();
      FSIndex engIndex = indexes.getAnnotationIndex(Annotation.type);
      indexes = gerJcas.getJFSIndexRepository();
      FSIndex gerIndex = indexes.getAnnotationIndex(Annotation.type);
      indexes = frJcas.getJFSIndexRepository();
      FSIndex frIndex = indexes.getAnnotationIndex(Annotation.type);
      FSIterator sofaIter = jcas.getSofaIterator();
      int numSofas = 0;
      while (sofaIter.isValid()) {
        numSofas++;
        sofaIter.moveToNext();
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

        gerAnnot.setOtherAnnotation(engAnnot);
        gerAnnot.addToIndexes();
      }

      // Test that the annotations are in separate index spaces, and that Sofas are indexed
      JFSIndexRepository indexes = jcas.getJFSIndexRepository();
      // FSIndex sofaIndex = indexes.getIndex(CAS.SOFA_INDEX_NAME);
      indexes = engJcas.getJFSIndexRepository();
      FSIndex engIndex = indexes.getAnnotationIndex(Annotation.type);
      indexes = gerJcas.getJFSIndexRepository();
      FSIndex gerIndex = indexes.getAnnotationIndex(Annotation.type);
      indexes = frJcas.getJFSIndexRepository();
      FSIndex frIndex = indexes.getAnnotationIndex(Annotation.type);
      FSIterator sofaIter = jcas.getSofaIterator();
      int numSofas = 0;
      while (sofaIter.isValid()) {
        numSofas++;
        sofaIter.moveToNext();
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      Annotation a1 = new Annotation(jcas);
      a1.addToIndexes();
      FeatureStructure f1 = localCas.createFS(subTok);
      localCas.getIndexRepository().addFS(f1);

      JFSIndexRepository ir = jcas.getJFSIndexRepository();
      FSIndex index = ir.getAnnotationIndex();
      FSIterator it = index.iterator();

      try {

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

Examples of org.apache.uima.jcas.JFSIndexRepository

  public void testIteratorCopy() {
    Annotation something = new Annotation(jcas);
    something.addToIndexes();

    JFSIndexRepository ir = jcas.getJFSIndexRepository();
    FSIterator i1 = ir.getAnnotationIndex().iterator();
    FSIterator i2 = i1.copy();
    FSIterator i3 = i2.copy();
    assertTrue(i3 != null);
  }
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      assertTrue(null == r2.getArrayRef());

      r2.addToIndexes();
      r1.addToIndexes();

      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());
View Full Code Here

Examples of org.apache.uima.jcas.JFSIndexRepository

      // System.out.print("Making Random: ");
      for (int i = 0; i < 50; i++) {
        root1.make();
        // System.out.print("m");
      }
      JFSIndexRepository jir = jcas.getJFSIndexRepository();
      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();
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.