summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2013-02-15 10:22:54 (EST)
committerKaren Butzke2013-02-15 10:28:32 (EST)
commit084a62b3ccfbf7d3c76d2e82f6f16704ee992f45 (patch)
tree1c183a8c3842ad6dc418980c085dcb10faa46284
parent63766f877bdcdd1ca6659897e97eda090b06c2f6 (diff)
downloadwebtools.dali-084a62b3ccfbf7d3c76d2e82f6f16704ee992f45.zip
webtools.dali-084a62b3ccfbf7d3c76d2e82f6f16704ee992f45.tar.gz
webtools.dali-084a62b3ccfbf7d3c76d2e82f6f16704ee992f45.tar.bz2
Bug 400841 - update jpa 2.1 schemas for namespace change
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/model/common.ecore2
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/model/common.genmodel1
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/CommonPackage.java53
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObject.java29
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java103
-rw-r--r--common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml6
-rw-r--r--common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd23
-rw-r--r--common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/persistence_2_1.xsd20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/plugin.xml8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_1/JPA2_1.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/model/src/org/eclipse/jpt/jpa/eclipselink/core/resource/orm/XmlEntityMappings.java30
15 files changed, 292 insertions, 79 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/model/common.ecore b/common/plugins/org.eclipse.jpt.common.core/model/common.ecore
index 5463a6c..ef2f338 100644
--- a/common/plugins/org.eclipse.jpt.common.core/model/common.ecore
+++ b/common/plugins/org.eclipse.jpt.common.core/model/common.ecore
@@ -4,6 +4,8 @@
<eClassifiers xsi:type="ecore:EClass" name="ERootObjectImpl" abstract="true" eSuperTypes="#//ERootObject"/>
<eClassifiers xsi:type="ecore:EClass" name="ERootObject" abstract="true" interface="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespace" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="schemaLocation" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="impliedVersion" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
diff --git a/common/plugins/org.eclipse.jpt.common.core/model/common.genmodel b/common/plugins/org.eclipse.jpt.common.core/model/common.genmodel
index 668ad8b..48c8e4e 100644
--- a/common/plugins/org.eclipse.jpt.common.core/model/common.genmodel
+++ b/common/plugins/org.eclipse.jpt.common.core/model/common.genmodel
@@ -13,6 +13,7 @@
<genClasses image="false" ecoreClass="common.ecore#//ERootObjectImpl"/>
<genClasses image="false" ecoreClass="common.ecore#//ERootObject">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//ERootObject/version"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//ERootObject/namespace"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//ERootObject/schemaLocation"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//ERootObject/impliedVersion"/>
</genClasses>
diff --git a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/CommonPackage.java b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/CommonPackage.java
index e9cfc1a..6b31887 100644
--- a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/CommonPackage.java
+++ b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/CommonPackage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Oracle.
+ * Copyright (c) 2009, 2013 Oracle.
* 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
@@ -90,13 +90,22 @@ public class CommonPackage extends EPackageImpl
public static final int EROOT_OBJECT__VERSION = 0;
/**
+ * The feature id for the '<em><b>Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int EROOT_OBJECT__NAMESPACE = 1;
+
+ /**
* The feature id for the '<em><b>Schema Location</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- public static final int EROOT_OBJECT__SCHEMA_LOCATION = 1;
+ public static final int EROOT_OBJECT__SCHEMA_LOCATION = 2;
/**
* The feature id for the '<em><b>Implied Version</b></em>' attribute.
@@ -105,7 +114,7 @@ public class CommonPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int EROOT_OBJECT__IMPLIED_VERSION = 2;
+ public static final int EROOT_OBJECT__IMPLIED_VERSION = 3;
/**
* The number of structural features of the '<em>ERoot Object</em>' class.
@@ -114,7 +123,7 @@ public class CommonPackage extends EPackageImpl
* @generated
* @ordered
*/
- public static final int EROOT_OBJECT_FEATURE_COUNT = 3;
+ public static final int EROOT_OBJECT_FEATURE_COUNT = 4;
/**
* The meta object id for the '{@link org.eclipse.jpt.common.core.resource.xml.ERootObjectImpl <em>ERoot Object Impl</em>}' class.
@@ -136,6 +145,15 @@ public class CommonPackage extends EPackageImpl
public static final int EROOT_OBJECT_IMPL__VERSION = EROOT_OBJECT__VERSION;
/**
+ * The feature id for the '<em><b>Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int EROOT_OBJECT_IMPL__NAMESPACE = EROOT_OBJECT__NAMESPACE;
+
+ /**
* The feature id for the '<em><b>Schema Location</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -294,6 +312,21 @@ public class CommonPackage extends EPackageImpl
*/
public EAttribute getERootObject_SchemaLocation()
{
+ return (EAttribute)eRootObjectEClass.getEStructuralFeatures().get(2);
+ }
+
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getNamespace <em>Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Namespace</em>'.
+ * @see org.eclipse.jpt.common.core.resource.xml.ERootObject#getNamespace()
+ * @see #getERootObject()
+ * @generated
+ */
+ public EAttribute getERootObject_Namespace()
+ {
return (EAttribute)eRootObjectEClass.getEStructuralFeatures().get(1);
}
@@ -309,7 +342,7 @@ public class CommonPackage extends EPackageImpl
*/
public EAttribute getERootObject_ImpliedVersion()
{
- return (EAttribute)eRootObjectEClass.getEStructuralFeatures().get(2);
+ return (EAttribute)eRootObjectEClass.getEStructuralFeatures().get(3);
}
@@ -349,6 +382,7 @@ public class CommonPackage extends EPackageImpl
eRootObjectEClass = createEClass(EROOT_OBJECT);
createEAttribute(eRootObjectEClass, EROOT_OBJECT__VERSION);
+ createEAttribute(eRootObjectEClass, EROOT_OBJECT__NAMESPACE);
createEAttribute(eRootObjectEClass, EROOT_OBJECT__SCHEMA_LOCATION);
createEAttribute(eRootObjectEClass, EROOT_OBJECT__IMPLIED_VERSION);
}
@@ -389,6 +423,7 @@ public class CommonPackage extends EPackageImpl
initEClass(eRootObjectEClass, ERootObject.class, "ERootObject", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getERootObject_Version(), ecorePackage.getEString(), "version", null, 0, 1, ERootObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getERootObject_Namespace(), ecorePackage.getEString(), "namespace", null, 1, 1, ERootObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getERootObject_SchemaLocation(), ecorePackage.getEString(), "schemaLocation", null, 1, 1, ERootObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getERootObject_ImpliedVersion(), ecorePackage.getEString(), "impliedVersion", null, 0, 1, ERootObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -447,6 +482,14 @@ public class CommonPackage extends EPackageImpl
public static final EAttribute EROOT_OBJECT__SCHEMA_LOCATION = eINSTANCE.getERootObject_SchemaLocation();
/**
+ * The meta object literal for the '<em><b>Namespace</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute EROOT_OBJECT__NAMESPACE = eINSTANCE.getERootObject_Namespace();
+
+ /**
* The meta object literal for the '<em><b>Implied Version</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObject.java b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObject.java
index 0117173..b004923 100644
--- a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObject.java
+++ b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 2013 Oracle.
* 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
@@ -29,6 +29,7 @@ import org.eclipse.jpt.common.core.utility.TextRange;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getVersion <em>Version</em>}</li>
+ * <li>{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getNamespace <em>Namespace</em>}</li>
* <li>{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getSchemaLocation <em>Schema Location</em>}</li>
* <li>{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getImpliedVersion <em>Implied Version</em>}</li>
* </ul>
@@ -94,6 +95,32 @@ public interface ERootObject extends EBaseObject
void setSchemaLocation(String value);
/**
+ * Returns the value of the '<em><b>Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Namespace</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Namespace</em>' attribute.
+ * @see #setNamespace(String)
+ * @see org.eclipse.jpt.common.core.resource.xml.CommonPackage#getERootObject_Namespace()
+ * @model required="true"
+ * @generated
+ */
+ String getNamespace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.common.core.resource.xml.ERootObject#getNamespace <em>Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Namespace</em>' attribute.
+ * @see #getNamespace()
+ * @generated
+ */
+ void setNamespace(String value);
+
+ /**
* Returns the value of the '<em><b>Implied Version</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
diff --git a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
index 85bb0b1..1202163 100644
--- a/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
+++ b/common/plugins/org.eclipse.jpt.common.core/model/src/org/eclipse/jpt/common/core/resource/xml/ERootObjectImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Oracle.
+ * Copyright (c) 2009, 2013 Oracle.
* 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
@@ -63,6 +63,26 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
protected String version = VERSION_EDEFAULT;
/**
+ * The default value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNamespace()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAMESPACE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNamespace()
+ * @generated
+ * @ordered
+ */
+ protected String namespace = NAMESPACE_EDEFAULT;
+
+ /**
* The default value of the '{@link #getSchemaLocation() <em>Schema Location</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -164,8 +184,9 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
}
public void setDocumentVersion(String newVersion) {
- setVersion(newVersion);
- setSchemaLocation(getSchemaLocationForVersion(newVersion));
+ this.setVersion(newVersion);
+ this.setNamespace(this.getNamespaceForVersion(newVersion));
+ this.setSchemaLocation(this.getSchemaLocationForVersion(newVersion));
}
/**
@@ -215,6 +236,41 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
}
/**
+ * Returns the value of the '<em><b>Namespace</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Namespace</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Namespace</em>' attribute.
+ * @see #setNamespace(String)
+ * @see org.eclipse.jpt.common.core.resource.xml.CommonPackage#getERootObject_Namespace()
+ * @model required="true"
+ * @generated
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.common.core.resource.xml.ERootObjectImpl#getNamespace <em>Namespace</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Namespace</em>' attribute.
+ * @see #getNamespace()
+ * @generated
+ */
+ public void setNamespace(String newNamespace)
+ {
+ String oldNamespace = namespace;
+ namespace = newNamespace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.EROOT_OBJECT_IMPL__NAMESPACE, oldNamespace, namespace));
+ }
+
+ /**
* Returns the value of the '<em><b>Implied Version</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
@@ -261,6 +317,8 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
{
case CommonPackage.EROOT_OBJECT_IMPL__VERSION:
return getVersion();
+ case CommonPackage.EROOT_OBJECT_IMPL__NAMESPACE:
+ return getNamespace();
case CommonPackage.EROOT_OBJECT_IMPL__SCHEMA_LOCATION:
return getSchemaLocation();
case CommonPackage.EROOT_OBJECT_IMPL__IMPLIED_VERSION:
@@ -282,6 +340,9 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
case CommonPackage.EROOT_OBJECT_IMPL__VERSION:
setVersion((String)newValue);
return;
+ case CommonPackage.EROOT_OBJECT_IMPL__NAMESPACE:
+ setNamespace((String)newValue);
+ return;
case CommonPackage.EROOT_OBJECT_IMPL__SCHEMA_LOCATION:
setSchemaLocation((String)newValue);
return;
@@ -305,6 +366,9 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
case CommonPackage.EROOT_OBJECT_IMPL__VERSION:
setVersion(VERSION_EDEFAULT);
return;
+ case CommonPackage.EROOT_OBJECT_IMPL__NAMESPACE:
+ setNamespace(NAMESPACE_EDEFAULT);
+ return;
case CommonPackage.EROOT_OBJECT_IMPL__SCHEMA_LOCATION:
setSchemaLocation(SCHEMA_LOCATION_EDEFAULT);
return;
@@ -327,6 +391,8 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
{
case CommonPackage.EROOT_OBJECT_IMPL__VERSION:
return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
+ case CommonPackage.EROOT_OBJECT_IMPL__NAMESPACE:
+ return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace);
case CommonPackage.EROOT_OBJECT_IMPL__SCHEMA_LOCATION:
return SCHEMA_LOCATION_EDEFAULT == null ? schemaLocation != null : !SCHEMA_LOCATION_EDEFAULT.equals(schemaLocation);
case CommonPackage.EROOT_OBJECT_IMPL__IMPLIED_VERSION:
@@ -348,6 +414,8 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
StringBuffer result = new StringBuffer(super.toString());
result.append(" (version: ");
result.append(version);
+ result.append(", namespace: ");
+ result.append(namespace);
result.append(", schemaLocation: ");
result.append(schemaLocation);
result.append(", impliedVersion: ");
@@ -366,8 +434,6 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
// **************** version -> schema location mapping ********************
- protected abstract String getNamespace();
-
protected abstract HashMap<String, String> schemaLocations();
protected String getSchemaLocationForVersion(String version) {
@@ -377,9 +443,18 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
}
return schemaLocation;
}
-
- private static String buildSchemaLocationString(String namespace, String schemaLocation) {
- return namespace + ' ' + schemaLocation;
+
+
+ // **************** version -> namespace mapping ********************
+
+ protected abstract HashMap<String, String> namespaces();
+
+ protected String getNamespaceForVersion(String version) {
+ String namespace = this.namespaces().get(version);
+ if (namespace == null) {
+ JptCommonCorePlugin.instance().logError(new Throwable("No namespace defined for version: " + version));
+ }
+ return namespace;
}
@@ -398,8 +473,11 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
};
}
- protected static Translator buildNamespaceTranslator(String namespace) {
- return new ConstantAttributeTranslator(XML.NAMESPACE, namespace);
+ protected static Translator buildNamespaceTranslator() {
+ return new Translator(
+ XML.NAMESPACE,
+ CommonPackage.eINSTANCE.getERootObject_Namespace(),
+ Translator.DOM_ATTRIBUTE);
}
protected static Translator buildSchemaNamespaceTranslator() {
@@ -407,7 +485,6 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
}
protected static Translator buildSchemaLocationTranslator(
- final String namespace,
final Map<String, String> versionsToSchemaLocations) {
return new EnumeratedValueTranslator(
@@ -429,7 +506,9 @@ public abstract class ERootObjectImpl extends EBaseObjectImpl implements ERootOb
@Override
public String convertValueToString(Object value, EObject owner) {
- return buildSchemaLocationString(namespace, (String) value);
+ String namespace = ((ERootObject) owner).getNamespace();
+ String schemaLocation = (String) value;
+ return namespace + ' ' + schemaLocation;
}
};
}
diff --git a/common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml b/common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml
index b5a30c2..f8d36b0 100644
--- a/common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml
+++ b/common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
- Copyright (c) 2011, 2012 Oracle. All rights reserved.
+ Copyright (c) 2011, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -153,11 +153,11 @@
uri="platform:/plugin/org.eclipse.persistence.core/org/eclipse/persistence/eclipselink_sessions_2.1.xsd"/>
<uri
- name="http://java.sun.com/xml/ns/persistence/orm_2_1.xsd"
+ name="http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd"
uri="schemas/orm_2_1.xsd"/>
<uri
- name="http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd"
+ name="http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
uri="schemas/persistence_2_1.xsd"/>
</catalogContribution>
diff --git a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
index f89ee26..774d39a 100644
--- a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
+++ b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/orm_2_1.xsd
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Java Persistence API object/relational mapping file schema -->
-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/persistence/orm"
- xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
+<xsd:schema targetNamespace="http://xmlns.jcp.org/xml/ns/persistence/orm"
+ xmlns:orm="http://xmlns.jcp.org/xml/ns/persistence/orm"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
@@ -9,14 +9,14 @@
<xsd:annotation>
<xsd:documentation>
- @(#)orm_2_1.xsd 2.1 December 11 2012
+ @(#)orm_2_1.xsd 2.1 February 4 2013
</xsd:documentation>
</xsd:annotation>
<xsd:annotation>
<xsd:documentation>
- Copyright (c) 2008 - 2012 Oracle Corporation. All rights reserved.
+ Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
@@ -26,7 +26,7 @@
http://www.eclipse.org/org/documents/edl-v10.php.
Contributors:
- Linda DeMichiel - Java Persistence 2.1, Version 2.1 (November 9, 2012)
+ Linda DeMichiel - Java Persistence 2.1, Version 2.1 (February 4, 2013)
Specification available from http://jcp.org/en/jsr/detail?id=338
</xsd:documentation>
@@ -44,15 +44,15 @@
Object/relational mapping files must indicate the object/relational
mapping file schema by using the persistence namespace:
- http://java.sun.com/xml/ns/persistence
+ http://xmlns.jcp.org/xml/ns/persistence/orm
and indicate the version of the schema by
using the version element as shown below:
- <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ <entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
- http://java.sun.com/xml/ns/persistence/orm_2_1.xsd"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm
+ http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd"
version="2.1">
...
</entity-mappings>
@@ -2145,11 +2145,10 @@
<xsd:sequence>
<xsd:element name="description" type="xsd:string"
minOccurs="0"/>
- <xsd:element name="parameter-mode" type="orm:parameter-mode"
- minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="class" type="xsd:string" use="required"/>
+ <xsd:attribute name="mode" type="orm:parameter-mode"/>
</xsd:complexType>
<!-- **************************************************** -->
@@ -2312,4 +2311,4 @@
<xsd:attribute name="access" type="orm:access-type"/>
</xsd:complexType>
-</xsd:schema> \ No newline at end of file
+</xsd:schema>
diff --git a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/persistence_2_1.xsd b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/persistence_2_1.xsd
index a613ef4..b279dd9 100644
--- a/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/persistence_2_1.xsd
+++ b/common/plugins/org.eclipse.jpt.common.eclipselink.core/schemas/persistence_2_1.xsd
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- persistence.xml schema -->
-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/persistence"
+<xsd:schema targetNamespace="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:persistence="http://java.sun.com/xml/ns/persistence"
+ xmlns:persistence="http://xmlns.jcp.org/xml/ns/persistence"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.1">
<xsd:annotation>
<xsd:documentation>
- @(#)persistence_2_1.xsd 1.0 October 1 2009
+ @(#)persistence_2_1.xsd 2.1 February 4, 2013
</xsd:documentation>
</xsd:annotation>
<xsd:annotation>
<xsd:documentation>
- Copyright (c) 2008, 2009 Sun Microsystems. All rights reserved.
+ Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
@@ -26,8 +26,8 @@
http://www.eclipse.org/org/documents/edl-v10.php.
Contributors:
- Linda DeMichiel - Java Persistence 2.0, Version 2.0 (October 1, 2009)
- Specification available from http://jcp.org/en/jsr/detail?id=317
+ Linda DeMichiel - Java Persistence 2.1, Version 2.1 (February 4, 2013)
+ Specification available from http://jcp.org/en/jsr/detail?id=338
</xsd:documentation>
</xsd:annotation>
@@ -42,15 +42,15 @@
Persistence configuration files must indicate
the persistence schema by using the persistence namespace:
- http://java.sun.com/xml/ns/persistence
+ http://xmlns.jcp.org/xml/ns/persistence
and indicate the version of the schema by
using the version element as shown below:
- <persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
+ http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
...
</persistence>
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
index 5dd120a..9f7bd8d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2012, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -905,13 +905,26 @@ public class EXmlBindings extends ERootObjectImpl
}
@Override
- protected String getNamespace() {
- return Oxm.SCHEMA_NAMESPACE;
+ protected HashMap<String, String> schemaLocations() {
+ return SCHEMA_LOCATIONS;
}
+
+ // ***** version -> namespace mapping *****
+ private static final HashMap<String, String> NAMESPACES = buildNamespaces();
+
+ private static HashMap<String, String> buildNamespaces() {
+ HashMap<String, String> map = new HashMap<String, String>();
+ map.put(Oxm.SCHEMA_VERSION_2_1, Oxm.SCHEMA_NAMESPACE);
+ map.put(Oxm.SCHEMA_VERSION_2_2, Oxm.SCHEMA_NAMESPACE);
+ map.put(Oxm.SCHEMA_VERSION_2_3, Oxm.SCHEMA_NAMESPACE);
+ map.put(Oxm.SCHEMA_VERSION_2_4, Oxm.SCHEMA_NAMESPACE);
+ return map;
+ }
+
@Override
- protected HashMap<String, String> schemaLocations() {
- return SCHEMA_LOCATIONS;
+ protected HashMap<String, String> namespaces() {
+ return NAMESPACES;
}
@@ -945,9 +958,9 @@ public class EXmlBindings extends ERootObjectImpl
protected static Translator[] buildTranslatorChildren() {
return new Translator[] {
buildVersionTranslator(SCHEMA_LOCATIONS),
- buildNamespaceTranslator(Oxm.SCHEMA_NAMESPACE),
+ buildNamespaceTranslator(),
buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(Oxm.SCHEMA_NAMESPACE, SCHEMA_LOCATIONS),
+ buildSchemaLocationTranslator(SCHEMA_LOCATIONS),
buildXmlAccessorTypeTranslator(),
buildXmlAccessorOrderTranslator(),
buildXmlMappingMetadataCompleteTranslator(),
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java
index 8a12b9b..a7fa77c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/orm/XmlEntityMappings.java
@@ -28,7 +28,6 @@ import org.eclipse.jpt.jpa.core.resource.orm.v2_1.OrmV2_1Package;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlConverterContainer_2_1;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlConverter_2_1;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlEntityMappings_2_1;
-import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlNamedStoredProcedureQuery_2_1;
import org.eclipse.jpt.jpa.core.resource.orm.v2_1.XmlQueryContainer_2_1;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.plugin.JptJpaCorePlugin;
@@ -1172,15 +1171,28 @@ public class XmlEntityMappings extends ERootObjectImpl implements XmlQueryContai
}
@Override
- protected String getNamespace() {
- return JPA.SCHEMA_NAMESPACE;
- }
-
- @Override
protected HashMap<String, String> schemaLocations() {
return SCHEMA_LOCATIONS;
}
-
+
+
+ // ***** version -> namespace mapping *****
+
+ private static final HashMap<String, String> NAMESPACES = buildNamespaces();
+
+ private static HashMap<String, String> buildNamespaces() {
+ HashMap<String, String> map = new HashMap<String, String>();
+ map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_NAMESPACE);
+ map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_NAMESPACE);
+ map.put(JPA2_1.SCHEMA_VERSION, JPA2_1.SCHEMA_NAMESPACE);
+ return map;
+ }
+
+ @Override
+ protected HashMap<String, String> namespaces() {
+ return NAMESPACES;
+ }
+
// ********** content type **********
@@ -1213,9 +1225,9 @@ public class XmlEntityMappings extends ERootObjectImpl implements XmlQueryContai
private static Translator[] buildTranslatorChildren() {
return new Translator[] {
buildVersionTranslator(SCHEMA_LOCATIONS),
- buildNamespaceTranslator(JPA.SCHEMA_NAMESPACE),
+ buildNamespaceTranslator(),
buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(JPA.SCHEMA_NAMESPACE, SCHEMA_LOCATIONS),
+ buildSchemaLocationTranslator(SCHEMA_LOCATIONS),
buildDescriptionTranslator(),
XmlPersistenceUnitMetadata.buildTranslator(JPA.PERSISTENCE_UNIT_METADATA, OrmPackage.eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata()),
buildPackageTranslator(),
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java
index 6b6b201..16853ce 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/model/src/org/eclipse/jpt/jpa/core/resource/persistence/XmlPersistence.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -215,13 +215,26 @@ public class XmlPersistence extends ERootObjectImpl
}
@Override
- protected String getNamespace() {
- return JPA.SCHEMA_NAMESPACE;
+ protected HashMap<String, String> schemaLocations() {
+ return SCHEMA_LOCATIONS;
}
+
+
+ // ***** version -> namespace mapping *****
+
+ private static final HashMap<String, String> NAMESPACES = buildNamespaces();
+ private static HashMap<String, String> buildNamespaces() {
+ HashMap<String, String> map = new HashMap<String, String>();
+ map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_NAMESPACE);
+ map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_NAMESPACE);
+ map.put(JPA2_1.SCHEMA_VERSION, JPA2_1.SCHEMA_NAMESPACE);
+ return map;
+ }
+
@Override
- protected HashMap<String, String> schemaLocations() {
- return SCHEMA_LOCATIONS;
+ protected HashMap<String, String> namespaces() {
+ return NAMESPACES;
}
@@ -255,9 +268,9 @@ public class XmlPersistence extends ERootObjectImpl
private static Translator[] buildTranslatorChildren() {
return new Translator[] {
buildVersionTranslator(SCHEMA_LOCATIONS),
- buildNamespaceTranslator(JPA.SCHEMA_NAMESPACE),
+ buildNamespaceTranslator(),
buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(JPA.SCHEMA_NAMESPACE, SCHEMA_LOCATIONS),
+ buildSchemaLocationTranslator(SCHEMA_LOCATIONS),
XmlPersistenceUnit.buildTranslator(JPA.PERSISTENCE_UNIT, PersistencePackage.eINSTANCE.getXmlPersistence_PersistenceUnits())
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.core/plugin.xml
index af5682c..954462d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2007, 2012 Oracle. All rights reserved.
+ Copyright (c) 2007, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -147,6 +147,9 @@
<parameter
name="element"
value="{http://java.sun.com/xml/ns/persistence}persistence"/>
+ <parameter
+ name="element"
+ value="{http://xmlns.jcp.org/xml/ns/persistence}persistence"/>
</describer>
</content-type>
@@ -171,6 +174,9 @@
<parameter
name="element"
value="{http://java.sun.com/xml/ns/persistence/orm}entity-mappings"/>
+ <parameter
+ name="element"
+ value="{http://xmlns.jcp.org/xml/ns/persistence/orm}entity-mappings"/>
</describer>
</content-type>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
index 002b311..267221e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/orm/v2_1/JPA2_1.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.resource.orm.v2_1;
-import org.eclipse.jpt.jpa.core.resource.orm.JPA;
import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
/**
@@ -29,8 +28,8 @@ import org.eclipse.jpt.jpa.core.resource.orm.v2_0.JPA2_0;
public interface JPA2_1
extends JPA2_0
{
- String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/orm_2_1.xsd";
+ String SCHEMA_NAMESPACE = "http://xmlns.jcp.org/xml/ns/persistence/orm";
+ String SCHEMA_LOCATION = "http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd";
String SCHEMA_VERSION = "2.1";
// JPA 2.1 specific nodes
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_1/JPA2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_1/JPA2_1.java
index 3381bae..3271d41 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_1/JPA2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/persistence/v2_1/JPA2_1.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2012, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -28,8 +28,9 @@ import org.eclipse.jpt.jpa.core.resource.persistence.JPA;
public interface JPA2_1
extends JPA
{
- String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
- String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd";
+
+ String SCHEMA_NAMESPACE = "http://xmlns.jcp.org/xml/ns/persistence";
+ String SCHEMA_LOCATION = "http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd";
String SCHEMA_VERSION = "2.1";
// JPA 2.1 specific nodes
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/model/src/org/eclipse/jpt/jpa/eclipselink/core/resource/orm/XmlEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/model/src/org/eclipse/jpt/jpa/eclipselink/core/resource/orm/XmlEntityMappings.java
index f81c774..a343845 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/model/src/org/eclipse/jpt/jpa/eclipselink/core/resource/orm/XmlEntityMappings.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/model/src/org/eclipse/jpt/jpa/eclipselink/core/resource/orm/XmlEntityMappings.java
@@ -1252,13 +1252,31 @@ public class XmlEntityMappings extends org.eclipse.jpt.jpa.core.resource.orm.Xml
}
@Override
- protected String getNamespace() {
- return EclipseLink.SCHEMA_NAMESPACE;
+ protected HashMap<String, String> schemaLocations() {
+ return SCHEMA_LOCATIONS;
}
+
+ // ***** version -> namespace mapping *****
+ private static final HashMap<String, String> NAMESPACES = buildNamespaces();
+
+ private static HashMap<String, String> buildNamespaces() {
+ HashMap<String, String> map = new HashMap<String, String>();
+ map.put(EclipseLink.SCHEMA_VERSION, EclipseLink.SCHEMA_NAMESPACE);
+ map.put(EclipseLink1_1.SCHEMA_VERSION, EclipseLink1_1.SCHEMA_NAMESPACE);
+ map.put(EclipseLink1_2.SCHEMA_VERSION, EclipseLink1_2.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_0.SCHEMA_VERSION, EclipseLink2_0.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_1.SCHEMA_VERSION, EclipseLink2_1.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_2.SCHEMA_VERSION, EclipseLink2_2.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_3.SCHEMA_VERSION, EclipseLink2_3.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_4.SCHEMA_VERSION, EclipseLink2_4.SCHEMA_NAMESPACE);
+ map.put(EclipseLink2_5.SCHEMA_VERSION, EclipseLink2_5.SCHEMA_NAMESPACE);
+ return map;
+ }
+
@Override
- protected HashMap<String, String> schemaLocations() {
- return SCHEMA_LOCATIONS;
+ protected HashMap<String, String> namespaces() {
+ return NAMESPACES;
}
@@ -1293,9 +1311,9 @@ public class XmlEntityMappings extends org.eclipse.jpt.jpa.core.resource.orm.Xml
private static Translator[] buildTranslatorChildren() {
return new Translator[] {
buildVersionTranslator(SCHEMA_LOCATIONS),
- buildNamespaceTranslator(EclipseLink.SCHEMA_NAMESPACE),
+ buildNamespaceTranslator(),
buildSchemaNamespaceTranslator(),
- buildSchemaLocationTranslator(EclipseLink.SCHEMA_NAMESPACE, SCHEMA_LOCATIONS),
+ buildSchemaLocationTranslator(SCHEMA_LOCATIONS),
buildDescriptionTranslator(),
XmlPersistenceUnitMetadata.buildTranslator(JPA.PERSISTENCE_UNIT_METADATA, OrmPackage.eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata()),
buildPackageTranslator(),