@Override public boolean isMultipleReferencesAllowed() { return delegate.isMultipleReferencesAllowed(); }
@Override public boolean isMultipleReferencesAllowed() { checkDelegate(); return delegate.isMultipleReferencesAllowed(); }
public boolean isStaticMultiRef(int featCode) { return tsi.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed(); }
if (feature.isMultipleReferencesAllowed()) {
private void encodeFeatureDecls(TypeSystemImpl ts) { final int max = ts.getSmallestFeature() + ts.getNumberOfFeatures(); this.featureNames = new String[max]; this.featDecls = new int[max * 3]; Feature f; for (int i = ts.getSmallestFeature(); i < max; i++) { f = ts.ll_getFeatureForCode(i); this.featureNames[i] = f.getShortName(); this.featDecls[i * 3] = ((TypeImpl) f.getDomain()).getCode(); this.featDecls[(i * 3) + 1] = ((TypeImpl) f.getRange()).getCode(); this.featDecls[(i * 3) + 2] = f.isMultipleReferencesAllowed() ? 1 : 0; } }
if (casBeingFilled.ll_isRefType(typeCode) && (featureType[feats[i]] == LowLevelCAS.TYPE_CLASS_FS || feat .isMultipleReferencesAllowed())) { int featVal = casBeingFilled.getFeatureValue(addr, feats[i]); if (featVal != CASImpl.NULL ) {
case LowLevelCAS.TYPE_CLASS_DOUBLEARRAY: case LowLevelCAS.TYPE_CLASS_FSARRAY: { if (ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { case CasSerializerSupport.TYPE_CLASS_STRINGLIST: case CasSerializerSupport.TYPE_CLASS_FSLIST: { if (ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) {
if (!ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { addNonsharedFSToEncompassingFSMapping(casArray, addr); if (!ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { addNonsharedFSToEncompassingFSMapping(listFS, addr); if (!ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { addNonsharedFSToEncompassingFSMapping(listFS, addr); if (!ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { addNonsharedFSToEncompassingFSMapping(listFS, addr); if (!ts.ll_getFeatureForCode(featCode).isMultipleReferencesAllowed()) { for (int i=0; i < fslistnodes.size(); i++) { addNonsharedFSToEncompassingFSMapping(fslistnodes.get(i), addr);
/** * Convert a {@link Feature} to an equivalent {@link FeatureDescription}. * * @param aFeature * feature object to convert * @return a FeatureDescription that is equivalent to <code>aFeature</code> */ public static FeatureDescription feature2FeatureDescription(Feature aFeature) { FeatureDescription featDesc = UIMAFramework.getResourceSpecifierFactory() .createFeatureDescription(); featDesc.setName(aFeature.getShortName()); if (aFeature.isMultipleReferencesAllowed()) { featDesc.setMultipleReferencesAllowed(true); } Type rangeType = aFeature.getRange(); //special check for array range types, which are represented in the CAS as //elementType[] but in the descriptor as an FSArray with an <elementType> if (rangeType.isArray() && !rangeType.getComponentType().isPrimitive()) { featDesc.setRangeTypeName(CAS.TYPE_NAME_FS_ARRAY); String elementTypeName = rangeType.getComponentType().getName(); if (!CAS.TYPE_NAME_TOP.equals(elementTypeName)) { featDesc.setElementType(elementTypeName); } } else { featDesc.setRangeTypeName(rangeType.getName()); } return featDesc; }