public FSIndexComparatorImpl(CASImpl cas) { super(); this.keyVector = new Vector<Object>(); this.compVector = new IntVector(); this.keyTypeVector = new IntVector(); this.type = null; this.ts = cas.getTypeSystem(); this.cas = cas; }
/** * @see org.apache.uima.cas.SofaFS#getSofaID() This method is duplicated in * org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places. */ public String getSofaID() { final Feature sofaIDFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAID); return this.getStringValue(sofaIDFeat); } }
/** * @see org.apache.uima.cas.ArrayFS#size() This method is duplicated in * org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places. */ public FeatureStructure getLocalFSData() { final Feature arrayFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAARRAY); return this.getFeatureValue(arrayFeat); }
/** * @see org.apache.uima.cas.SofaFS#getLocalFSData() This method is duplicated in SofaFSImpl. Any * changes should be made in both places. */ public FeatureStructure getLocalFSData() { final Feature arrayFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAARRAY); return this.getFeatureValue(arrayFeat); }
public DefaultAnnotationComparator(CASImpl cas) { super(); this.cas = cas; this.startCode = ((FeatureImpl) cas.getTypeSystem().getFeatureByFullName( CAS.FEATURE_BASE_NAME_BEGIN)).getCode(); this.endCode = ((FeatureImpl) cas.getTypeSystem().getFeatureByFullName( CAS.FEATURE_BASE_NAME_END)).getCode(); }
/** * @see org.apache.uima.cas.ArrayFS#size() This method is duplicated in * org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places. */ public String getLocalStringData() { final Feature stringFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFASTRING); return this.getStringValue(stringFeat); }
/** * @see org.apache.uima.cas.SofaFS#getLocalStringData() This method is duplicated in SofaFSImpl. * Any changes should be made in both places. */ public String getLocalStringData() { final Feature stringFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFASTRING); return this.getStringValue(stringFeat); }
private boolean isSofaDataSet() { final Feature uriFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAURI); final Feature arrayFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAARRAY); final Feature stringFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFASTRING); if (null != this.getStringValue(uriFeat) || null != this.getFeatureValue(arrayFeat) || null != this.getStringValue(stringFeat)) { return true; } return false; }
private boolean isSofaDataSet() { final Feature uriFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAURI); final Feature arrayFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAARRAY); final Feature stringFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFASTRING); if (null != this.getStringValue(uriFeat) || null != this.getFeatureValue(arrayFeat) || null != this.getStringValue(stringFeat)) { return true; } return false; }
public boolean isAnnotationType(Type t) { return getTypeSystem().subsumes(getAnnotationType(), t); }
private boolean isEmptyList(LowLevelCAS cas, int type) { Type candidateType = cas.ll_getTypeSystem().ll_getTypeForCode(type); TypeSystem typeSystem = ((CASImpl) cas).getTypeSystem(); boolean isEmpty = false; for (int i = 0; i < this.emptyListTypes.length && (!isEmpty); i++) { isEmpty = typeSystem.subsumes(this.emptyListTypes[i], candidateType); } return isEmpty; }
public int getSofaRef() { final Feature numFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFANUM); return jcasType.casImpl.getLowLevelCAS().ll_getIntValue(super.addr, ((FeatureImpl) numFeat).getCode()); }
public String getSofaURI() { final Feature uriFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAURI); return jcasType.casImpl.getLowLevelCAS().ll_getStringValue(super.addr, ((FeatureImpl) uriFeat).getCode()); }
public String getSofaMime() { final Feature mimeFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAMIME); return this.casImpl.getLowLevelCAS().ll_getStringValue(super.addr, ((FeatureImpl) mimeFeat).getCode()); }
public String getSofaURI() { final Feature uriFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAURI); return this.casImpl.getLowLevelCAS().ll_getStringValue(super.addr, ((FeatureImpl) uriFeat).getCode()); }
/** * @see org.apache.uima.cas.SofaFS#setLocalSofaData(FeatureStructure) This method is duplicated in * SofaFSImpl. Any changes should be made in both places. */ public void setLocalSofaData(FeatureStructure aFS) { final Feature arrayFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAARRAY); if (isSofaDataSet()) { CASRuntimeException e = new CASRuntimeException(CASRuntimeException.SOFADATA_ALREADY_SET, new String[] { "setLocalSofaData()" }); throw e; } super.setFeatureValue(arrayFeat, aFS); }
public int getSofaRef() { final Feature numFeat = this.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFANUM); return this.casImpl.getLowLevelCAS().ll_getIntValue(super.addr, ((FeatureImpl) numFeat).getCode()); }
public String getSofaMime() { final Feature mimeFeat = jcasType.casImpl.getTypeSystem().getFeatureByFullName( CAS.FEATURE_FULL_NAME_SOFAMIME); return jcasType.casImpl.getLowLevelCAS().ll_getStringValue(super.addr, ((FeatureImpl) mimeFeat).getCode()); }
void setDocTextFromDeserializtion(String text) { if (mySofaIsValid()) { final int SofaStringCode = ll_getTypeSystem().ll_getCodeForFeature( this.getTypeSystem().getFeatureByFullName(CAS.FEATURE_FULL_NAME_SOFASTRING)); ll_setStringValue(this.getSofaRef(), SofaStringCode, text); } }
private XCASDocSerializer(ContentHandler ch, CASImpl cas) { super(); this.ch = ch; this.cas = cas; this.queued = new IntRedBlackTree(); this.duplicates = new IntRedBlackTree(); this.numDuplicates = 0; this.dupVectors = new Vector<IntVector>(); this.queue = new IntStack(); this.indexedFSs = new IntVector(); this.indexReps = new IntVector(); this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType( cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA)); }