public void setWildcards(EStructuralFeature eStructuralFeature, List<String> wildcards) { if (wildcards.isEmpty()) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("wildcards"); eAnnotation.getDetails().remove("name"); } } else { String namespace = getNamespace(eStructuralFeature.getEContainingClass().getEPackage()); EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put("wildcards", getEncodedWildcards(namespace, wildcards)); eAnnotation.getDetails().put("name",""); } getExtendedMetaData(eStructuralFeature).setWildcards(wildcards); }
protected XSDWildcard buildAttributeWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature) { XSDWildcard xsdWildcard = XSDFactory.eINSTANCE.createXSDWildcard(); xsdWildcard.setStringLexicalNamespaceConstraint (BasicExtendedMetaData.getEncodedWildcards (extendedMetaData.getNamespace(eStructuralFeature.getEContainingClass()), extendedMetaData.getWildcards(eStructuralFeature))); xsdComplexTypeDefinition.setAttributeWildcardContent(xsdWildcard); map(xsdWildcard, eStructuralFeature); createEcoreAnnotation(xsdWildcard, "name", eStructuralFeature.getName()); buildAnnotations(xsdWildcard, eStructuralFeature); return xsdWildcard; }
protected XSDWildcard buildAttributeWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature) { XSDWildcard xsdWildcard = XSDFactory.eINSTANCE.createXSDWildcard(); xsdWildcard.setStringLexicalNamespaceConstraint (BasicExtendedMetaData.getEncodedWildcards (extendedMetaData.getNamespace(eStructuralFeature.getEContainingClass()), extendedMetaData.getWildcards(eStructuralFeature))); xsdComplexTypeDefinition.setAttributeWildcardContent(xsdWildcard); map(xsdWildcard, eStructuralFeature); createEcoreAnnotation(xsdWildcard, "name", eStructuralFeature.getName()); buildAnnotations(xsdWildcard, eStructuralFeature); return xsdWildcard; }
protected XSDWildcard buildElementWildcard(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature) { String name = extendedMetaData.getName(eStructuralFeature); if (":mixed".equals(name)) { xsdComplexTypeDefinition.setMixed(true); return null; } else { XSDWildcard xsdWildcard = XSDFactory.eINSTANCE.createXSDWildcard(); xsdWildcard.setStringLexicalNamespaceConstraint (BasicExtendedMetaData.getEncodedWildcards (extendedMetaData.getNamespace(eStructuralFeature.getEContainingClass()), extendedMetaData.getWildcards(eStructuralFeature))); XSDModelGroup xsdModelGroup = findOrCreateModelGroup(xsdComplexTypeDefinition); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(xsdWildcard); xsdModelGroup.getContents().add(particle); map(particle, eStructuralFeature); createEcoreAnnotation(xsdWildcard, "name", eStructuralFeature.getName()); buildAnnotations(xsdWildcard, eStructuralFeature); return xsdWildcard; } }
public void setWildcards(EStructuralFeature eStructuralFeature, List<String> wildcards) { if (wildcards.isEmpty()) { EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().removeKey("wildcards"); eAnnotation.getDetails().removeKey("name"); } } else { String namespace = getPackageNamespace(eStructuralFeature); EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); eAnnotation.getDetails().put("wildcards", getEncodedWildcards(namespace, wildcards)); eAnnotation.getDetails().put("name",""); } getExtendedMetaData(eStructuralFeature).setWildcards(wildcards); }
(BasicExtendedMetaData.getEncodedWildcards (extendedMetaData.getNamespace(eStructuralFeature.getEContainingClass()), extendedMetaData.getWildcards(eStructuralFeature)));