Examples of ll_getCodeForType()


Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

  public static boolean isRestrictedByAllowedValues(TypeSystem ts, Type type) {
   
    if (ts.getType(CAS.TYPE_NAME_STRING).equals(type) ||
            ts.subsumes(ts.getType(CAS.TYPE_NAME_STRING), type)) {
      LowLevelTypeSystem lts = ts.getLowLevelTypeSystem();
      final int typeCode = lts.ll_getCodeForType(type);
      String[] strings = lts.ll_getStringSet(typeCode);
     
      return strings.length > 0;
    }
    else {
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

    if (isRestrictedByAllowedValues(ts, type)) {
      throw new IllegalArgumentException("Type " + type.getName() + " does not defines allowed values!");
    }
   
    LowLevelTypeSystem lts = ts.getLowLevelTypeSystem();
    final int typeCode = lts.ll_getCodeForType(type);
   
    return lts.ll_getStringSet(typeCode);
  }
 
}
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

    // incorrectly classified as ref types.
    lp.toString();

    LowLevelCAS llc = this.cas.getLowLevelCAS();
    LowLevelTypeSystem llts = llc.ll_getTypeSystem();
    final int tokenTypeCode = llts.ll_getCodeForType(this.tokenType);
    final int addr = llc.ll_createFS(tokenTypeCode);
    final int lemmaFeatCode = llts.ll_getCodeForFeature(this.lemmaFeat);
    llc.ll_setStringValue(addr, lemmaFeatCode, "test", true);
    assertTrue(llc.ll_getCharBufferValueSize(addr, lemmaFeatCode) == 4);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

              {
                this.fileWriter.write(", ");
              }

              Feature fs = features[f];
              int typeClass = ll_cas.ll_getTypeClass(ll_typeSystem.ll_getCodeForType(fs.getRange()));
              this.fileWriter.write(fs.getShortName() + "=");
             
              switch (typeClass)
              {
                case LowLevelCAS.TYPE_CLASS_FLOAT :
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

  public static boolean isRestrictedByAllowedValues(TypeSystem ts, Type type) {
   
    if (ts.getType(CAS.TYPE_NAME_STRING).equals(type) ||
            ts.subsumes(ts.getType(CAS.TYPE_NAME_STRING), type)) {
      LowLevelTypeSystem lts = ts.getLowLevelTypeSystem();
      final int typeCode = lts.ll_getCodeForType(type);
      String[] strings = lts.ll_getStringSet(typeCode);
     
      return strings.length > 0;
    }
    else {
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

    if (isRestrictedByAllowedValues(ts, type)) {
      throw new IllegalArgumentException("Type " + type.getName() + " does not defines allowed values!");
    }
   
    LowLevelTypeSystem lts = ts.getLowLevelTypeSystem();
    final int typeCode = lts.ll_getCodeForType(type);
   
    return lts.ll_getStringSet(typeCode);
  }
 
}
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

   * @return array of allowed values for <code>aType</code> TODO - this should be a method on
   *         Type.
   */
  public static String[] getAllowedValuesForType(Type aType, TypeSystem aTypeSystem) {
    LowLevelTypeSystem lts = aTypeSystem.getLowLevelTypeSystem();
    return lts.ll_getStringSet(lts.ll_getCodeForType(aType));
  }

}
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

    // incorrectly classified as ref types.
    lp.toString();

    LowLevelCAS llc = this.cas.getLowLevelCAS();
    LowLevelTypeSystem llts = llc.ll_getTypeSystem();
    final int tokenTypeCode = llts.ll_getCodeForType(this.tokenType);
    final int addr = llc.ll_createFS(tokenTypeCode);
    final int lemmaFeatCode = llts.ll_getCodeForFeature(this.lemmaFeat);
    llc.ll_setStringValue(addr, lemmaFeatCode, "test", true);
    assertTrue(llc.ll_getCharBufferValueSize(addr, lemmaFeatCode) == 4);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

   * @return array of allowed values for <code>aType</code> TODO - this should be a method on
   *         Type.
   */
  public static String[] getAllowedValuesForType(Type aType, TypeSystem aTypeSystem) {
    LowLevelTypeSystem lts = aTypeSystem.getLowLevelTypeSystem();
    return lts.ll_getStringSet(lts.ll_getCodeForType(aType));
  }

}
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelTypeSystem.ll_getCodeForType()

   * @return array of allowed values for <code>aType</code> TODO - this should be a method on
   *         Type.
   */
  public static String[] getAllowedValuesForType(Type aType, TypeSystem aTypeSystem) {
    LowLevelTypeSystem lts = aTypeSystem.getLowLevelTypeSystem();
    return lts.ll_getStringSet(lts.ll_getCodeForType(aType));
  }

}
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.