xml bindings context model
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbFactory.java
index c976236..9ac162d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbFactory.java
@@ -67,12 +67,12 @@
  *
  * @see org.eclipse.jpt.jaxb.core.internal.jaxb21.GenericJaxb_2_1_Factory
  * 
- * @version 3.1
+ * @version 3.3
  * @since 3.0
  */
 public interface JaxbFactory  {
 	
-	// ********** Core Model **********
+	// ***** Core model *****
 	
 	/**
 	 * Construct a JaxbProject for the specified config, to be
@@ -88,7 +88,7 @@
 	JaxbFile buildJaxbFile(JaxbProject jaxbProject, IFile file, IContentType contentType, JptResourceModel resourceModel);
 	
 	
-	// ********** Non-resource-specific context nodes **********
+	// ***** Non-resource-specific context nodes *****
 	
 	/**
 	 * Build a (/an updated) root context node to be associated with the given 
@@ -101,7 +101,7 @@
 	JaxbPackage buildPackage(JaxbContextRoot parent, String packageName);
 	
 	
-	// ********** Java context nodes **********
+	// ***** Java context nodes *****
 	
 	JaxbPackageInfo buildJavaPackageInfo(JaxbPackage parent, JavaResourcePackage resourcePackage);
 	
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrder.java
index 7c3a887..f0f9e1d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrder.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -18,49 +18,52 @@
  * pioneering adopters on the understanding that any code that uses this API
  * will almost certainly be broken (repeatedly) as the API evolves.
  * 
- * @version 3.0
+ * @version 3.3
  * @since 3.0
  */
-public enum XmlAccessOrder {
-
-	ALPHABETICAL(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.ALPHABETICAL
-		),
-	UNDEFINED(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.UNDEFINED
-		);
-
-
-	private org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder;
-
-	XmlAccessOrder(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {
+public class XmlAccessOrder {
+	
+	public static XmlAccessOrder ALPHABETICAL = 
+			new XmlAccessOrder(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.ALPHABETICAL);
+	
+	public static XmlAccessOrder UNDEFINED = 
+			new XmlAccessOrder(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.UNDEFINED);
+	
+	public static XmlAccessOrder[] VALUES = 
+			new XmlAccessOrder[] {
+					ALPHABETICAL,
+					UNDEFINED };
+	
+	
+	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder toJavaResourceModel(
+			XmlAccessOrder accessOrder) {
+		return (accessOrder == null) ? null : accessOrder.getJavaAccessOrder();
+	}
+	
+	public static XmlAccessOrder fromJavaResourceModel(
+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {
+		
 		if (javaAccessOrder == null) {
-			throw new NullPointerException();
+			return null;
 		}
-		this.javaAccessOrder = javaAccessOrder;
-	}
-
-	public org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder getJavaAccessOrder() {
-		return this.javaAccessOrder;
-	}
-
-
-	// ********** static methods **********
-
-	public static XmlAccessOrder fromJavaResourceModel(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {
-		return (javaAccessOrder == null) ? null : fromJavaResourceModel_(javaAccessOrder);
-	}
-
-	private static XmlAccessOrder fromJavaResourceModel_(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {
-		for (XmlAccessOrder accessOrder : XmlAccessOrder.values()) {
+		
+		for (XmlAccessOrder accessOrder : XmlAccessOrder.VALUES) {
 			if (accessOrder.getJavaAccessOrder() == javaAccessOrder) {
 				return accessOrder;
 			}
 		}
 		return null;
 	}
-
-	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder toJavaResourceModel(XmlAccessOrder accessOrder) {
-		return (accessOrder == null) ? null : accessOrder.getJavaAccessOrder();
+	
+	
+	private org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder;
+	
+	
+	protected XmlAccessOrder(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {
+		this.javaAccessOrder = javaAccessOrder;
+	}
+	
+	public org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder getJavaAccessOrder() {
+		return this.javaAccessOrder;
 	}
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrderHolder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrderHolder.java
index 6fa5eae..3d64cee 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrderHolder.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessOrderHolder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -17,17 +17,17 @@
  * pioneering adopters on the understanding that any code that uses this API
  * will almost certainly be broken (repeatedly) as the API evolves.
  * 
- * @version 3.0
+ * @version 3.3
  * @since 3.0
  */
-public interface XmlAccessOrderHolder
+public interface XmlAccessOrderHolder<A extends XmlAccessOrder>
 		extends JaxbContextNode {
 	
 	/**
 	 * Return the access order, whether specified or defaulted.
 	 * This should never return null since at least the default will be set
 	 */
-	XmlAccessOrder getAccessOrder();
+	A getAccessOrder();
 	
 	/**
 	 * String constant associated with changes to the default access order
@@ -37,7 +37,7 @@
 	/**
 	 * Return the default access order, never null
 	 */
-	XmlAccessOrder getDefaultAccessOrder();
+	A getDefaultAccessOrder();
 	
 	/**
 	 * String constant associated with changes to the specified access order
@@ -47,10 +47,10 @@
 	/**
 	 * Return the specified access order;
 	 */
-	XmlAccessOrder getSpecifiedAccessOrder();
+	A getSpecifiedAccessOrder();
 	
 	/**
 	 * Set the specified access order.
 	 */
-	void setSpecifiedAccessOrder(XmlAccessOrder newSpecifiedAccessOrder);
+	void setSpecifiedAccessOrder(A newSpecifiedAccessOrder);
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessType.java
index b2c8fd6..3a60b73 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,6 +9,7 @@
  ******************************************************************************/
 package org.eclipse.jpt.jaxb.core.context;
 
+
 /**
  * Access Type
  * 
@@ -18,55 +19,61 @@
  * pioneering adopters on the understanding that any code that uses this API
  * will almost certainly be broken (repeatedly) as the API evolves.
  * 
- * @version 3.0
+ * @version 3.3
  * @since 3.0
  */
-public enum XmlAccessType {
-
-	FIELD(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.FIELD
-		),
-	NONE(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.NONE
-		),
-	PROPERTY(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PROPERTY
-		),
-	PUBLIC_MEMBER(
-		org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PUBLIC_MEMBER
-		);
-
-
-	private org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType;
-
-	XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {
+public class XmlAccessType {
+	
+	public static final XmlAccessType FIELD = 
+			new XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.FIELD);
+	
+	public static final XmlAccessType NONE = 
+			new XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.NONE);
+	
+	public static final XmlAccessType PROPERTY = 
+			new XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PROPERTY);
+	
+	public static final XmlAccessType PUBLIC_MEMBER =
+			new XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PUBLIC_MEMBER);
+	
+	public static XmlAccessType[] VALUES = 
+			new XmlAccessType[] {
+					FIELD,
+					NONE,
+					PROPERTY,
+					PUBLIC_MEMBER };
+	
+	
+	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType toJavaResourceModel(
+			XmlAccessType accessType) {
+		return (accessType != null) ? accessType.getJavaAccessType() : null;
+	}
+	
+	public static XmlAccessType fromJavaResourceModel(
+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {
+		
 		if (javaAccessType == null) {
-			throw new NullPointerException();
+			return null;
 		}
-		this.javaAccessType = javaAccessType;
-	}
-
-	public org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType getJavaAccessType() {
-		return this.javaAccessType;
-	}
-
-
-	// ********** static methods **********
-
-	public static XmlAccessType fromJavaResourceModel(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {
-		return (javaAccessType == null) ? null : fromJavaResourceModel_(javaAccessType);
-	}
-
-	private static XmlAccessType fromJavaResourceModel_(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {
-		for (XmlAccessType accessType : XmlAccessType.values()) {
+		
+		for (XmlAccessType accessType : XmlAccessType.VALUES) {
 			if (accessType.getJavaAccessType() == javaAccessType) {
 				return accessType;
 			}
 		}
+		
 		return null;
 	}
-
-	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType toJavaResourceModel(XmlAccessType accessType) {
-		return (accessType == null) ? null : accessType.getJavaAccessType();
+	
+	
+	protected org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType;
+	
+	
+	protected XmlAccessType(org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {
+		this.javaAccessType = javaAccessType;
+	}
+	
+	public org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType getJavaAccessType() {
+		return this.javaAccessType;
 	}
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessTypeHolder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessTypeHolder.java
index 6a56265..784a389 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessTypeHolder.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlAccessTypeHolder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -17,17 +17,17 @@
  * pioneering adopters on the understanding that any code that uses this API
  * will almost certainly be broken (repeatedly) as the API evolves.
  * 
- * @version 3.0
+ * @version 3.3
  * @since 3.0
  */
-public interface XmlAccessTypeHolder
+public interface XmlAccessTypeHolder<A extends XmlAccessType>
 		extends JaxbContextNode {
 	
 	/**
 	 * Return the access type, whether specified or defaulted.
 	 * This should never return null since at least the default will be set
 	 */
-	XmlAccessType getAccessType();
+	A getAccessType();
 	
 	/**
 	 * String constant associated with changes to the default access type
@@ -37,7 +37,7 @@
 	/**
 	 * Return the default access type, never null
 	 */
-	XmlAccessType getDefaultAccessType();
+	A getDefaultAccessType();
 	
 	/**
 	 * String constant associated with changes to the specified access type
@@ -47,10 +47,10 @@
 	/**
 	 * Return the specified access type;
 	 */
-	XmlAccessType getSpecifiedAccessType();
-
+	A getSpecifiedAccessType();
+	
 	/**
 	 * Set the specified access type.
 	 */
-	void setSpecifiedAccessType(XmlAccessType newSpecifiedAccessType);
+	void setSpecifiedAccessType(A newSpecifiedAccessType);
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
index af98d64..23fdb4f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
@@ -137,7 +137,7 @@
 	}
 	
 	protected XmlAccessType getResourceAccessType() {
-		return XmlAccessType.fromJavaResourceModel(this.getAccessorTypeAnnotation().getValue());
+		return XmlAccessType.fromJavaResourceModel(getAccessorTypeAnnotation().getValue());
 	}
 
 	protected XmlAccessorTypeAnnotation getAccessorTypeAnnotation() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/XmlAccessType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/XmlAccessType.java
index c3b3bd0..99c17c6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/XmlAccessType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/XmlAccessType.java
@@ -44,7 +44,7 @@
 	}
 
 
-	// ********** static methods **********
+	// ***** to/from annotation values *****
 
 	public static XmlAccessType fromJavaAnnotationValue(Object javaAnnotationValue) {
 		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
@@ -62,5 +62,4 @@
 	public static String toJavaAnnotationValue(XmlAccessType accessType) {
 		return (accessType == null) ? null : accessType.getJavaAnnotationValue();
 	}
-
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.ecore b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.ecore
index d59d1ce..78a2453 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.ecore
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.ecore
@@ -120,7 +120,7 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlAccessorType" eType="#//EXmlAccessType"/>

     <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlAccessorOrder" eType="#//EXmlAccessOrder"/>

     <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlMappingMetadataComplete"

-        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>

+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>

     <eStructuralFeatures xsi:type="ecore:EAttribute" name="packageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

     <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlNameTransformer" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

     <eStructuralFeatures xsi:type="ecore:EReference" name="xmlSchema" eType="#//EXmlSchema"

diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.genmodel b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.genmodel
index 368849f..fe7d140 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.genmodel
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.genmodel
@@ -118,7 +118,6 @@
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference oxm.ecore#//EXmlAttribute/xmlSchemaType"/>

     </genClasses>

     <genClasses ecoreClass="oxm.ecore#//EXmlBindings">

-      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlBindings/impliedVersion"/>

       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlBindings/xmlAccessorType"/>

       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlBindings/xmlAccessorOrder"/>

       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlBindings/xmlMappingMetadataComplete"/>

diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrder.java
new file mode 100644
index 0000000..00df6e4
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrder.java
@@ -0,0 +1,100 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.context;
+
+import org.eclipse.jpt.jaxb.core.context.XmlAccessOrder;

+import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder;

+

+/**

+ * MOXy extension of Access Order

+ * 

+ * Provisional API: This interface is part of an interim API that is still

+ * under development and expected to change significantly before reaching

+ * stability. It is available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ * 

+ * @version 3.3

+ * @since 3.3

+ */
+public class ELJaxbXmlAccessOrder

+		extends XmlAccessOrder {

+	

+	public static ELJaxbXmlAccessOrder ALPHABETICAL = 

+			new ELJaxbXmlAccessOrder(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.ALPHABETICAL,

+					EXmlAccessOrder.ALPHABETICAL);

+	

+	public static ELJaxbXmlAccessOrder UNDEFINED = 

+			new ELJaxbXmlAccessOrder(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder.UNDEFINED,

+					EXmlAccessOrder.UNDEFINED);

+	

+	public static ELJaxbXmlAccessOrder[] VALUES = 

+			new ELJaxbXmlAccessOrder[] {

+					ALPHABETICAL,

+					UNDEFINED };

+	

+	

+	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder toJavaResourceModel(

+			ELJaxbXmlAccessOrder accessOrder) {

+		return (accessOrder == null) ? null : accessOrder.getJavaAccessOrder();

+	}

+	

+	public static ELJaxbXmlAccessOrder fromJavaResourceModel(

+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder) {

+		

+		if (javaAccessOrder == null) {

+			return null;

+		}

+		

+		for (ELJaxbXmlAccessOrder accessOrder : ELJaxbXmlAccessOrder.VALUES) {

+			if (accessOrder.getJavaAccessOrder() == javaAccessOrder) {

+				return accessOrder;

+			}

+		}

+		return null;

+	}

+	

+	public static EXmlAccessOrder toOxmResourceModel(ELJaxbXmlAccessOrder accessOrder) {

+		return (accessOrder != null) ? accessOrder.getOxmAccessOrder() : null;

+	}

+	

+	public static ELJaxbXmlAccessOrder fromOxmResourceModel(EXmlAccessOrder oxmAccessOrder) {

+		

+		if (oxmAccessOrder == null) {

+			return null;

+		}

+		

+		for (ELJaxbXmlAccessOrder accessOrder : ELJaxbXmlAccessOrder.VALUES) {

+			if (accessOrder.getOxmAccessOrder() == oxmAccessOrder) {

+				return accessOrder;

+			}

+		}

+		

+		return null;

+	}

+	

+	

+	private EXmlAccessOrder oxmAccessOrder;

+	

+	

+	protected ELJaxbXmlAccessOrder(

+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessOrder javaAccessOrder,

+			EXmlAccessOrder oxmAccessOrder) {

+		super(javaAccessOrder);

+		this.oxmAccessOrder = oxmAccessOrder;

+	}

+	

+	

+	public EXmlAccessOrder getOxmAccessOrder() {

+		return this.oxmAccessOrder;

+	}

+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrderHolder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrderHolder.java
new file mode 100644
index 0000000..242c4fb
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessOrderHolder.java
@@ -0,0 +1,27 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.context;
+
+import org.eclipse.jpt.jaxb.core.context.XmlAccessOrderHolder;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 3.3
+ * @since 3.3
+ */
+public interface ELJaxbXmlAccessOrderHolder
+		extends XmlAccessOrderHolder<ELJaxbXmlAccessOrder> {
+	
+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessType.java
new file mode 100644
index 0000000..97900a7
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessType.java
@@ -0,0 +1,113 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.context;
+
+import org.eclipse.jpt.jaxb.core.context.XmlAccessType;

+import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType;

+

+/**

+ * MOXy extension of Access Type

+ * 

+ * Provisional API: This interface is part of an interim API that is still

+ * under development and expected to change significantly before reaching

+ * stability. It is available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ * 

+ * @version 3.3

+ * @since 3.3

+ */
+public class ELJaxbXmlAccessType

+		extends XmlAccessType {

+	

+	public static final ELJaxbXmlAccessType FIELD = 

+			new ELJaxbXmlAccessType(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.FIELD,

+					EXmlAccessType.FIELD);

+	

+	public static final ELJaxbXmlAccessType NONE = 

+			new ELJaxbXmlAccessType(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.NONE,

+					EXmlAccessType.NONE);

+	

+	public static final ELJaxbXmlAccessType PROPERTY = 

+			new ELJaxbXmlAccessType(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PROPERTY,

+					EXmlAccessType.PROPERTY);

+	

+	public static final ELJaxbXmlAccessType PUBLIC_MEMBER =

+			new ELJaxbXmlAccessType(

+					org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType.PUBLIC_MEMBER,

+					EXmlAccessType.PUBLIC_MEMBER);

+	

+	public static ELJaxbXmlAccessType[] VALUES = 

+			new ELJaxbXmlAccessType[] {

+					ELJaxbXmlAccessType.FIELD,

+					ELJaxbXmlAccessType.NONE,

+					ELJaxbXmlAccessType.PROPERTY,

+					ELJaxbXmlAccessType.PUBLIC_MEMBER };

+	

+	

+	public static org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType toJavaResourceModel(

+			ELJaxbXmlAccessType accessType) {

+		return (accessType != null) ? accessType.getJavaAccessType() : null;

+	}

+	

+	public static XmlAccessType fromJavaResourceModel(

+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType) {

+		

+		if (javaAccessType == null) {

+			return null;

+		}

+		

+		for (ELJaxbXmlAccessType accessType : ELJaxbXmlAccessType.VALUES) {

+			if (accessType.getJavaAccessType() == javaAccessType) {

+				return accessType;

+			}

+		}

+		

+		return null;

+	}

+	

+	public static EXmlAccessType toOxmResourceModel(ELJaxbXmlAccessType accessType) {

+		return (accessType != null) ? accessType.getOxmAccessType() : null;

+	}

+	

+	public static ELJaxbXmlAccessType fromOxmResourceModel(EXmlAccessType oxmAccessType) {

+		

+		if (oxmAccessType == null) {

+			return null;

+		}

+		

+		for (ELJaxbXmlAccessType accessType : ELJaxbXmlAccessType.VALUES) {

+			if (accessType.getOxmAccessType() == oxmAccessType) {

+				return accessType;

+			}

+		}

+		

+		return null;

+	}

+	

+	

+	protected EXmlAccessType oxmAccessType;

+	

+	

+	protected ELJaxbXmlAccessType(

+			org.eclipse.jpt.jaxb.core.resource.java.XmlAccessType javaAccessType,

+			EXmlAccessType oxmAccessType) {

+		super(javaAccessType);

+		this.oxmAccessType = oxmAccessType;

+	}

+	

+	

+	public EXmlAccessType getOxmAccessType() {

+		return this.oxmAccessType;

+	}

+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessTypeHolder.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessTypeHolder.java
new file mode 100644
index 0000000..9aef8c7
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/ELJaxbXmlAccessTypeHolder.java
@@ -0,0 +1,27 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.context;
+
+import org.eclipse.jpt.jaxb.core.context.XmlAccessTypeHolder;

+

+/**

+ * Provisional API: This interface is part of an interim API that is still

+ * under development and expected to change significantly before reaching

+ * stability. It is available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ * 

+ * @version 3.3

+ * @since 3.3

+ */
+public interface ELJaxbXmlAccessTypeHolder

+		extends XmlAccessTypeHolder<ELJaxbXmlAccessType> {

+	

+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmFile.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmFile.java
index afc587b..e024245 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmFile.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmFile.java
@@ -11,11 +11,23 @@
 

 import org.eclipse.jpt.common.core.resource.xml.JptXmlResource;

 import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;

-
+

+/**

+ * Provisional API: This interface is part of an interim API that is still

+ * under development and expected to change significantly before reaching

+ * stability. It is available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ * 

+ * @version 3.3

+ * @since 3.3

+ */
 public interface OxmFile 

 		extends JaxbContextNode {

 	

-	public JptXmlResource getOxmResource();

+	JptXmlResource getOxmResource();

 	

-	public String getPackageName();

+	String getPackageName();

+	

+	OxmXmlBindings getXmlBindings();

 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmXmlBindings.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmXmlBindings.java
index f29c2cb..66b0940 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmXmlBindings.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/context/oxm/OxmXmlBindings.java
@@ -10,15 +10,36 @@
 package org.eclipse.jpt.jaxb.eclipselink.core.context.oxm;
 
 import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;

-
+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessOrderHolder;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessTypeHolder;

+

+/**

+ * Provisional API: This interface is part of an interim API that is still

+ * under development and expected to change significantly before reaching

+ * stability. It is available at this early stage to solicit feedback from

+ * pioneering adopters on the understanding that any code that uses this API

+ * will almost certainly be broken (repeatedly) as the API evolves.

+ * 

+ * @version 3.3

+ * @since 3.3

+ */
 public interface OxmXmlBindings

-		extends JaxbContextNode {

+		extends JaxbContextNode, ELJaxbXmlAccessTypeHolder, ELJaxbXmlAccessOrderHolder {

+	

+	// ***** mapping metadata complete *****

+	

+	final static String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$

+	

+	boolean isXmlMappingMetadataComplete();

+	

+	void setXmlMappingMetadataComplete(boolean newValue);

+	

 	

 	// ***** package name *****

 	

-	public final static String PACKAGE_NAME_PROPERTY = "packageName"; //$NON-NLS-1$

+	final static String PACKAGE_NAME_PROPERTY = "packageName"; //$NON-NLS-1$

 	

-	public String getPackageName();

+	String getPackageName();

 	

-	public void setPackageName(String packageName);
+	void setPackageName(String packageName);
 }
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmFileImpl.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmFileImpl.java
index 16b4467..36d62e4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmFileImpl.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmFileImpl.java
@@ -1,3 +1,12 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

 package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.oxm;
 
 import java.util.List;
@@ -78,6 +87,10 @@
 	
 	// ***** xml bindings *****
 	
+	public OxmXmlBindings getXmlBindings() {
+		return this.xmlBindings;
+	}
+	
 	protected OxmXmlBindings buildXmlBindings() {
 		// if less than 2.3, then there is no context model support
 		if (this.resourceType.isKindOf(Oxm.RESOURCE_TYPE_2_3)) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmXmlBindingsImpl.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmXmlBindingsImpl.java
index ae95f00..6068d79 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmXmlBindingsImpl.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/oxm/OxmXmlBindingsImpl.java
@@ -1,7 +1,18 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

 package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.oxm;
 
 import org.eclipse.jpt.common.core.utility.TextRange;
 import org.eclipse.jpt.jaxb.core.internal.context.AbstractJaxbContextNode;
+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessOrder;
+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessType;
 import org.eclipse.jpt.jaxb.eclipselink.core.context.oxm.OxmFile;
 import org.eclipse.jpt.jaxb.eclipselink.core.context.oxm.OxmXmlBindings;
 import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings;
@@ -12,13 +23,21 @@
 	
 	protected EXmlBindings eXmlBindings;
 	
-	public final static String PACKAGE_NAME_PROPERTY = "packageName"; //$NON-NLS-1$
+	protected ELJaxbXmlAccessType specifiedAccessType;
+	
+	protected ELJaxbXmlAccessOrder specifiedAccessOrder;
+	
+	protected boolean xmlMappingMetadataComplete;
+	
 	protected String packageName;
 	
 	
 	public OxmXmlBindingsImpl(OxmFile parent, EXmlBindings eXmlBindings) {
 		super(parent);
 		this.eXmlBindings = eXmlBindings;
+		this.specifiedAccessType = buildSpecifiedAccessType();
+		this.specifiedAccessOrder = buildSpecifiedAccessOrder();
+		this.xmlMappingMetadataComplete = buildXmlMappingMetadataComplete();
 		this.packageName = buildPackageName();
 	}
 	
@@ -28,10 +47,96 @@
 	@Override
 	public void synchronizeWithResourceModel() {
 		super.synchronizeWithResourceModel();
+		setSpecifiedAccessType_(buildSpecifiedAccessType());
+		setSpecifiedAccessOrder_(buildSpecifiedAccessOrder());
+		setXmlMappingMetadataComplete_(buildXmlMappingMetadataComplete());
 		setPackageName_(buildPackageName());
 	}
 	
 	
+	// ***** xml access type *****
+	
+	public ELJaxbXmlAccessType getAccessType() {
+		return (this.specifiedAccessType != null) ? this.specifiedAccessType : getDefaultAccessType();
+	}
+	
+	public ELJaxbXmlAccessType getDefaultAccessType() {
+		return ELJaxbXmlAccessType.PUBLIC_MEMBER;
+	}
+	
+	public ELJaxbXmlAccessType getSpecifiedAccessType() {
+		return this.specifiedAccessType;
+	}
+	
+	public void setSpecifiedAccessType(ELJaxbXmlAccessType newAccessType) {
+		this.eXmlBindings.setXmlAccessorType(ELJaxbXmlAccessType.toOxmResourceModel(newAccessType));
+		setSpecifiedAccessType_(newAccessType);
+	}
+	
+	protected void setSpecifiedAccessType_(ELJaxbXmlAccessType newAccessType) {
+		ELJaxbXmlAccessType oldAccessType = this.specifiedAccessType;
+		this.specifiedAccessType = newAccessType;
+		firePropertyChanged(SPECIFIED_ACCESS_TYPE_PROPERTY, oldAccessType, newAccessType);
+	}
+	
+	protected ELJaxbXmlAccessType buildSpecifiedAccessType() {
+		return ELJaxbXmlAccessType.fromOxmResourceModel(this.eXmlBindings.getXmlAccessorType());
+	}
+	
+	
+	// ***** xml access order *****
+	
+	public ELJaxbXmlAccessOrder getAccessOrder() {
+		return (this.specifiedAccessOrder != null) ? this.specifiedAccessOrder : getDefaultAccessOrder();
+	}
+	
+	public ELJaxbXmlAccessOrder getDefaultAccessOrder() {
+		return ELJaxbXmlAccessOrder.UNDEFINED;
+	}
+	
+	public ELJaxbXmlAccessOrder getSpecifiedAccessOrder() {
+		return this.specifiedAccessOrder;
+	}
+	
+	public void setSpecifiedAccessOrder(ELJaxbXmlAccessOrder newAccessOrder) {
+		this.eXmlBindings.setXmlAccessorOrder(ELJaxbXmlAccessOrder.toOxmResourceModel(newAccessOrder));
+		setSpecifiedAccessOrder_(newAccessOrder);
+	}
+	
+	protected void setSpecifiedAccessOrder_(ELJaxbXmlAccessOrder newAccessOrder) {
+		ELJaxbXmlAccessOrder oldAccessOrder = this.specifiedAccessOrder;
+		this.specifiedAccessOrder = newAccessOrder;
+		firePropertyChanged(SPECIFIED_ACCESS_ORDER_PROPERTY, oldAccessOrder, newAccessOrder);
+	}
+	
+	protected ELJaxbXmlAccessOrder buildSpecifiedAccessOrder() {
+		return ELJaxbXmlAccessOrder.fromOxmResourceModel(this.eXmlBindings.getXmlAccessorOrder());
+	}
+	
+	
+	// ***** xml mapping metadata complete *****
+	
+	public boolean isXmlMappingMetadataComplete() {
+		return this.xmlMappingMetadataComplete;
+	}
+	
+	public void setXmlMappingMetadataComplete(boolean newValue) {
+		this.eXmlBindings.setXmlMappingMetadataComplete((newValue) ? newValue : null); // set to null if false
+		setXmlMappingMetadataComplete_(newValue);
+	}
+	
+	protected void setXmlMappingMetadataComplete_(boolean newValue) {
+		boolean oldValue = this.xmlMappingMetadataComplete;
+		this.xmlMappingMetadataComplete = newValue;
+		firePropertyChanged(XML_MAPPING_METADATA_COMPLETE_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean buildXmlMappingMetadataComplete() {
+		Boolean eValue = this.eXmlBindings.getXmlMappingMetadataComplete();
+		return (eValue == null) ? false : eValue.booleanValue(); // if xml value is null or false, use false
+	}
+	
+	
 	// ***** package name *****
 	
 	public String getPackageName() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlAccessType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlAccessType.java
index a062ec1..e8c4fd6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlAccessType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlAccessType.java
@@ -1,11 +1,17 @@
-/**

- */

+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

 package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm;

 

 import java.util.Arrays;

 import java.util.Collections;

 import java.util.List;

-

 import org.eclipse.emf.common.util.Enumerator;

 

 /**

@@ -273,5 +279,4 @@
 	{

 		return literal;

 	}

-	

-} //EXmlAccessType

+}

diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
index 7332df9..77bd82a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlBindings.java
@@ -33,10 +33,9 @@
  * <p>

  * The following features are supported:

  * <ul>

- *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getImpliedVersion <em>Implied Version</em>}</li>

  *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlAccessorType <em>Xml Accessor Type</em>}</li>

  *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlAccessorOrder <em>Xml Accessor Order</em>}</li>

- *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}</li>

+ *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}</li>

  *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getPackageName <em>Package Name</em>}</li>

  *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlNameTransformer <em>Xml Name Transformer</em>}</li>

  *   <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlSchema <em>Xml Schema</em>}</li>

@@ -56,28 +55,6 @@
 public class EXmlBindings extends ERootObjectImpl

 {

 	/**

-	 * The default value of the '{@link #getImpliedVersion() <em>Implied Version</em>}' attribute.

-	 * <!-- begin-user-doc -->

-	 * <!-- end-user-doc -->

-	 * @see #getImpliedVersion()

-	 * @generated

-	 * @ordered

-	 */

-	protected static final String IMPLIED_VERSION_EDEFAULT = null;

-

-

-	/**

-	 * The cached value of the '{@link #getImpliedVersion() <em>Implied Version</em>}' attribute.

-	 * <!-- begin-user-doc -->

-	 * <!-- end-user-doc -->

-	 * @see #getImpliedVersion()

-	 * @generated

-	 * @ordered

-	 */

-	protected String impliedVersion = IMPLIED_VERSION_EDEFAULT;

-

-

-	/**

 	 * The default value of the '{@link #getXmlAccessorType() <em>Xml Accessor Type</em>}' attribute.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

@@ -85,7 +62,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	protected static final EXmlAccessType XML_ACCESSOR_TYPE_EDEFAULT = EXmlAccessType.FIELD;

+	protected static final EXmlAccessType XML_ACCESSOR_TYPE_EDEFAULT = null;

 

 

 	/**

@@ -107,7 +84,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	protected static final EXmlAccessOrder XML_ACCESSOR_ORDER_EDEFAULT = EXmlAccessOrder.ALPHABETICAL;

+	protected static final EXmlAccessOrder XML_ACCESSOR_ORDER_EDEFAULT = null;

 

 

 	/**

@@ -122,25 +99,25 @@
 

 

 	/**

-	 * The default value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.

+	 * The default value of the '{@link #getXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

-	 * @see #isXmlMappingMetadataComplete()

+	 * @see #getXmlMappingMetadataComplete()

 	 * @generated

 	 * @ordered

 	 */

-	protected static final boolean XML_MAPPING_METADATA_COMPLETE_EDEFAULT = false;

+	protected static final Boolean XML_MAPPING_METADATA_COMPLETE_EDEFAULT = null;

 

 

 	/**

-	 * The cached value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.

+	 * The cached value of the '{@link #getXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

-	 * @see #isXmlMappingMetadataComplete()

+	 * @see #getXmlMappingMetadataComplete()

 	 * @generated

 	 * @ordered

 	 */

-	protected boolean xmlMappingMetadataComplete = XML_MAPPING_METADATA_COMPLETE_EDEFAULT;

+	protected Boolean xmlMappingMetadataComplete = XML_MAPPING_METADATA_COMPLETE_EDEFAULT;

 

 

 	/**

@@ -369,27 +346,27 @@
 	 * </p>

 	 * <!-- end-user-doc -->

 	 * @return the value of the '<em>Xml Mapping Metadata Complete</em>' attribute.

-	 * @see #setXmlMappingMetadataComplete(boolean)

+	 * @see #setXmlMappingMetadataComplete(Boolean)

 	 * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlBindings_XmlMappingMetadataComplete()

-	 * @model

+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"

 	 * @generated

 	 */

-	public boolean isXmlMappingMetadataComplete()

+	public Boolean getXmlMappingMetadataComplete()

 	{

 		return xmlMappingMetadataComplete;

 	}

 

 	/**

-	 * Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}' attribute.

+	 * Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}' attribute.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

 	 * @param value the new value of the '<em>Xml Mapping Metadata Complete</em>' attribute.

-	 * @see #isXmlMappingMetadataComplete()

+	 * @see #getXmlMappingMetadataComplete()

 	 * @generated

 	 */

-	public void setXmlMappingMetadataComplete(boolean newXmlMappingMetadataComplete)

+	public void setXmlMappingMetadataComplete(Boolean newXmlMappingMetadataComplete)

 	{

-		boolean oldXmlMappingMetadataComplete = xmlMappingMetadataComplete;

+		Boolean oldXmlMappingMetadataComplete = xmlMappingMetadataComplete;

 		xmlMappingMetadataComplete = newXmlMappingMetadataComplete;

 		if (eNotificationRequired())

 			eNotify(new ENotificationImpl(this, Notification.SET, OxmPackage.EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE, oldXmlMappingMetadataComplete, xmlMappingMetadataComplete));

@@ -738,14 +715,12 @@
 	{

 		switch (featureID)

 		{

-			case OxmPackage.EXML_BINDINGS__IMPLIED_VERSION:

-				return getImpliedVersion();

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_TYPE:

 				return getXmlAccessorType();

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_ORDER:

 				return getXmlAccessorOrder();

 			case OxmPackage.EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE:

-				return isXmlMappingMetadataComplete();

+				return getXmlMappingMetadataComplete();

 			case OxmPackage.EXML_BINDINGS__PACKAGE_NAME:

 				return getPackageName();

 			case OxmPackage.EXML_BINDINGS__XML_NAME_TRANSFORMER:

@@ -779,9 +754,6 @@
 	{

 		switch (featureID)

 		{

-			case OxmPackage.EXML_BINDINGS__IMPLIED_VERSION:

-				setImpliedVersion((String)newValue);

-				return;

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_TYPE:

 				setXmlAccessorType((EXmlAccessType)newValue);

 				return;

@@ -837,9 +809,6 @@
 	{

 		switch (featureID)

 		{

-			case OxmPackage.EXML_BINDINGS__IMPLIED_VERSION:

-				setImpliedVersion(IMPLIED_VERSION_EDEFAULT);

-				return;

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_TYPE:

 				setXmlAccessorType(XML_ACCESSOR_TYPE_EDEFAULT);

 				return;

@@ -890,14 +859,12 @@
 	{

 		switch (featureID)

 		{

-			case OxmPackage.EXML_BINDINGS__IMPLIED_VERSION:

-				return IMPLIED_VERSION_EDEFAULT == null ? impliedVersion != null : !IMPLIED_VERSION_EDEFAULT.equals(impliedVersion);

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_TYPE:

 				return xmlAccessorType != XML_ACCESSOR_TYPE_EDEFAULT;

 			case OxmPackage.EXML_BINDINGS__XML_ACCESSOR_ORDER:

 				return xmlAccessorOrder != XML_ACCESSOR_ORDER_EDEFAULT;

 			case OxmPackage.EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE:

-				return xmlMappingMetadataComplete != XML_MAPPING_METADATA_COMPLETE_EDEFAULT;

+				return XML_MAPPING_METADATA_COMPLETE_EDEFAULT == null ? xmlMappingMetadataComplete != null : !XML_MAPPING_METADATA_COMPLETE_EDEFAULT.equals(xmlMappingMetadataComplete);

 			case OxmPackage.EXML_BINDINGS__PACKAGE_NAME:

 				return PACKAGE_NAME_EDEFAULT == null ? packageName != null : !PACKAGE_NAME_EDEFAULT.equals(packageName);

 			case OxmPackage.EXML_BINDINGS__XML_NAME_TRANSFORMER:

@@ -932,9 +899,7 @@
 		if (eIsProxy()) return super.toString();

 

 		StringBuffer result = new StringBuffer(super.toString());

-		result.append(" (impliedVersion: ");

-		result.append(impliedVersion);

-		result.append(", xmlAccessorType: ");

+		result.append(" (xmlAccessorType: ");

 		result.append(xmlAccessorType);

 		result.append(", xmlAccessorOrder: ");

 		result.append(xmlAccessorOrder);

@@ -999,11 +964,35 @@
 			buildNamespaceTranslator(Oxm.SCHEMA_NAMESPACE),

 			buildSchemaNamespaceTranslator(),

 			buildSchemaLocationTranslator(Oxm.SCHEMA_NAMESPACE, SCHEMA_LOCATIONS),

+			buildXmlAccessorTypeTranslator(),

+			buildXmlAccessorOrderTranslator(),

+			buildXmlMappingMetadataCompleteTranslator(),

 			buildPackageNameTranslator(),

 			EJavaType.buildTranslator()

 		};

 	}

 	

+	protected static Translator buildXmlAccessorTypeTranslator() {

+		return new Translator(

+			Oxm.XML_ACCESSOR_TYPE, 

+			OxmPackage.eINSTANCE.getEXmlBindings_XmlAccessorType(),

+			Translator.DOM_ATTRIBUTE);

+	}

+	

+	protected static Translator buildXmlAccessorOrderTranslator() {

+		return new Translator(

+			Oxm.XML_ACCESSOR_ORDER, 

+			OxmPackage.eINSTANCE.getEXmlBindings_XmlAccessorOrder(),

+			Translator.DOM_ATTRIBUTE);

+	}

+	

+	protected static Translator buildXmlMappingMetadataCompleteTranslator() {

+		return new Translator(

+			Oxm.XML_MAPPING_METADATA_COMPLETE,

+			OxmPackage.eINSTANCE.getEXmlBindings_XmlMappingMetadataComplete(),

+			Translator.DOM_ATTRIBUTE);

+	}

+	

 	protected static Translator buildPackageNameTranslator() {

 		return new Translator(

 			Oxm.PACKAGE_NAME, 

diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
index f5f73c4..9da40e2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
@@ -46,6 +46,8 @@
 	String JAVA_TYPE = "java-type"; //$NON-NLS-1$

 	String JAVA_TYPES = "java-types"; //$NON-NLS-1$

 	String PACKAGE_NAME = "package-name"; //$NON-NLS-1$

+	String XML_ACCESSOR_ORDER = "xml-accessor-order"; //$NON-NLS-1$

+	String XML_ACCESSOR_TYPE = "xml-accessor-type"; //$NON-NLS-1$

 	String XML_ANY_ATTRIBUTE = "xml-any-attribute"; //$NON-NLS-1$

 	String XML_ANY_ELEMENT = "xml-any-element"; //$NON-NLS-1$

 	String XML_ATTRIBUTE = "xml-attribute"; //$NON-NLS-1$

@@ -58,6 +60,7 @@
 	String XML_IS_SET_NULL_POLICY = "xml-is-set-null-policy"; //$NON-NLS-1$

 	String XML_JAVA_TYPE_ADAPTER = "xml-java-type-adapter"; //$NON-NLS-1$

 	String XML_JOIN_NODES = "xml-join-nodes"; //$NON-NLS-1$

+	String XML_MAPPING_METADATA_COMPLETE = "xml-mapping-metadata-complete"; //$NON-NLS-1$

 	String XML_NULL_POLICY = "xml-null-policy"; //$NON-NLS-1$

 	String XML_TRANSFORMATION = "xml-transformation"; //$NON-NLS-1$

 	String XML_TRANSIENT = "xml-transient"; //$NON-NLS-1$

diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
index 314a286..c3f90a0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
@@ -18,6 +18,7 @@
 import org.eclipse.emf.ecore.EReference;

 import org.eclipse.emf.ecore.EValidator;

 import org.eclipse.emf.ecore.impl.EPackageImpl;

+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;

 import org.eclipse.jpt.common.core.resource.xml.CommonPackage;

 import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.util.OxmValidator;

 

@@ -1064,7 +1065,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__IMPLIED_VERSION = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 0;

+	public static final int EXML_BINDINGS__IMPLIED_VERSION = CommonPackage.EROOT_OBJECT_IMPL__IMPLIED_VERSION;

 

 	/**

 	 * The feature id for the '<em><b>Xml Accessor Type</b></em>' attribute.

@@ -1073,7 +1074,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_ACCESSOR_TYPE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 1;

+	public static final int EXML_BINDINGS__XML_ACCESSOR_TYPE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 0;

 

 	/**

 	 * The feature id for the '<em><b>Xml Accessor Order</b></em>' attribute.

@@ -1082,7 +1083,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_ACCESSOR_ORDER = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 2;

+	public static final int EXML_BINDINGS__XML_ACCESSOR_ORDER = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 1;

 

 	/**

 	 * The feature id for the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute.

@@ -1091,7 +1092,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 3;

+	public static final int EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 2;

 

 	/**

 	 * The feature id for the '<em><b>Package Name</b></em>' attribute.

@@ -1100,7 +1101,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__PACKAGE_NAME = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 4;

+	public static final int EXML_BINDINGS__PACKAGE_NAME = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 3;

 

 	/**

 	 * The feature id for the '<em><b>Xml Name Transformer</b></em>' attribute.

@@ -1109,7 +1110,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_NAME_TRANSFORMER = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 5;

+	public static final int EXML_BINDINGS__XML_NAME_TRANSFORMER = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 4;

 

 	/**

 	 * The feature id for the '<em><b>Xml Schema</b></em>' containment reference.

@@ -1118,7 +1119,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_SCHEMA = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 6;

+	public static final int EXML_BINDINGS__XML_SCHEMA = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 5;

 

 	/**

 	 * The feature id for the '<em><b>Xml Schema Type</b></em>' containment reference.

@@ -1127,7 +1128,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_SCHEMA_TYPE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 7;

+	public static final int EXML_BINDINGS__XML_SCHEMA_TYPE = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 6;

 

 	/**

 	 * The feature id for the '<em><b>Xml Schema Types</b></em>' containment reference list.

@@ -1136,7 +1137,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_SCHEMA_TYPES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 8;

+	public static final int EXML_BINDINGS__XML_SCHEMA_TYPES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 7;

 

 	/**

 	 * The feature id for the '<em><b>Xml Java Type Adapters</b></em>' containment reference list.

@@ -1145,7 +1146,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_JAVA_TYPE_ADAPTERS = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 9;

+	public static final int EXML_BINDINGS__XML_JAVA_TYPE_ADAPTERS = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 8;

 

 	/**

 	 * The feature id for the '<em><b>Xml Registries</b></em>' containment reference list.

@@ -1154,7 +1155,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_REGISTRIES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 10;

+	public static final int EXML_BINDINGS__XML_REGISTRIES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 9;

 

 	/**

 	 * The feature id for the '<em><b>Xml Enums</b></em>' containment reference list.

@@ -1163,7 +1164,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__XML_ENUMS = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 11;

+	public static final int EXML_BINDINGS__XML_ENUMS = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 10;

 

 	/**

 	 * The feature id for the '<em><b>Java Types</b></em>' containment reference list.

@@ -1172,7 +1173,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS__JAVA_TYPES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 12;

+	public static final int EXML_BINDINGS__JAVA_TYPES = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 11;

 

 	/**

 	 * The number of structural features of the '<em>EXml Bindings</em>' class.

@@ -1181,7 +1182,7 @@
 	 * @generated

 	 * @ordered

 	 */

-	public static final int EXML_BINDINGS_FEATURE_COUNT = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 13;

+	public static final int EXML_BINDINGS_FEATURE_COUNT = CommonPackage.EROOT_OBJECT_IMPL_FEATURE_COUNT + 12;

 

 	/**

 	 * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlClassExtractor <em>EXml Class Extractor</em>}' class.

@@ -3695,6 +3696,7 @@
 

 		// Initialize simple dependencies

 		CommonPackage.eINSTANCE.eClass();

+		XMLTypePackage.eINSTANCE.eClass();

 

 		// Create package meta-data objects

 		theOxmPackage.createPackageContents();

@@ -4706,21 +4708,6 @@
 	}

 

 	/**

-	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getImpliedVersion <em>Implied Version</em>}'.

-	 * <!-- begin-user-doc -->

-	 * <!-- end-user-doc -->

-	 * @return the meta object for the attribute '<em>Implied Version</em>'.

-	 * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getImpliedVersion()

-	 * @see #getEXmlBindings()

-	 * @generated

-	 */

-	public EAttribute getEXmlBindings_ImpliedVersion()

-	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(0);

-	}

-

-

-	/**

 	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlAccessorType <em>Xml Accessor Type</em>}'.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

@@ -4731,7 +4718,7 @@
 	 */

 	public EAttribute getEXmlBindings_XmlAccessorType()

 	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(1);

+		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(0);

 	}

 

 

@@ -4746,22 +4733,22 @@
 	 */

 	public EAttribute getEXmlBindings_XmlAccessorOrder()

 	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(2);

+		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(1);

 	}

 

 

 	/**

-	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}'.

+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}'.

 	 * <!-- begin-user-doc -->

 	 * <!-- end-user-doc -->

 	 * @return the meta object for the attribute '<em>Xml Mapping Metadata Complete</em>'.

-	 * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#isXmlMappingMetadataComplete()

+	 * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings#getXmlMappingMetadataComplete()

 	 * @see #getEXmlBindings()

 	 * @generated

 	 */

 	public EAttribute getEXmlBindings_XmlMappingMetadataComplete()

 	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(3);

+		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(2);

 	}

 

 

@@ -4776,7 +4763,7 @@
 	 */

 	public EAttribute getEXmlBindings_PackageName()

 	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(4);

+		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(3);

 	}

 

 

@@ -4791,7 +4778,7 @@
 	 */

 	public EAttribute getEXmlBindings_XmlNameTransformer()

 	{

-		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(5);

+		return (EAttribute)eXmlBindingsEClass.getEStructuralFeatures().get(4);

 	}

 

 

@@ -4806,7 +4793,7 @@
 	 */

 	public EReference getEXmlBindings_XmlSchema()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(6);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(5);

 	}

 

 

@@ -4821,7 +4808,7 @@
 	 */

 	public EReference getEXmlBindings_XmlSchemaType()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(7);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(6);

 	}

 

 

@@ -4836,7 +4823,7 @@
 	 */

 	public EReference getEXmlBindings_XmlSchemaTypes()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(8);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(7);

 	}

 

 

@@ -4851,7 +4838,7 @@
 	 */

 	public EReference getEXmlBindings_XmlJavaTypeAdapters()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(9);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(8);

 	}

 

 

@@ -4866,7 +4853,7 @@
 	 */

 	public EReference getEXmlBindings_XmlRegistries()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(10);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(9);

 	}

 

 

@@ -4881,7 +4868,7 @@
 	 */

 	public EReference getEXmlBindings_XmlEnums()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(11);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(10);

 	}

 

 

@@ -4896,7 +4883,7 @@
 	 */

 	public EReference getEXmlBindings_JavaTypes()

 	{

-		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(12);

+		return (EReference)eXmlBindingsEClass.getEStructuralFeatures().get(11);

 	}

 

 	/**

@@ -6932,7 +6919,6 @@
 		createEReference(eXmlAttributeEClass, EXML_ATTRIBUTE__XML_SCHEMA_TYPE);

 

 		eXmlBindingsEClass = createEClass(EXML_BINDINGS);

-		createEAttribute(eXmlBindingsEClass, EXML_BINDINGS__IMPLIED_VERSION);

 		createEAttribute(eXmlBindingsEClass, EXML_BINDINGS__XML_ACCESSOR_TYPE);

 		createEAttribute(eXmlBindingsEClass, EXML_BINDINGS__XML_ACCESSOR_ORDER);

 		createEAttribute(eXmlBindingsEClass, EXML_BINDINGS__XML_MAPPING_METADATA_COMPLETE);

@@ -7138,6 +7124,7 @@
 

 		// Obtain other dependent packages

 		CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);

+		XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);

 

 		// Create type parameters

 

@@ -7294,10 +7281,9 @@
 		initEReference(getEXmlAttribute_XmlSchemaType(), this.getEXmlSchemaType(), null, "xmlSchemaType", null, 0, 1, EXmlAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 

 		initEClass(eXmlBindingsEClass, EXmlBindings.class, "EXmlBindings", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

-		initEAttribute(getEXmlBindings_ImpliedVersion(), ecorePackage.getEString(), "impliedVersion", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 		initEAttribute(getEXmlBindings_XmlAccessorType(), this.getEXmlAccessType(), "xmlAccessorType", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 		initEAttribute(getEXmlBindings_XmlAccessorOrder(), this.getEXmlAccessOrder(), "xmlAccessorOrder", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

-		initEAttribute(getEXmlBindings_XmlMappingMetadataComplete(), ecorePackage.getEBoolean(), "xmlMappingMetadataComplete", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEAttribute(getEXmlBindings_XmlMappingMetadataComplete(), theXMLTypePackage.getBooleanObject(), "xmlMappingMetadataComplete", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 		initEAttribute(getEXmlBindings_PackageName(), ecorePackage.getEString(), "packageName", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 		initEAttribute(getEXmlBindings_XmlNameTransformer(), ecorePackage.getEString(), "xmlNameTransformer", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

 		initEReference(getEXmlBindings_XmlSchema(), this.getEXmlSchema(), null, "xmlSchema", null, 0, 1, EXmlBindings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

@@ -8105,14 +8091,6 @@
 		public static final EClass EXML_BINDINGS = eINSTANCE.getEXmlBindings();

 

 		/**

-		 * The meta object literal for the '<em><b>Implied Version</b></em>' attribute feature.

-		 * <!-- begin-user-doc -->

-		 * <!-- end-user-doc -->

-		 * @generated

-		 */

-		public static final EAttribute EXML_BINDINGS__IMPLIED_VERSION = eINSTANCE.getEXmlBindings_ImpliedVersion();

-

-		/**

 		 * The meta object literal for the '<em><b>Xml Accessor Type</b></em>' attribute feature.

 		 * <!-- begin-user-doc -->

 		 * <!-- end-user-doc -->

diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/ELJaxbCoreContextModelTests.java b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/ELJaxbCoreContextModelTests.java
index a0117e9..f36e067 100644
--- a/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/ELJaxbCoreContextModelTests.java
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/ELJaxbCoreContextModelTests.java
@@ -13,6 +13,7 @@
 import junit.framework.TestSuite;
 import org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.ELJaxbCoreTests;
 import org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.java.ELJaxbCoreJavaContextModelTests;
+import org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.oxm.ELJaxbCoreOxmContextModelTests;
 
 
 public class ELJaxbCoreContextModelTests {
@@ -23,6 +24,7 @@
 		if (ELJaxbCoreTests.requiredJarsExists()) {
 			suite.addTestSuite(ELJaxbContextRootTests.class);			
 			suite.addTest(ELJaxbCoreJavaContextModelTests.suite());
+			suite.addTest(ELJaxbCoreOxmContextModelTests.suite());
 		}
 		else {
 			suite.addTest(TestSuite.warning(ELJaxbCoreTests.buildMissingJarErrorMessage()));
diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/ELJaxbCoreOxmContextModelTests.java b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/ELJaxbCoreOxmContextModelTests.java
new file mode 100644
index 0000000..47f2d4d
--- /dev/null
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/ELJaxbCoreOxmContextModelTests.java
@@ -0,0 +1,30 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.oxm;
+

+import junit.framework.Test;

+import junit.framework.TestCase;

+import junit.framework.TestSuite;

+
+public class ELJaxbCoreOxmContextModelTests

+		extends TestCase {

+	

+	public static Test suite() {

+		TestSuite suite = new TestSuite(ELJaxbCoreOxmContextModelTests.class.getName());

+		suite.addTestSuite(OxmXmlBindingsTests.class);

+		return suite;

+	}

+	

+	

+	private ELJaxbCoreOxmContextModelTests() {

+		super();

+		throw new UnsupportedOperationException();

+	}

+}
diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmContextModelTestCase.java b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmContextModelTestCase.java
new file mode 100644
index 0000000..f9cd255
--- /dev/null
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmContextModelTestCase.java
@@ -0,0 +1,52 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.oxm;
+
+import java.io.BufferedReader;

+import java.io.ByteArrayInputStream;

+import java.io.InputStream;

+import java.io.InputStreamReader;

+import org.eclipse.core.resources.IFile;

+import org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.ELJaxbContextModelTestCase;

+
+public class OxmContextModelTestCase

+		extends ELJaxbContextModelTestCase {

+	

+	protected OxmContextModelTestCase(String name) {

+		super(name);

+	}

+	

+	

+	protected void addOxmFile(String fileName, StringBuffer contents) throws Exception {

+		IFile oxmFile = getJavaProject().getProject().getFolder("src").getFile(fileName);

+		oxmFile.create(new ByteArrayInputStream(contents.toString().getBytes()), true, null);

+	}

+	

+	protected void assertFileContentsContains(String fileName, String stringToTest, boolean doesContain) throws Exception {

+		StringBuilder sb = new StringBuilder();

+	    IFile oxmFile = getJavaProject().getProject().getFolder("src").getFile(fileName);

+		InputStream is = oxmFile.getContents();

+		BufferedReader br = new BufferedReader(new InputStreamReader(is));

+		

+		String line;

+		while ((line = br.readLine()) != null) {

+			sb.append(line);

+		}

+		

+		is.close();

+			

+	    if (doesContain) {

+    		assertTrue(new String(sb).contains(stringToTest));

+    	}

+    	else {

+    		assertFalse(new String(sb).contains(stringToTest));

+    	}

+	}

+}
diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmXmlBindingsTests.java b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmXmlBindingsTests.java
new file mode 100644
index 0000000..8af1952
--- /dev/null
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.eclipselink.core.tests/src/org/eclipse/jpt/jaxb/eclipselink/core/tests/internal/context/oxm/OxmXmlBindingsTests.java
@@ -0,0 +1,317 @@
+/*******************************************************************************

+ *  Copyright (c) 2012  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

+ *  

+ *  Contributors: 

+ *  	Oracle - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.jpt.jaxb.eclipselink.core.tests.internal.context.oxm;
+

+import org.eclipse.jpt.common.core.resource.xml.JptXmlResource;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbContextRoot;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessOrder;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.ELJaxbXmlAccessType;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.oxm.OxmFile;

+import org.eclipse.jpt.jaxb.eclipselink.core.context.oxm.OxmXmlBindings;

+import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder;

+import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType;

+import org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlBindings;

+
+public class OxmXmlBindingsTests

+		extends OxmContextModelTestCase {

+	

+	public OxmXmlBindingsTests(String name) {

+		super(name);

+	}

+	

+	

+	protected void addOxmFile(String fileName, String packageName) throws Exception {

+		StringBuffer sb = new StringBuffer();

+		sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append(CR);

+		sb.append("<xml-bindings").append(CR);

+		sb.append("    version=\"2.4\"").append(CR);

+		sb.append("    xmlns=\"http://www.eclipse.org/eclipselink/xsds/persistence/oxm\"").append(CR);

+		sb.append("    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"").append(CR);

+		sb.append("    xsi:schemaLocation=\"http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_4.xsd\"").append(CR);

+		sb.append("    package-name=\"").append(packageName).append("\"").append(CR);

+		sb.append("    xml-accessor-type=\"PUBLIC_MEMBER\"").append(CR);

+		sb.append("    />").append(CR);

+		addOxmFile(fileName, sb);

+	}

+	

+	public void testUpdateAccessType() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(EXmlAccessType.PUBLIC_MEMBER, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getAccessType());

+		

+		eXmlBindings.setXmlAccessorType(EXmlAccessType.FIELD);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"FIELD\"", true);

+		assertEquals(EXmlAccessType.FIELD, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.FIELD, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.FIELD, xmlBindings.getAccessType());

+		

+		eXmlBindings.setXmlAccessorType(EXmlAccessType.NONE);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"NONE\"", true);

+		assertEquals(EXmlAccessType.NONE, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.NONE, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.NONE, xmlBindings.getAccessType());

+		

+		eXmlBindings.setXmlAccessorType(EXmlAccessType.PROPERTY);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"PROPERTY\"", true);

+		assertEquals(EXmlAccessType.PROPERTY, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.PROPERTY, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PROPERTY, xmlBindings.getAccessType());

+		

+		eXmlBindings.setXmlAccessorType(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=", false);

+		assertNull(eXmlBindings.getXmlAccessorType());

+		assertNull(xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getAccessType());

+	}

+	

+	public void testModifyAccessType() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(EXmlAccessType.PUBLIC_MEMBER, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getAccessType());

+		

+		xmlBindings.setSpecifiedAccessType(ELJaxbXmlAccessType.FIELD);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"FIELD\"", true);

+		assertEquals(EXmlAccessType.FIELD, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.FIELD, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.FIELD, xmlBindings.getAccessType());

+		

+		xmlBindings.setSpecifiedAccessType(ELJaxbXmlAccessType.NONE);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"NONE\"", true);

+		assertEquals(EXmlAccessType.NONE, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.NONE, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.NONE, xmlBindings.getAccessType());

+		

+		xmlBindings.setSpecifiedAccessType(ELJaxbXmlAccessType.PROPERTY);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=\"PROPERTY\"", true);

+		assertEquals(EXmlAccessType.PROPERTY, eXmlBindings.getXmlAccessorType());

+		assertEquals(ELJaxbXmlAccessType.PROPERTY, xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PROPERTY, xmlBindings.getAccessType());

+		

+		xmlBindings.setSpecifiedAccessType(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-type=", false);

+		assertNull(eXmlBindings.getXmlAccessorType());

+		assertNull(xmlBindings.getSpecifiedAccessType());

+		assertEquals(ELJaxbXmlAccessType.PUBLIC_MEMBER, xmlBindings.getAccessType());

+	}

+	

+	public void testUpdateAccessOrder() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(EXmlAccessOrder.UNDEFINED, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+		

+		eXmlBindings.setXmlAccessorOrder(EXmlAccessOrder.ALPHABETICAL);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=\"ALPHABETICAL\"", true);

+		assertEquals(EXmlAccessOrder.ALPHABETICAL, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.ALPHABETICAL, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.ALPHABETICAL, xmlBindings.getAccessOrder());

+		

+		eXmlBindings.setXmlAccessorOrder(EXmlAccessOrder.UNDEFINED);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=\"UNDEFINED\"", true);

+		assertEquals(EXmlAccessOrder.UNDEFINED, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+		

+		eXmlBindings.setXmlAccessorOrder(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=", false);

+		assertNull(eXmlBindings.getXmlAccessorOrder());

+		assertNull(xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+	}

+	

+	public void testModifyAccessOrder() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(EXmlAccessOrder.UNDEFINED, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+		

+		xmlBindings.setSpecifiedAccessOrder(ELJaxbXmlAccessOrder.ALPHABETICAL);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=\"ALPHABETICAL\"", true);

+		assertEquals(EXmlAccessOrder.ALPHABETICAL, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.ALPHABETICAL, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.ALPHABETICAL, xmlBindings.getAccessOrder());

+		

+		xmlBindings.setSpecifiedAccessOrder(ELJaxbXmlAccessOrder.UNDEFINED);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=\"UNDEFINED\"", true);

+		assertEquals(EXmlAccessOrder.UNDEFINED, eXmlBindings.getXmlAccessorOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+		

+		xmlBindings.setSpecifiedAccessOrder(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-accessor-order=", false);

+		assertNull(eXmlBindings.getXmlAccessorOrder());

+		assertNull(xmlBindings.getSpecifiedAccessOrder());

+		assertEquals(ELJaxbXmlAccessOrder.UNDEFINED, xmlBindings.getAccessOrder());

+	}

+	

+	public void testUpdateXmlMappingMetadataComplete() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(Boolean.FALSE, eXmlBindings.getXmlMappingMetadataComplete());

+		assertFalse(xmlBindings.isXmlMappingMetadataComplete());

+		

+		eXmlBindings.setXmlMappingMetadataComplete(Boolean.TRUE);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-mapping-metadata-complete=\"true\"", true);

+		assertEquals(Boolean.TRUE, eXmlBindings.getXmlMappingMetadataComplete());

+		assertTrue(xmlBindings.isXmlMappingMetadataComplete());

+		

+		eXmlBindings.setXmlMappingMetadataComplete(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-mapping-metadata-complete=", false);

+		assertNull(eXmlBindings.getXmlMappingMetadataComplete());

+		assertFalse(xmlBindings.isXmlMappingMetadataComplete());

+	}

+	

+	public void testModifyXmlMappingMetadataComplete() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		// the value is not exactly specified, but since the attribute has a default value, it's "specified"

+		assertEquals(Boolean.FALSE, eXmlBindings.getXmlMappingMetadataComplete());

+		assertFalse(xmlBindings.isXmlMappingMetadataComplete());

+		

+		xmlBindings.setXmlMappingMetadataComplete(true);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-mapping-metadata-complete=\"true\"", true);

+		assertEquals(Boolean.TRUE, eXmlBindings.getXmlMappingMetadataComplete());

+		assertTrue(xmlBindings.isXmlMappingMetadataComplete());

+		

+		xmlBindings.setXmlMappingMetadataComplete(false);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "xml-mapping-metadata-complete=", false);

+		assertNull(eXmlBindings.getXmlMappingMetadataComplete());

+		assertFalse(xmlBindings.isXmlMappingMetadataComplete());

+	}

+	

+	public void testUpdatePackageName() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		assertEquals("test.oxm", eXmlBindings.getPackageName());

+		assertEquals("test.oxm", xmlBindings.getPackageName());

+		

+		eXmlBindings.setPackageName("foo");

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "package-name=\"foo\"", true);

+		assertEquals("foo", eXmlBindings.getPackageName());

+		assertEquals("foo", xmlBindings.getPackageName());

+		

+		eXmlBindings.setPackageName(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "package-name=", false);

+		assertNull(eXmlBindings.getPackageName());

+		assertNull(xmlBindings.getPackageName());

+	}

+	

+	public void testModifyPackageName() throws Exception {

+		addOxmFile("oxm.xml", "test.oxm");

+		ELJaxbContextRoot root = (ELJaxbContextRoot) getJaxbProject().getContextRoot();

+		OxmFile oxmFile = root.getOxmFile("test.oxm");

+		OxmXmlBindings xmlBindings = oxmFile.getXmlBindings();

+		JptXmlResource oxmResource = oxmFile.getOxmResource();

+		EXmlBindings eXmlBindings = (EXmlBindings) oxmResource.getRootObject();

+		

+		assertEquals("test.oxm", eXmlBindings.getPackageName());

+		assertEquals("test.oxm", xmlBindings.getPackageName());

+		

+		xmlBindings.setPackageName("foo");

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "package-name=\"foo\"", true);

+		assertEquals("foo", eXmlBindings.getPackageName());

+		assertEquals("foo", xmlBindings.getPackageName());

+		

+		xmlBindings.setPackageName(null);

+		oxmResource.save();

+		

+		assertFileContentsContains("oxm.xml", "package-name=", false);

+		assertNull(eXmlBindings.getPackageName());

+		assertNull(xmlBindings.getPackageName());

+	}

+}