@Override protected void saveFeatureMapElementReference(EObject o, EReference f) { if (extendedMetaData == null || extendedMetaData.getFeatureKind(f) != ExtendedMetaData.ELEMENT_FEATURE) { saveHref(o, f); } else { saveElementReference(o, f); } } }
@Override protected void saveFeatureMapElementReference(EObject o, EReference f) { if (extendedMetaData == null || extendedMetaData.getFeatureKind(f) != ExtendedMetaData.ELEMENT_FEATURE) { saveHref(o, f); } else { saveElementReference(o, f); } } }
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 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; } }
protected XSDFeature buildGlobalFeature(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature) { switch (extendedMetaData.getFeatureKind(eStructuralFeature)) { case ExtendedMetaData.ELEMENT_FEATURE: { XSDElementDeclaration xsdElementDeclaration = buildGlobalElement(xsdSchema, eStructuralFeature); return xsdElementDeclaration; } case ExtendedMetaData.ATTRIBUTE_FEATURE: { XSDAttributeDeclaration xsdAttributeDeclaration = buildGlobalAttribute(xsdSchema, eStructuralFeature); return xsdAttributeDeclaration; } case ExtendedMetaData.ELEMENT_WILDCARD_FEATURE: case ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE: case ExtendedMetaData.SIMPLE_FEATURE: case ExtendedMetaData.GROUP_FEATURE: default: { return null; } } }
protected XSDFeature buildGlobalFeature(XSDSchema xsdSchema, EStructuralFeature eStructuralFeature) { switch (extendedMetaData.getFeatureKind(eStructuralFeature)) { case ExtendedMetaData.ELEMENT_FEATURE: { XSDElementDeclaration xsdElementDeclaration = buildGlobalElement(xsdSchema, eStructuralFeature); return xsdElementDeclaration; } case ExtendedMetaData.ATTRIBUTE_FEATURE: { XSDAttributeDeclaration xsdAttributeDeclaration = buildGlobalAttribute(xsdSchema, eStructuralFeature); return xsdAttributeDeclaration; } case ExtendedMetaData.ELEMENT_WILDCARD_FEATURE: case ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE: case ExtendedMetaData.SIMPLE_FEATURE: case ExtendedMetaData.GROUP_FEATURE: default: { return null; } } }
return (affiliationUpperBound > 1 || affiliationUpperBound == ETypedElement.UNBOUNDED_MULTIPLICITY) && ExtendedMetaData.INSTANCE.getFeatureKind(affiliation) != ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE;
return (affiliationUpperBound > 1 || affiliationUpperBound == ETypedElement.UNBOUNDED_MULTIPLICITY) && ExtendedMetaData.INSTANCE.getFeatureKind(affiliation) != ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE;
public boolean hasDelegateFeature() { EStructuralFeature ecoreFeature = getEcoreFeature(); EClass ecoreClass = ecoreFeature.getEContainingClass(); EStructuralFeature mixedFeature = getExtendedMetaData().getMixedFeature(ecoreClass); return (mixedFeature != null && mixedFeature != ecoreFeature && getExtendedMetaData().getFeatureKind(ecoreFeature) >= ExtendedMetaData.ELEMENT_FEATURE) || getExtendedMetaData().getGroup(ecoreFeature) != null; }
extendedMetaData.getFeatureKind(eStructuralFeature) != ExtendedMetaData.UNSPECIFIED_FEATURE)
if (extendedMetaData != null && eType == EcorePackage.Literals.EOBJECT && extendedMetaData.getFeatureKind(feature) != ExtendedMetaData.UNSPECIFIED_FEATURE) if (extendedMetaData != null && eType == EcorePackage.Literals.EOBJECT && extendedMetaData.getFeatureKind(feature) != ExtendedMetaData.UNSPECIFIED_FEATURE)
extendedMetaData.getFeatureKind(eStructuralFeature) != ExtendedMetaData.UNSPECIFIED_FEATURE)
public boolean hasDelegateFeature() { EStructuralFeature ecoreFeature = getEcoreFeature(); EClass ecoreClass = ecoreFeature.getEContainingClass(); EStructuralFeature mixedFeature = getExtendedMetaData().getMixedFeature(ecoreClass); return (mixedFeature != null && mixedFeature != ecoreFeature && isPotentialDelegatingFeatureKind(getExtendedMetaData().getFeatureKind(ecoreFeature))) || getExtendedMetaData().getGroup(ecoreFeature) != null; }
public FeatureMap.Entry.Internal getFeatureMapEntryPrototype() { if (prototypeFeatureMapEntry == null) { EReference eOpposite = getEOpposite(); if (eOpposite != null) { prototypeFeatureMapEntry = new InverseUpdatingFeatureMapEntry(this, null); } else if (isContainment()) { // create containment one. prototypeFeatureMapEntry = new ContainmentUpdatingFeatureMapEntry(this, null); } else if (ExtendedMetaData.INSTANCE.getFeatureKind(this) == ExtendedMetaData.SIMPLE_FEATURE) { prototypeFeatureMapEntry = new SimpleContentFeatureMapEntry(this); } else { prototypeFeatureMapEntry = new SimpleFeatureMapEntry(this, null); } } return prototypeFeatureMapEntry; }
public FeatureMap.Entry.Internal getFeatureMapEntryPrototype() { if (prototypeFeatureMapEntry == null) { EReference eOpposite = getEOpposite(); if (eOpposite != null) { prototypeFeatureMapEntry = new InverseUpdatingFeatureMapEntry(this, null); } else if (isContainment()) { // create containment one. prototypeFeatureMapEntry = new ContainmentUpdatingFeatureMapEntry(this, null); } else if (ExtendedMetaData.INSTANCE.getFeatureKind(this) == ExtendedMetaData.SIMPLE_FEATURE) { prototypeFeatureMapEntry = new SimpleContentFeatureMapEntry(this); } else { prototypeFeatureMapEntry = new SimpleFeatureMapEntry(this, null); } } return prototypeFeatureMapEntry; }
public GenFeature getDelegateFeature() { EStructuralFeature ecoreFeature = getEcoreFeature(); EClass ecoreClass = ecoreFeature.getEContainingClass(); EStructuralFeature eStructuralFeature = getExtendedMetaData().getGroup(ecoreFeature); if (eStructuralFeature == null && getExtendedMetaData().getFeatureKind(ecoreFeature) >= ExtendedMetaData.ELEMENT_FEATURE) { eStructuralFeature = getExtendedMetaData().getMixedFeature(ecoreClass); } if (eStructuralFeature != null && eStructuralFeature != ecoreFeature) { return findGenFeature(eStructuralFeature); } else { return null; } }
public GenFeature getDelegateFeature() { EStructuralFeature ecoreFeature = getEcoreFeature(); EClass ecoreClass = ecoreFeature.getEContainingClass(); EStructuralFeature eStructuralFeature = getExtendedMetaData().getGroup(ecoreFeature); if (eStructuralFeature == null && isPotentialDelegatingFeatureKind(getExtendedMetaData().getFeatureKind(ecoreFeature))) { eStructuralFeature = getExtendedMetaData().getMixedFeature(ecoreClass); } if (eStructuralFeature != null && eStructuralFeature != ecoreFeature) { return findGenFeature(eStructuralFeature); } else { return null; } }
(pi.getData() != null && pi.getData().length() > 0 ? " " + encode(pi.getData()) + "?>" : "?>"); else if (ExtendedMetaData.INSTANCE.getFeatureKind(feature) == ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE && isEntryAttribute())
(eReference.isContainment() && (getGenClass().isDocumentRoot() ? getExtendedMetaData().getFeatureKind(eFeature) == ExtendedMetaData.ELEMENT_FEATURE : !hasDelegateFeature())); setCreateChild(isChildren() && isChangeable());
(eReference.isContainment() && (getGenClass().isDocumentRoot() ? getExtendedMetaData().getFeatureKind(eFeature) == ExtendedMetaData.ELEMENT_FEATURE : !hasDelegateFeature())); setCreateChild(isChildren() && isChangeable());