Package org.apache.uima.jcas

Examples of org.apache.uima.jcas.JCas.addFsToIndexes()


          int max = modview.getCas().getDocumentAnnotation().getEnd();
          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {
            clone.setBegin(mappedBegin);
            clone.setEnd(mappedEnd);
            // TODO handle nested annotation features
            modview.addFsToIndexes(clone);
            indexedFs.add(clone);
          } else {
            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");
          }
        }
View Full Code Here


          int max = modview.getCas().getDocumentAnnotation().getEnd();
          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {
            clone.setBegin(mappedBegin);
            clone.setEnd(mappedEnd);
            // TODO handle nested annotation features
            modview.addFsToIndexes(clone);
            indexedFs.add(clone);
          } else {
            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");
          }
        }
View Full Code Here

          int max = modview.getCas().getDocumentAnnotation().getEnd();
          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {
            clone.setBegin(mappedBegin);
            clone.setEnd(mappedEnd);
            // TODO handle nested annotation features
            modview.addFsToIndexes(clone);
            indexedFs.add(clone);
          } else {
            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");
          }
        }
View Full Code Here

    try {
      JCas cas = getCAS().getJCas();
      cas.setDocumentText(DOCUMENT_TEXT);

      FeatureStructure firstFeatureStructure = new TOP(cas);
      cas.addFsToIndexes(firstFeatureStructure);
      FeatureStructure secondFeatureStructure = new TOP(cas);
      cas.addFsToIndexes(secondFeatureStructure);

      List<FeatureStructure> featureStructures = UIMAUtils.getAllFSofType(TOP.type, cas);
View Full Code Here

      cas.setDocumentText(DOCUMENT_TEXT);

      FeatureStructure firstFeatureStructure = new TOP(cas);
      cas.addFsToIndexes(firstFeatureStructure);
      FeatureStructure secondFeatureStructure = new TOP(cas);
      cas.addFsToIndexes(secondFeatureStructure);

      List<FeatureStructure> featureStructures = UIMAUtils.getAllFSofType(TOP.type, cas);

      assertTrue(featureStructures != null);
      assertTrue(!featureStructures.isEmpty());
View Full Code Here

          getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");
        } else {
          clone.setBegin(mappedBegin);
          clone.setEnd(mappedEnd);
          // TODO handle nested annotation features
          modview.addFsToIndexes(clone);
          indexedFs.add(clone);
        }
      }
    }
  }
View Full Code Here

          int max = modview.getCas().getDocumentAnnotation().getEnd();
          if (mappedBegin < max && mappedEnd <= max && mappedBegin >= 0 && mappedEnd > 0) {
            clone.setBegin(mappedBegin);
            clone.setEnd(mappedEnd);
            // TODO handle nested annotation features
            modview.addFsToIndexes(clone);
            indexedFs.add(clone);
          } else {
            getContext().getLogger().log(Level.WARNING, "illegal annotation offset mapping");
          }
        }
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.