Package org.apache.uima.jcas.cas

Examples of org.apache.uima.jcas.cas.TOP


      } catch (CASException e1) {
       logAndThrow(e1, jcasView);
      }
    
     // Return eq fs instance if already created
      TOP fs = jcasView.getJfsFromCaddr(addr);
      if (null != fs) {
        fs.jcasType = jcasView.getType(type);
      } else {
        initargs[0] = new Integer(addr);
        initargs[1] = jcasView.getType(type);
View Full Code Here


      } catch (CASException e1) {
        logAndThrow(e1, jcasView);
      }

      // Return eq fs instance if already created
      TOP fs = jcasView.getJfsFromCaddr(addr);
      if (null != fs) {
        fs.jcasType = jcasView.getType(type);
      } else {
        initargs[0] = Integer.valueOf(addr);
        initargs[1] = jcasView.getType(type);
View Full Code Here

        Annotation a = (Annotation) newFS;
        a.setBegin(matchedAnnotation.getBegin());
        a.setEnd(matchedAnnotation.getEnd());
        stream.addAnnotation(a, match);
      }
      TOP newStructure = null;
      if (newFS instanceof TOP) {
        newStructure = (TOP) newFS;
        fillFeatures(newStructure, features, matchedAnnotation, element, stream);
        newStructure.addToIndexes();
      }
    }
  }
View Full Code Here

        Annotation a = (Annotation) newFS;
        a.setBegin(matchedAnnotation.getBegin());
        a.setEnd(matchedAnnotation.getEnd());
        stream.addAnnotation(a, match);
      }
      TOP newStructure = null;
      if (newFS instanceof TOP) {
        newStructure = (TOP) newFS;
        gatherFeatures(newStructure, features, matchedAnnotation, element, match, stream);
        newStructure.addToIndexes();
      }
    }

  }
View Full Code Here

        Annotation a = (Annotation) newFS;
        a.setBegin(annotationFS.getBegin());
        a.setEnd(annotationFS.getEnd());
        stream.addAnnotation(a, match);
      }
      TOP newStructure = null;
      if (newFS instanceof TOP) {
        newStructure = (TOP) newFS;
        fillFeatures(newStructure, map, annotationFS, element, rowWhere, stream);
        newStructure.addToIndexes();
      }
    }
  }
View Full Code Here

      } catch (CASException e1) {
        logAndThrow(e1, jcasView);
      }

      // Return eq fs instance if already created
      TOP fs = jcasView.getJfsFromCaddr(addr);
      if (null != fs) {
        fs.jcasType = jcasView.getType(type);
      } else {
        initargs[0] = Integer.valueOf(addr);
        initargs[1] = jcasView.getType(type);
View Full Code Here

    TypeSystem ts = aList.getCAS().getTypeSystem();
    List<FeatureStructure> data = new ArrayList<FeatureStructure>();
    FSList i = aList;
    while (i instanceof NonEmptyFSList) {
      NonEmptyFSList l = (NonEmptyFSList) i;
      TOP value = l.getHead();
      if (value != null && (type == null || ts.subsumes(type, value.getType()))) {
        data.add(l.getHead());
      }
      i = l.getTail();
    }
View Full Code Here

  public void testGetAllFSOfAnnotationType() {
    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);

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

      } catch (CASException e1) {
        logAndThrow(e1, jcasView);
      }

      // Return eq fs instance if already created
      TOP fs = jcasView.getJfsFromCaddr(addr);
      if (null != fs) {
        fs.jcasType = jcasView.getType(type);
      } else {
        initargs[0] = Integer.valueOf(addr);
        initargs[1] = jcasView.getType(type);
View Full Code Here

      }
      CasCopier copier = new CasCopier(goldView.getCas(), systemView.getCas());
      Feature sofaFeature = jCas.getTypeSystem().getFeatureByFullName(CAS.FEATURE_FULL_NAME_SOFA);
      for (Class<? extends TOP> annotationClass : this.annotationClasses) {
        for (TOP annotation : JCasUtil.select(goldView, annotationClass)) {
          TOP copy = (TOP) copier.copyFs(annotation);
          if (copy instanceof Annotation) {
            copy.setFeatureValue(sofaFeature, systemView.getSofa());
          }
          copy.addToIndexes(systemView);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.jcas.cas.TOP

Copyright © 2018 www.massapicom. 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.