[457892] Demand creating packages for XMI and MOF namespace URIs.
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLExtendedMetaData.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLExtendedMetaData.java
index e202499..cf1c9d4 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLExtendedMetaData.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLExtendedMetaData.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2006, 2015 IBM Corporation, Embarcadero Technologies, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (Embarcadero Technologies) - 204202
- * Kenn Hussey (CEA) - 327039, 351774, 418466
+ * Kenn Hussey (CEA) - 327039, 351774, 418466, 457892
*
*/
package org.eclipse.uml2.uml.resource;
@@ -93,6 +93,18 @@
@Override
public EPackage getPackage(String namespace) {
+ if (XMI2UMLResource.XMI_NS_URI.equals(namespace)
+ || XMI2UMLResource.XMI_2_4_1_NS_URI.equals(namespace)
+ || XMI2UMLResource.XMI_2_4_NS_URI.equals(namespace)
+ || XMI2UMLResource.XMI_2_1_NS_URI.equals(namespace)
+ || XMI2UMLResource.MOF_NS_URI.equals(namespace)
+ || XMI2UMLResource.MOF_2_4_1_NS_URI.equals(namespace)
+ || XMI2UMLResource.MOF_2_4_NS_URI.equals(namespace)
+ || XMI2UMLResource.MOF_2_0_NS_URI.equals(namespace)) {
+
+ return demandPackage(namespace);
+ }
+
return XMI2UMLResource.UML_METAMODEL_NS_URI.equals(namespace)
|| XMI2UMLResource.UML_METAMODEL_2_4_1_NS_URI.equals(namespace)
|| XMI2UMLResource.UML_METAMODEL_2_4_NS_URI.equals(namespace)
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLResource.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLResource.java
index d26ea1e..1a38d32 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLResource.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/XMI2UMLResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2006, 2015 IBM Corporation, Embarcadero Technologies, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (Embarcadero Technologies) - 204202, 156879, 226397
- * Kenn Hussey (CEA) - 327039, 351774, 418466
+ * Kenn Hussey (CEA) - 327039, 351774, 418466, 457892
*
*/
package org.eclipse.uml2.uml.resource;
@@ -150,4 +150,14 @@
String XMI_NS_URI = XMI_2_5_NS_URI;
+ String MOF_2_0_NS_URI = "http://schema.omg.org/spec/MOF/2.0"; //$NON-NLS-1$
+
+ String MOF_2_4_NS_URI = "http://www.omg.org/spec/MOF/20100901"; //$NON-NLS-1$
+
+ String MOF_2_4_1_NS_URI = "http://www.omg.org/spec/MOF/20110701"; //$NON-NLS-1$
+
+ String MOF_2_5_NS_URI = "http://www.omg.org/spec/MOF/20131001"; //$NON-NLS-1$
+
+ String MOF_NS_URI = MOF_2_5_NS_URI;
+
}