@Override protected Object doGetValue() { return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
@Override protected Object doGetValue() { return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
@Override protected Object doGetValue(Object source) { EObject eObj = (EObject)source; return ExtendedMetaData.INSTANCE.getAffiliation(eObj.eClass(), eStructuralFeature) == null ? null : eObj.eGet(eStructuralFeature); }
@Override protected Object doGetValue(Object source) { EObject eObj = (EObject)source; return ExtendedMetaData.INSTANCE.getAffiliation(eObj.eClass(), eStructuralFeature) == null ? null : eObj.eGet(eStructuralFeature); }
@Override protected Object doGet(Object key) { EObject eObject = (EObject)key; return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
@Override protected Object doGetValue(Object source) { EObject eObj = (EObject)source; return ExtendedMetaData.INSTANCE.getAffiliation(eObj.eClass(), eStructuralFeature) == null ? null : eObj.eGet(eStructuralFeature); }
@Override protected Object doGetValue() { return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
@Override protected Object doGet(Object key) { EObject eObject = (EObject)key; return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
@Override protected Object doGet(Object key) { EObject eObject = (EObject)key; return ExtendedMetaData.INSTANCE.getAffiliation(eObject.eClass(), eStructuralFeature) == null ? null : eObject.eGet(eStructuralFeature); }
public boolean isIncluded(EStructuralFeature feature) { if (wildcards == ANY_WILDCARD) { int featureKind = ExtendedMetaData.INSTANCE.getFeatureKind(feature); return isElement ? featureKind == ExtendedMetaData.ELEMENT_FEATURE && feature != XMLTypeFeatures.TEXT && feature != XMLTypeFeatures.CDATA && feature != XMLTypeFeatures.COMMENT && feature != XMLTypeFeatures.PROCESSING_INSTRUCTION : featureKind == ExtendedMetaData.ATTRIBUTE_FEATURE; } if (groupMembers != null && (groupMembers.contains(feature) || groupMembers.contains(ExtendedMetaData.INSTANCE.getGroup(feature)) || groupMembers.contains(ExtendedMetaData.INSTANCE.getAffiliation(containingClass, feature)))) { return true; } if (wildcards != null) { if (ExtendedMetaData.INSTANCE.matches(wildcards, ExtendedMetaData.INSTANCE.getNamespace(feature))) { int featureKind = ExtendedMetaData.INSTANCE.getFeatureKind(feature); return isElement ? featureKind == ExtendedMetaData.ELEMENT_FEATURE : featureKind == ExtendedMetaData.ATTRIBUTE_FEATURE; } } return false; } }
public boolean eOpenIsSet(EStructuralFeature eFeature) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); return ((FeatureMap.Internal)featureMap).isSet(eFeature); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature"); } }
public Object eOpenGet(EStructuralFeature eFeature, boolean resolve) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); return ((FeatureMap.Internal)featureMap).get(eFeature, resolve); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature"); } }
public void eOpenUnset(EStructuralFeature eFeature) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); ((FeatureMap.Internal)featureMap).unset(eFeature); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } }
public boolean eOpenIsSet(EStructuralFeature eFeature) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); return ((FeatureMap.Internal)featureMap).isSet(eFeature); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature"); } }
public void eOpenSet(EStructuralFeature eFeature, Object newValue) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); if (openFeature == null) { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } } FeatureMap featureMap = (FeatureMap)eGet(openFeature); ((FeatureMap.Internal)featureMap).set(eFeature, newValue); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } }
public void eOpenUnset(EStructuralFeature eFeature) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); ((FeatureMap.Internal)featureMap).unset(eFeature); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } }
public Object eOpenGet(EStructuralFeature eFeature, boolean resolve) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); } FeatureMap featureMap = (FeatureMap)eGet(openFeature); return ((FeatureMap.Internal)featureMap).get(eFeature, resolve); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid feature"); } }
public void eOpenSet(EStructuralFeature eFeature, Object newValue) { EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); if (openFeature != null) { if (!FeatureMapUtil.isFeatureMap(openFeature)) { openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); if (openFeature == null) { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } } FeatureMap featureMap = (FeatureMap)eGet(openFeature); ((FeatureMap.Internal)featureMap).set(eFeature, newValue); } else { throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); } }
/** * Searches the document root object package for a changeable (non-abstract) element * that is affiliated with the given feature in the given class * and a classifier that exactly matches the given classifier * @param extendedMetaData the extended meta data in which to look up type information. * @param ePackage the package whose document root to search. * @param eContainingClass the containing class of the feature. * @param eStructuralFeature the target feature. * @param eClassifier the type of object being matched. * @return the substitution group feature or <code>null</code>. */ protected EStructuralFeature getSubstitutionGroup (ExtendedMetaData extendedMetaData, EPackage ePackage, EClass eContainingClass, EStructuralFeature eStructuralFeature, EClassifier eClassifier) { EClass eClass = extendedMetaData.getDocumentRoot(ePackage); if (eClass != null) { for (EStructuralFeature element : extendedMetaData.getElements(eClass)) { if (element.getEType() == eClassifier && element.isChangeable() && extendedMetaData.getAffiliation(eContainingClass, element) == eStructuralFeature) { return element; } } } return null; } }
/** * Searches the document root object package for a changeable (non-abstract) element * that is affiliated with the given feature in the given class * and a classifier that exactly matches the given classifier * @param extendedMetaData the extended meta data in which to look up type information. * @param ePackage the package whose document root to search. * @param eContainingClass the containing class of the feature. * @param eStructuralFeature the target feature. * @param eClassifier the type of object being matched. * @return the substitution group feature or <code>null</code>. */ protected EStructuralFeature getSubstitutionGroup (ExtendedMetaData extendedMetaData, EPackage ePackage, EClass eContainingClass, EStructuralFeature eStructuralFeature, EClassifier eClassifier) { EClass eClass = extendedMetaData.getDocumentRoot(ePackage); if (eClass != null) { for (EStructuralFeature element : extendedMetaData.getElements(eClass)) { if (element.getEType() == eClassifier && element.isChangeable() && extendedMetaData.getAffiliation(eContainingClass, element) == eStructuralFeature) { return element; } } } return null; } }