Examples of addToIndexes()


Examples of org.apache.uima.jcas.cas.NonEmptyFSList.addToIndexes()

    NonEmptyFSList firstList = new NonEmptyFSList(jcas);
    NonEmptyFSList list = firstList;   
    for (int i=0; i < objArr.length; i++)
    {     
      list.setHead(objArr[i]);
      list.addToIndexes();
     
      if ((i+1) < objArr.length)
      {
        NonEmptyFSList nextList = new NonEmptyFSList(jcas);
        list.setTail(nextList);
View Full Code Here

Examples of org.apache.uima.jcas.cas.TOP.addToIndexes()

      }
      TOP newStructure = null;
      if (newFS instanceof TOP) {
        newStructure = (TOP) newFS;
        fillFeatures(newStructure, features, matchedAnnotation, element, stream);
        newStructure.addToIndexes();
      }
    }
  }

  // TODO refactor duplicate methods -> MarkAction
View Full Code Here

Examples of org.apache.uima.lucas.indexer.types.test.Annotation1.addToIndexes()

   
    Annotation1 annotation3 = new Annotation1(cas);
    annotation3.setFeatureString("token3Feature1");
    annotation3.setBegin(14);
    annotation3.setEnd(20);
    annotation3.addToIndexes();   

    AnnotationTokenStream annotationTokenStream = new AnnotationTokenStream(cas, CAS.NAME_DEFAULT_SOFA, "org.apache.uima.lucas.indexer.types.test.Annotation1", "featureString", null);
    Token nextToken = annotationTokenStream.next();
    assertNotNull(nextToken);
    assertEquals("token1Feature1", new String(nextToken.termBuffer(), 0, nextToken.termLength()));
View Full Code Here

Examples of org.apache.uima.ruta.type.DebugRuleApply.addToIndexes()

      if(time != null) {
        dra.setTime(time);
      }
    }
    if (addToIndex)
      dra.addToIndexes();
    return dra;
  }

  public DebugRuleMatch createDebugRuleMatch(AbstractRuleMatch<? extends AbstractRule> match,
          RutaStream stream, boolean addToIndex, boolean withMatches,
View Full Code Here

Examples of org.apache.uima.ruta.type.DebugRuleElementMatch.addToIndexes()

            drem.setBaseCondition(base);

            drem.setBegin(each.getBegin());
            drem.setEnd(each.getEnd());
            if (addToIndex) {
              drem.addToIndexes();
            }
            remList.add(drem);
          }
        }
        drems.setMatches(UIMAUtils.toFSArray(cas, remList));
View Full Code Here

Examples of org.apache.uima.ruta.type.DebugRuleElementMatches.addToIndexes()

            remList.add(drem);
          }
        }
        drems.setMatches(UIMAUtils.toFSArray(cas, remList));
        if (addToIndex) {
          drems.addToIndexes();
        }
        ruleElementMatches.add(drems);
      }

      drm.setElements(UIMAUtils.toFSArray(cas, ruleElementMatches));
View Full Code Here

Examples of org.apache.uima.ruta.type.DebugRuleMatch.addToIndexes()

      AnnotationFS matchedAnnotation = matchedAnnotationsOfRoot.get(0);
      if (matchedAnnotation != null) {
        drm.setBegin(matchedAnnotation.getBegin());
        drm.setEnd(matchedAnnotation.getEnd());
        if (addToIndex || withMatches)
          drm.addToIndexes();
      }
    }
    return drm;
  }
View Full Code Here

Examples of org.apache.uima.ruta.type.DebugScriptApply.addToIndexes()

      debug = createDebugBlockApply((BlockApply) apply, stream, addToIndex, withMatches, timeInfo);
    } else if (apply instanceof RuleApply) {
      debug = createDebugRuleApply((RuleApply) apply, stream, addToIndex, withMatches, timeInfo);
    }
    if (addToIndex)
      debug.addToIndexes();
    return debug;
  }

}
View Full Code Here

Examples of org.apache.uima.ruta.type.MARKUP.addToIndexes()

    Collection<AnnotationFS> toRemove = new LinkedList<AnnotationFS>();
    while (matcher.find()) {
      int begin = matcher.start();
      int end = matcher.end();
      MARKUP markup = new MARKUP(jCas, begin, end);
      markup.addToIndexes();
      FSIterator<AnnotationFS> subiterator = cas.getAnnotationIndex(result).subiterator(markup);
      while (subiterator.isValid()) {
        AnnotationFS fs = subiterator.get();
        toRemove.add(fs);
        subiterator.moveToNext();
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaAnnotation.addToIndexes()

    heuristicAnnotation.setAnnotation(newAnnotation);
    List<AnnotationFS> annotationsInWindow = stream.getAnnotationsInWindow(heuristicAnnotation,
            heuristicType);

    if (annotationsInWindow.isEmpty()) {
      heuristicAnnotation.addToIndexes();
      newAnnotation.addToIndexes();
      stream.addAnnotation(newAnnotation, match);
    } else {
      RutaAnnotation tma = stream.getCorrectTMA(annotationsInWindow, heuristicAnnotation);
      if (tma != null) {
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.