@Override public boolean ll_getBooleanValue(int fsRef, int featureCode) { return CASImpl.TRUE == ll_getIntValue(fsRef, featureCode); }
private int getSofaNbr(final int addr, final CASImpl casView) { final int sofa = casView.ll_getIntValue(addr, annotSofaFeatCode, false); return (sofa == 0) ? 0 : casView.ll_getIntValue(sofa, sofaNbrFeatCode); } }
public int ll_getSofaNum(int sofaRef) { return ll_getIntValue(sofaRef, TypeSystemImpl.sofaNumFeatCode); } public String ll_getSofaID(int sofaRef) {
@Override public final int ll_getRefValue(int fsRef, int featureCode) { return ll_getIntValue(fsRef, featureCode); }
@Override public short ll_getShortValue(int fsRef, int featureCode) { return (short) (ll_getIntValue(fsRef, featureCode)); }
@Override public byte ll_getByteValue(int fsRef, int featureCode) { return (byte) ll_getIntValue(fsRef, featureCode); }
private int compareFeat(int o1, int o2, int featCode) { final int f1 = cas.ll_getIntValue(o1, featCode); final int f2 = cas.ll_getIntValue(o2, featCode); return compareInts(f1, f2); }
@Override public final int ll_getRefValue(int fsRef, int featureCode, boolean doTypeChecks) { if (doTypeChecks) { checkFsRefConditions(fsRef, featureCode); } return ll_getIntValue(fsRef, featureCode); }
@Override public final int ll_getIntValue(int fsRef, int featureCode, boolean doTypeChecks) { if (doTypeChecks) { checkNonArrayConditions(fsRef, TypeSystemImpl.intTypeCode, featureCode); } return ll_getIntValue(fsRef, featureCode); }
@Override public final float ll_getFloatValue(int fsRef, int featureCode) { return int2float(ll_getIntValue(fsRef, featureCode)); }
@Override public int ll_copyCharBufferValue(int fsRef, int featureCode, char[] buffer, int start) { final int stringCode = ll_getIntValue(fsRef, featureCode); if (stringCode == NULL) { return -1; } return this.getStringHeap().copyCharsToBuffer(stringCode, buffer, start); }
@Override public int ll_getCharBufferValueSize(int fsRef, int featureCode) { final int stringCode = ll_getIntValue(fsRef, featureCode); if (stringCode == NULL) { return -1; } return this.getStringHeap().getCharArrayLength(stringCode); }
@Override public final String ll_getStringValue(int fsRef, int featureCode) { return this.getStringHeap().getStringForCode(ll_getIntValue(fsRef, featureCode)); }
public void addSofa(FeatureStructure sofa, String sofaName, String mimeType) { if (this.svd.sofaNameSet.contains(sofaName)) { CASRuntimeException e = new CASRuntimeException(CASRuntimeException.SOFANAME_ALREADY_EXISTS, new String[] { sofaName }); throw e; } final int llsofa = ll_getFSRef(sofa); if (0 == ll_getIntValue(llsofa, TypeSystemImpl.sofaNumFeatCode)) { ll_setIntValue(llsofa, TypeSystemImpl.sofaNumFeatCode, ++this.svd.viewCount); } ll_setStringValue(llsofa, TypeSystemImpl.sofaIdFeatCode, sofaName); ll_setStringValue(llsofa, TypeSystemImpl.sofaMimeFeatCode, mimeType); this.getBaseIndexRepository().addFS(sofa); this.svd.sofaNameSet.add(sofaName); }
public String getFeatureValueAsString(int addr, int feat) { final TypeSystemImpl ts = this.svd.casMetadata.ts; int typeCode = ts.range(feat); if (typeCode == TypeSystemImpl.intTypeCode) { return Integer.toString(this.ll_getIntValue(addr, feat)); } else if (typeCode == TypeSystemImpl.floatTypeCode) { return Float.toString(this.ll_getFloatValue(addr, feat)); } else if (ts.subsumes(TypeSystemImpl.stringTypeCode, typeCode)) { return this.getStringValue(addr, feat); } else if (typeCode == TypeSystemImpl.booleanTypeCode) { return Boolean.toString(this.getBooleanValue(addr, feat)); } else if (typeCode == TypeSystemImpl.byteTypeCode) { return Byte.toString(this.getByteValue(addr, feat)); } else if (typeCode == TypeSystemImpl.shortTypeCode) { return Short.toString(this.getShortValue(addr, feat)); } else if (typeCode == TypeSystemImpl.longTypeCode) { return Long.toString(this.getLongValue(addr, feat)); } else if (typeCode == TypeSystemImpl.doubleTypeCode) { return Double.toString(this.getDoubleValue(addr, feat)); } else { CASRuntimeException e = new CASRuntimeException(CASRuntimeException.INAPPROP_RANGE, new String[] { ts.ll_getFeatureForCode(feat).getName(), ts.ll_getTypeForCode(typeCode).getName() }); throw e; } }