/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED: if (coreType) return getMixed(); return ((FeatureMap.Internal)getMixed()).getWrapper(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: if (coreType) return getXMLNSPrefixMap(); else return getXMLNSPrefixMap().map(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: if (coreType) return getXSISchemaLocation(); else return getXSISchemaLocation().map(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__BASE: return getBase(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__ID: return getId(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__LANG: return getLang(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE: return getSpace(); } return eDynamicGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED: return mixed != null && !mixed.isEmpty(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__BASE: return BASE_EDEFAULT == null ? base != null : !BASE_EDEFAULT.equals(base); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__LANG: return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE: return isSetSpace(); } return eDynamicIsSet(featureID); }
/** * Validates the WellFormedNsPrefix constraint of '<em>EPackage</em>'. * <!-- begin-user-doc --> * The namespace prefix must be either the empty string * or a {@link XMLTypeValidator#validateNCName(String, DiagnosticChain, Map) valid NCName} * that does not start with any case combination of the three letters * <a href="http://www.w3.org/TR/REC-xml-names/#xmlReserved">"xml"</a>. * <!-- end-user-doc --> * @generated NOT */ public boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage, DiagnosticChain diagnostics, Map<Object, Object> context) { String nsPrefix = ePackage.getNsPrefix(); boolean result = "".equals(nsPrefix) || nsPrefix != null && XMLTypeValidator.INSTANCE.validateNCName(nsPrefix, null, context) && (!nsPrefix.toLowerCase().startsWith("xml") || XMLNamespacePackage.eNS_URI.equals(ePackage.getNsURI())); if (!result && diagnostics != null) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, WELL_FORMED_NS_PREFIX, "_UI_EPackageNsPrefixNotWellFormed_diagnostic", new Object[] { nsPrefix }, new Object[] { ePackage, EcorePackage.Literals.EPACKAGE__NS_PREFIX }, context)); } return result; }
/** * Validates the WellFormedNsPrefix constraint of '<em>EPackage</em>'. * <!-- begin-user-doc --> * The namespace prefix must be either the empty string * or a {@link XMLTypeValidator#validateNCName(String, DiagnosticChain, Map) valid NCName} * that does not start with any case combination of the three letters * <a href="http://www.w3.org/TR/REC-xml-names/#xmlReserved">"xml"</a>. * <!-- end-user-doc --> * @generated NOT */ public boolean validateEPackage_WellFormedNsPrefix(EPackage ePackage, DiagnosticChain diagnostics, Map<Object, Object> context) { String nsPrefix = ePackage.getNsPrefix(); boolean result = "".equals(nsPrefix) || nsPrefix != null && XMLTypeValidator.INSTANCE.validateNCName(nsPrefix, null, context) && (!nsPrefix.toLowerCase().startsWith("xml") || XMLNamespacePackage.eNS_URI.equals(ePackage.getNsURI())); if (!result && diagnostics != null) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, WELL_FORMED_NS_PREFIX, "_UI_EPackageNsPrefixNotWellFormed_diagnostic", new Object[] { nsPrefix }, new Object[] { ePackage }, context)); } return result; }
protected Set<EPackage> getReferencedEPackages(final List<EPackage> packs) { final HashSet<EPackage> result = CollectionLiterals.<EPackage>newHashSet(); for (final EPackage pkg : packs) { { final TreeIterator<EObject> iterator = pkg.eAllContents(); while (iterator.hasNext()) { { final EObject obj = iterator.next(); EList<EObject> _eCrossReferences = obj.eCrossReferences(); for (final EObject crossRef : _eCrossReferences) { boolean _eIsProxy = crossRef.eIsProxy(); if (_eIsProxy) { URI _eProxyURI = ((InternalEObject) crossRef).eProxyURI(); String _plus = ("Proxy \'" + _eProxyURI); String _plus_1 = (_plus + "\' could not be resolved"); EMFGeneratorFragment2.LOG.error(_plus_1); } else { final EPackage p = EcoreUtil2.<EPackage>getContainerOfType(crossRef, EPackage.class); if ((p != null)) { result.add(p); } } } } } } } result.removeAll(packs); result.remove(EcorePackage.eINSTANCE); result.remove(XMLTypePackage.eINSTANCE); result.remove(XMLNamespacePackage.eINSTANCE); return result; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link ToscaPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static ToscaPackage init() { if (isInited) return (ToscaPackage)EPackage.Registry.INSTANCE.getEPackage(ToscaPackage.eNS_URI); // Obtain or create and register package ToscaPackageImpl theToscaPackage = (ToscaPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ToscaPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ToscaPackageImpl()); isInited = true; // Initialize simple dependencies XMLNamespacePackage.eINSTANCE.eClass(); XMLTypePackage.eINSTANCE.eClass(); // Create package meta-data objects theToscaPackage.createPackageContents(); // Initialize created meta-data theToscaPackage.initializePackageContents(); // Register package validator EValidator.Registry.INSTANCE.put (theToscaPackage, new EValidator.Descriptor() { public EValidator getEValidator() { return ToscaValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed theToscaPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(ToscaPackage.eNS_URI, theToscaPackage); return theToscaPackage; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XlinkPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XlinkPackage init() { if (isInited) return (XlinkPackage)EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI); // Obtain or create and register package XlinkPackageImpl theXlinkPackage = (XlinkPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XlinkPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XlinkPackageImpl()); isInited = true; // Initialize simple dependencies XMLNamespacePackage.eINSTANCE.eClass(); XMLTypePackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies XmldsigPackageImpl theXmldsigPackage = (XmldsigPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI) instanceof XmldsigPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI) : XmldsigPackage.eINSTANCE); PartnerPackageImpl thePartnerPackage = (PartnerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PartnerPackage.eNS_URI) instanceof PartnerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PartnerPackage.eNS_URI) : PartnerPackage.eINSTANCE); // Create package meta-data objects theXlinkPackage.createPackageContents(); theXmldsigPackage.createPackageContents(); thePartnerPackage.createPackageContents(); // Initialize created meta-data theXlinkPackage.initializePackageContents(); theXmldsigPackage.initializePackageContents(); thePartnerPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theXlinkPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XlinkPackage.eNS_URI, theXlinkPackage); return theXlinkPackage; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XmldsigPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XmldsigPackage init() { if (isInited) return (XmldsigPackage)EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI); // Obtain or create and register package XmldsigPackageImpl theXmldsigPackage = (XmldsigPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XmldsigPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XmldsigPackageImpl()); isInited = true; // Initialize simple dependencies XMLNamespacePackage.eINSTANCE.eClass(); XMLTypePackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies PartnerPackageImpl thePartnerPackage = (PartnerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PartnerPackage.eNS_URI) instanceof PartnerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PartnerPackage.eNS_URI) : PartnerPackage.eINSTANCE); XlinkPackageImpl theXlinkPackage = (XlinkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI) instanceof XlinkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI) : XlinkPackage.eINSTANCE); // Create package meta-data objects theXmldsigPackage.createPackageContents(); thePartnerPackage.createPackageContents(); theXlinkPackage.createPackageContents(); // Initialize created meta-data theXmldsigPackage.initializePackageContents(); thePartnerPackage.initializePackageContents(); theXlinkPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theXmldsigPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XmldsigPackage.eNS_URI, theXmldsigPackage); return theXmldsigPackage; }
private final void registerEPackageStd() { EPackage.Registry.INSTANCE.clear(); EPackage.Registry.INSTANCE.put(ReqIF10Package.eNS_URI, ReqIF10Package.eINSTANCE); EPackage.Registry.INSTANCE.put(XhtmlPackage.eNS_URI, XhtmlPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(DatatypesPackage.eNS_URI, DatatypesPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(XMLNamespacePackage.eNS_URI, XMLNamespacePackage.eINSTANCE); }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XMLNamespacePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static XMLNamespacePackage init() { if (isInited) return (XMLNamespacePackage)EPackage.Registry.INSTANCE.getEPackage(XMLNamespacePackage.eNS_URI); // Obtain or create and register package XMLNamespacePackageImpl theXMLNamespacePackage = (XMLNamespacePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XMLNamespacePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XMLNamespacePackageImpl()); isInited = true; // Initialize simple dependencies XMLTypePackage.eINSTANCE.eClass(); // Create package meta-data objects theXMLNamespacePackage.createPackageContents(); // Initialize created meta-data theXMLNamespacePackage.initializePackageContents(); // Register package validator EValidator.Registry.INSTANCE.put (theXMLNamespacePackage, new EValidator.Descriptor() { public EValidator getEValidator() { return XMLNamespaceValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed theXMLNamespacePackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(XMLNamespacePackage.eNS_URI, theXMLNamespacePackage); return theXMLNamespacePackage; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return XMLNamespacePackage.Literals.XML_NAMESPACE_DOCUMENT_ROOT; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EMap<String, String> getXMLNSPrefixMap() { if (xMLNSPrefixMap == null) { xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP); } return xMLNSPrefixMap; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EMap<String, String> getXSISchemaLocation() { if (xSISchemaLocation == null) { xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); } return xSISchemaLocation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setBase(String newBase) { String oldBase = base; base = newBase; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__BASE, oldBase, base)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__ID, oldId, id)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLang(String newLang) { String oldLang = lang; lang = newLang; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__LANG, oldLang, lang)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setSpace(SpaceType newSpace) { SpaceType oldSpace = space; space = newSpace == null ? SPACE_EDEFAULT : newSpace; boolean oldSpaceESet = spaceESet; spaceESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE, oldSpace, space, !oldSpaceESet)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetSpace() { SpaceType oldSpace = space; boolean oldSpaceESet = spaceESet; space = SPACE_EDEFAULT; spaceESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE, oldSpace, SPACE_EDEFAULT, oldSpaceESet)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED: return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs); } return eDynamicInverseRemove(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal)getMixed()).set(newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__BASE: setBase((String)newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__ID: setId((String)newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__LANG: setLang((String)newValue); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE: setSpace((SpaceType)newValue); return; } eDynamicSet(featureID, newValue); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED: getMixed().clear(); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: getXMLNSPrefixMap().clear(); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: getXSISchemaLocation().clear(); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__BASE: setBase(BASE_EDEFAULT); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__ID: setId(ID_EDEFAULT); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__LANG: setLang(LANG_EDEFAULT); return; case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__SPACE: unsetSpace(); return; } eDynamicUnset(featureID); }
protected boolean isBuiltinEDataType(EDataType eDataType) { EPackage ePackage = eDataType.getEPackage(); if (ePackage == EcorePackage.eINSTANCE || ePackage == XMLTypePackage.eINSTANCE || ePackage == XMLNamespacePackage.eINSTANCE) { return true; } EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType); if (baseType != null) { return isBuiltinEDataType(baseType); } EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType); if (itemType != null) { return isBuiltinEDataType(itemType); } List<EDataType> memberTypes = ExtendedMetaData.INSTANCE.getMemberTypes(eDataType); if (!memberTypes.isEmpty()) { for (EDataType memberType : memberTypes) { if (!isBuiltinEDataType(memberType)) { return false; } } return true; } return false; }
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link PartnerPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static PartnerPackage init() { if (isInited) return (PartnerPackage)EPackage.Registry.INSTANCE.getEPackage(PartnerPackage.eNS_URI); // Obtain or create and register package PartnerPackageImpl thePartnerPackage = (PartnerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PartnerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PartnerPackageImpl()); isInited = true; // Initialize simple dependencies XMLNamespacePackage.eINSTANCE.eClass(); XMLTypePackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies XmldsigPackageImpl theXmldsigPackage = (XmldsigPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI) instanceof XmldsigPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI) : XmldsigPackage.eINSTANCE); XlinkPackageImpl theXlinkPackage = (XlinkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI) instanceof XlinkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI) : XlinkPackage.eINSTANCE); // Create package meta-data objects thePartnerPackage.createPackageContents(); theXmldsigPackage.createPackageContents(); theXlinkPackage.createPackageContents(); // Initialize created meta-data thePartnerPackage.initializePackageContents(); theXmldsigPackage.initializePackageContents(); theXlinkPackage.initializePackageContents(); // Register package validator EValidator.Registry.INSTANCE.put (thePartnerPackage, new EValidator.Descriptor() { public EValidator getEValidator() { return PartnerValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed thePartnerPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(PartnerPackage.eNS_URI, thePartnerPackage); return thePartnerPackage; }