Package org.apache.uima.cas

Examples of org.apache.uima.cas.TypeSystem.subsumes()


    boolean result = true;
    boolean allEmpty1 = true;
    boolean allEmpty2 = true;
    for (Feature eachFeature1 : features1) {
      Type range = eachFeature1.getRange();
      if (typeSystem.subsumes(annotationType, range)) {
        String name = eachFeature1.getShortName();
        Feature eachFeature2 = type2.getFeatureByBaseName(name);
        FeatureStructure featureValue1 = a1.getFeatureValue(eachFeature1);
        FeatureStructure featureValue2 = a2.getFeatureValue(eachFeature2);
        allEmpty1 &= featureValue1 == null;
View Full Code Here


    this.tokenAnnotation = tokenAnnotation;
    TypeSystem ts = tokenAnnotation.getDocument().getCAS().getTypeSystem();
    Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
    Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
    Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
    isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
            || ts.subsumes(markupType, tokenAnnotation.getType())
            || ts.subsumes(numType, tokenAnnotation.getType())
    // || ts.subsumes(specialType, tokenAnnotation.getType()
    ;
  }
View Full Code Here

    TypeSystem ts = tokenAnnotation.getDocument().getCAS().getTypeSystem();
    Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
    Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
    Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
    isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
            || ts.subsumes(markupType, tokenAnnotation.getType())
            || ts.subsumes(numType, tokenAnnotation.getType())
    // || ts.subsumes(specialType, tokenAnnotation.getType()
    ;
  }
View Full Code Here

    Type wType = ts.getType(TextRulerToolkit.RUTA_WORD_TYPE_NAME);
    Type numType = ts.getType(TextRulerToolkit.RUTA_NUM_TYPE_NAME);
    Type markupType = ts.getType(TextRulerToolkit.RUTA_MARKUP_TYPE_NAME);
    isRegExpType = ts.subsumes(wType, tokenAnnotation.getType())
            || ts.subsumes(markupType, tokenAnnotation.getType())
            || ts.subsumes(numType, tokenAnnotation.getType())
    // || ts.subsumes(specialType, tokenAnnotation.getType()
    ;
  }

  protected TextRulerWordConstraint(TextRulerAnnotation tokenAnnotation, boolean isRegExpType) {
View Full Code Here

        if (fs.getBegin() < posStart || fs.getEnd() > posEnd) {
          it.moveToNext();
          continue;
        }
        if (rootType != null) {
          if (!ts.subsumes(rootType, fs.getType())) {
            it.moveToNext();
            continue;
          }
        }
        if (filterSet == null || !filterSet.contains(fs.getType().getName())) {
View Full Code Here

      if (fs.getEnd() <= tmTokenAnnotation.getBegin())
        break; // if that happens we are out of reach and can stop
      if (fs.getBegin() <= tmTokenAnnotation.getBegin()
              && fs.getEnd() >= tmTokenAnnotation.getEnd()
              && !allFilters.contains(fs.getType().getName())
              && !ts.subsumes(tmRootType, fs.getType()))
        result.add(fs);
    }

    // search from the token annotation to the right
    if (rightIt.isValid())
View Full Code Here

      if (fs.getBegin() >= tmTokenAnnotation.getEnd())
        break; // if that happens we are out of reach and can stop
      if (fs.getBegin() <= tmTokenAnnotation.getBegin()
              && fs.getEnd() >= tmTokenAnnotation.getEnd()
              && !allFilters.contains(fs.getType().getName())
              && !ts.subsumes(tmRootType, fs.getType()))
        result.add(fs);
    }
    return result;
  }
View Full Code Here

      return ((ArrayFS) fs).toArray();
    }
    CASImpl cas = (CASImpl) fs.getCAS();
    TypeSystem ts = cas.getTypeSystem();
    Type fsType = fs.getType();
    if (ts.subsumes(ts.getType("uima.cas.FloatList"), fsType)) {
      return (floatListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.IntegerList"), fsType)) {
      return (integerListToArray(fs));
    }
View Full Code Here

    TypeSystem ts = cas.getTypeSystem();
    Type fsType = fs.getType();
    if (ts.subsumes(ts.getType("uima.cas.FloatList"), fsType)) {
      return (floatListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.IntegerList"), fsType)) {
      return (integerListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.StringList"), fsType)) {
      return (stringListToArray(fs));
    }
View Full Code Here

      return (floatListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.IntegerList"), fsType)) {
      return (integerListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.StringList"), fsType)) {
      return (stringListToArray(fs));
    }
    if (ts.subsumes(ts.getType("uima.cas.FSList"), fsType)) {
      return (fsListToArray(fs));
    }
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.