Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fullbright2013-01-28 15:08:41 +0000
committerPaul Fullbright2013-01-29 21:37:45 +0000
commit3ba3a7d4cbce97451843a6522d061a0b220fffe0 (patch)
tree7ca5c076fd68f9c7dc5b9aab052181d7f9bd2085 /jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model
parente38690a51b2e03cb26c316815193fe10beacceee (diff)
downloadwebtools.dali-3ba3a7d4cbce97451843a6522d061a0b220fffe0.tar.gz
webtools.dali-3ba3a7d4cbce97451843a6522d061a0b220fffe0.tar.xz
webtools.dali-3ba3a7d4cbce97451843a6522d061a0b220fffe0.zip
Refactored xmlSeeAlso in resource model
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.ecore9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/oxm.genmodel6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EAbstractTypeMapping.java72
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EJavaType.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlSeeAlso.java267
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmFactory.java51
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java352
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/util/OxmValidator.java50
8 files changed, 537 insertions, 273 deletions
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 d6d7800acb..2e191a15e9 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
@@ -7,7 +7,8 @@
containment="true" resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="xmlRootElement" eType="#//EXmlRootElement"
containment="true" resolveProxies="false"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlSeeAlso" eType="#//EXmlSeeAlso"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xmlSeeAlso" eType="#//EXmlSeeAlso"
+ containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EAbstractXmlNullPolicy" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="xsiNilRepresentsNull" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
@@ -293,10 +294,8 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="namespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="EXmlSeeAlso" instanceClassName="java.util.List">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="itemType" value="http://www.eclipse.org/emf/2003/XMLType#string"/>
- </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="EXmlSeeAlso">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="classes" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EXmlTransformation" eSuperTypes="#//EJavaAttribute #//EAccessibleJavaAttribute #//EPropertyHolder">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="optional" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
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 a459711e68..f2786ad9d0 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
@@ -37,12 +37,11 @@
<genEnumLiterals ecoreEnumLiteral="oxm.ecore#//EXmlVirtualAccessMethodsSchema/ANY"/>
</genEnums>
<genDataTypes ecoreDataType="oxm.ecore#//EPropOrder"/>
- <genDataTypes ecoreDataType="oxm.ecore#//EXmlSeeAlso"/>
<genClasses image="false" ecoreClass="oxm.ecore#//EAbstractTypeMapping">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EAbstractTypeMapping/xmlTransient"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference oxm.ecore#//EAbstractTypeMapping/xmlType"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference oxm.ecore#//EAbstractTypeMapping/xmlRootElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EAbstractTypeMapping/xmlSeeAlso"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EReference oxm.ecore#//EAbstractTypeMapping/xmlSeeAlso"/>
</genClasses>
<genClasses image="false" ecoreClass="oxm.ecore#//EAbstractXmlNullPolicy">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EAbstractXmlNullPolicy/xsiNilRepresentsNull"/>
@@ -260,6 +259,9 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlSchemaType/namespace"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlSchemaType/type"/>
</genClasses>
+ <genClasses ecoreClass="oxm.ecore#//EXmlSeeAlso">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlSeeAlso/classes"/>
+ </genClasses>
<genClasses ecoreClass="oxm.ecore#//EXmlTransformation">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute oxm.ecore#//EXmlTransformation/optional"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference oxm.ecore#//EXmlTransformation/xmlReadTransformer"/>
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EAbstractTypeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EAbstractTypeMapping.java
index 3a8d609951..bdcfc44c91 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EAbstractTypeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EAbstractTypeMapping.java
@@ -2,7 +2,6 @@
*/
package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm;
-import java.util.List;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
@@ -76,24 +75,14 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
protected EXmlRootElement xmlRootElement;
/**
- * The default value of the '{@link #getXmlSeeAlso() <em>Xml See Also</em>}' attribute.
+ * The cached value of the '{@link #getXmlSeeAlso() <em>Xml See Also</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getXmlSeeAlso()
* @generated
* @ordered
*/
- protected static final List<String> XML_SEE_ALSO_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getXmlSeeAlso() <em>Xml See Also</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getXmlSeeAlso()
- * @generated
- * @ordered
- */
- protected List<String> xmlSeeAlso = XML_SEE_ALSO_EDEFAULT;
+ protected EXmlSeeAlso xmlSeeAlso;
/**
* <!-- begin-user-doc -->
@@ -272,38 +261,63 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
}
/**
- * Returns the value of the '<em><b>Xml See Also</b></em>' attribute.
+ * Returns the value of the '<em><b>Xml See Also</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Xml See Also</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Xml See Also</em>' attribute.
- * @see #setXmlSeeAlso(List)
+ * @return the value of the '<em>Xml See Also</em>' containment reference.
+ * @see #setXmlSeeAlso(EXmlSeeAlso)
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEAbstractTypeMapping_XmlSeeAlso()
- * @model dataType="org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso" many="false"
+ * @model containment="true"
* @generated
*/
- public List<String> getXmlSeeAlso()
+ public EXmlSeeAlso getXmlSeeAlso()
{
return xmlSeeAlso;
}
/**
- * Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractTypeMapping#getXmlSeeAlso <em>Xml See Also</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Xml See Also</em>' attribute.
- * @see #getXmlSeeAlso()
* @generated
*/
- public void setXmlSeeAlso(List<String> newXmlSeeAlso)
+ public NotificationChain basicSetXmlSeeAlso(EXmlSeeAlso newXmlSeeAlso, NotificationChain msgs)
{
- List<String> oldXmlSeeAlso = xmlSeeAlso;
+ EXmlSeeAlso oldXmlSeeAlso = xmlSeeAlso;
xmlSeeAlso = newXmlSeeAlso;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO, oldXmlSeeAlso, xmlSeeAlso));
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO, oldXmlSeeAlso, newXmlSeeAlso);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractTypeMapping#getXmlSeeAlso <em>Xml See Also</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Xml See Also</em>' containment reference.
+ * @see #getXmlSeeAlso()
+ * @generated
+ */
+ public void setXmlSeeAlso(EXmlSeeAlso newXmlSeeAlso)
+ {
+ if (newXmlSeeAlso != xmlSeeAlso)
+ {
+ NotificationChain msgs = null;
+ if (xmlSeeAlso != null)
+ msgs = ((InternalEObject)xmlSeeAlso).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO, null, msgs);
+ if (newXmlSeeAlso != null)
+ msgs = ((InternalEObject)newXmlSeeAlso).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO, null, msgs);
+ msgs = basicSetXmlSeeAlso(newXmlSeeAlso, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO, newXmlSeeAlso, newXmlSeeAlso));
}
/**
@@ -320,6 +334,8 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
return basicSetXmlType(null, msgs);
case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT:
return basicSetXmlRootElement(null, msgs);
+ case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO:
+ return basicSetXmlSeeAlso(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -367,7 +383,7 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
setXmlRootElement((EXmlRootElement)newValue);
return;
case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO:
- setXmlSeeAlso((List<String>)newValue);
+ setXmlSeeAlso((EXmlSeeAlso)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -393,7 +409,7 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
setXmlRootElement((EXmlRootElement)null);
return;
case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO:
- setXmlSeeAlso(XML_SEE_ALSO_EDEFAULT);
+ setXmlSeeAlso((EXmlSeeAlso)null);
return;
}
super.eUnset(featureID);
@@ -416,7 +432,7 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT:
return xmlRootElement != null;
case OxmPackage.EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO:
- return XML_SEE_ALSO_EDEFAULT == null ? xmlSeeAlso != null : !XML_SEE_ALSO_EDEFAULT.equals(xmlSeeAlso);
+ return xmlSeeAlso != null;
}
return super.eIsSet(featureID);
}
@@ -434,8 +450,6 @@ public abstract class EAbstractTypeMapping extends EBaseObjectImpl implements EB
StringBuffer result = new StringBuffer(super.toString());
result.append(" (xmlTransient: ");
result.append(xmlTransient);
- result.append(", xmlSeeAlso: ");
- result.append(xmlSeeAlso);
result.append(')');
return result.toString();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EJavaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EJavaType.java
index 6b6f0cf9bb..fc6dfb57c3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EJavaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EJavaType.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm;
import java.util.Collection;
-import java.util.List;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
@@ -20,7 +19,6 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
-import org.eclipse.jpt.common.core.resource.xml.EBaseObjectImpl;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.wst.common.internal.emf.resource.Translator;
@@ -1144,6 +1142,7 @@ public class EJavaType extends EAbstractTypeMapping implements EPropertyHolder
buildNameTranslator(),
buildXmlTransientTranslator(),
EXmlType.buildTranslator(),
+ EXmlSeeAlso.buildTranslator(),
new EJavaAttribute.JavaAttributesTranslator()
};
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlSeeAlso.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlSeeAlso.java
new file mode 100644
index 0000000000..2d69213f52
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/EXmlSeeAlso.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+/**
+ */
+package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.common.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.common.core.resource.xml.EBaseObject;
+import org.eclipse.jpt.common.core.resource.xml.EBaseObjectImpl;
+import org.eclipse.jpt.common.utility.internal.ArrayTools;
+import org.eclipse.jpt.common.utility.internal.StringTools;
+import org.eclipse.jpt.common.utility.internal.iterable.EmptyListIterable;
+import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
+import org.eclipse.jpt.common.utility.iterable.ListIterable;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EXml See Also</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso#getClasses <em>Classes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlSeeAlso()
+ * @model kind="class"
+ * @extends EBaseObject
+ * @generated
+ */
+public class EXmlSeeAlso extends EBaseObjectImpl implements EBaseObject
+{
+ /**
+ * The default value of the '{@link #getClasses() <em>Classes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClasses()
+ * @generated
+ * @ordered
+ */
+ protected static final String CLASSES_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getClasses() <em>Classes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClasses()
+ * @generated
+ * @ordered
+ */
+ protected String classes = CLASSES_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EXmlSeeAlso()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return OxmPackage.Literals.EXML_SEE_ALSO;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Classes</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Classes</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Classes</em>' attribute.
+ * @see #setClasses(String)
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlSeeAlso_Classes()
+ * @model
+ * @generated
+ */
+ public String getClasses()
+ {
+ return classes;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso#getClasses <em>Classes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Classes</em>' attribute.
+ * @see #getClasses()
+ * @generated
+ */
+ public void setClasses(String newClasses)
+ {
+ String oldClasses = classes;
+ classes = newClasses;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OxmPackage.EXML_SEE_ALSO__CLASSES, oldClasses, classes));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case OxmPackage.EXML_SEE_ALSO__CLASSES:
+ return getClasses();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case OxmPackage.EXML_SEE_ALSO__CLASSES:
+ setClasses((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case OxmPackage.EXML_SEE_ALSO__CLASSES:
+ setClasses(CLASSES_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case OxmPackage.EXML_SEE_ALSO__CLASSES:
+ return CLASSES_EDEFAULT == null ? classes != null : !CLASSES_EDEFAULT.equals(classes);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (classes: ");
+ result.append(classes);
+ result.append(')');
+ return result.toString();
+ }
+
+
+ // ***** misc *****
+
+ public ListIterable<String> getClassesList() {
+ if (StringTools.isBlank(this.classes)) {
+ return EmptyListIterable.instance();
+ }
+ String[] classes = this.classes.split("\\s+");
+ return IterableTools.listIterable(classes);
+ }
+
+ public void addClass(int index, String clazz) {
+ // easy case 1: existing classes is empty - set classes to added class
+ if (StringTools.isBlank(this.classes)) {
+ setClasses(clazz);
+ return;
+ }
+
+ // easy case 2: add new class to beginning of existing classes, use default delim of one space
+ if (index == 0) {
+ setClasses(StringTools.concatenate(clazz, " ", this.classes));
+ return;
+ }
+
+ String[] classArray = this.classes.split("\\s+");
+ String[] newClassArray = ArrayTools.add(classArray, index, clazz);
+ setClasses(StringTools.concatenate(newClassArray, " "));
+ }
+
+ public void removeClass(int index) {
+ String[] classArray = this.classes.split("\\s+");
+ String[] newClassArray = ArrayTools.removeElementAtIndex(classArray, index);
+ setClasses(StringTools.concatenate(newClassArray, " "));
+ }
+
+ public void moveClass(int targetIndex, int sourceIndex) {
+ String[] classArray = this.classes.split("\\s+");
+ String[] newClassArray = ArrayTools.move(classArray, targetIndex, sourceIndex);
+ setClasses(StringTools.concatenate(newClassArray, " "));
+ }
+
+
+ // ***** translators *****
+
+ public static Translator buildTranslator() {
+ return new SimpleTranslator(
+ Oxm.XML_SEE_ALSO,
+ OxmPackage.eINSTANCE.getEAbstractTypeMapping_XmlSeeAlso(),
+ buildTranslatorChildren());
+ }
+
+ private static Translator[] buildTranslatorChildren() {
+ return new Translator[] {
+ buildClassesTranslator()
+ };
+ }
+
+ protected static Translator buildClassesTranslator() {
+ return new SimpleTranslator(
+ Translator.TEXT_ATTRIBUTE_VALUE,
+ OxmPackage.eINSTANCE.getEXmlSeeAlso_Classes());
+ }
+} \ No newline at end of file
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmFactory.java
index 8839682485..5dfac3d9bb 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmFactory.java
@@ -112,6 +112,7 @@ public class OxmFactory extends EFactoryImpl
case OxmPackage.EXML_ROOT_ELEMENT: return (EObject)createEXmlRootElement();
case OxmPackage.EXML_SCHEMA: return (EObject)createEXmlSchema();
case OxmPackage.EXML_SCHEMA_TYPE: return (EObject)createEXmlSchemaType();
+ case OxmPackage.EXML_SEE_ALSO: return (EObject)createEXmlSeeAlso();
case OxmPackage.EXML_TRANSFORMATION: return (EObject)createEXmlTransformation();
case OxmPackage.EXML_TRANSIENT: return (EObject)createEXmlTransient();
case OxmPackage.EXML_TYPE: return (EObject)createEXmlType();
@@ -145,8 +146,6 @@ public class OxmFactory extends EFactoryImpl
return createEXmlVirtualAccessMethodsSchemaFromString(eDataType, initialValue);
case OxmPackage.EPROP_ORDER:
return createEPropOrderFromString(eDataType, initialValue);
- case OxmPackage.EXML_SEE_ALSO:
- return createEXmlSeeAlsoFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -174,8 +173,6 @@ public class OxmFactory extends EFactoryImpl
return convertEXmlVirtualAccessMethodsSchemaToString(eDataType, instanceValue);
case OxmPackage.EPROP_ORDER:
return convertEPropOrderToString(eDataType, instanceValue);
- case OxmPackage.EXML_SEE_ALSO:
- return convertEXmlSeeAlsoToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -516,6 +513,17 @@ public class OxmFactory extends EFactoryImpl
* <!-- end-user-doc -->
* @generated
*/
+ public EXmlSeeAlso createEXmlSeeAlso()
+ {
+ EXmlSeeAlso eXmlSeeAlso = new EXmlSeeAlso();
+ return eXmlSeeAlso;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EXmlTransformation createEXmlTransformation()
{
EXmlTransformation eXmlTransformation = new EXmlTransformation();
@@ -727,41 +735,6 @@ public class OxmFactory extends EFactoryImpl
* <!-- end-user-doc -->
* @generated
*/
- public List<String> createEXmlSeeAlsoFromString(EDataType eDataType, String initialValue)
- {
- if (initialValue == null) return null;
- List<String> result = new ArrayList<String>();
- for (String item : split(initialValue))
- {
- result.add((String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, item));
- }
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertEXmlSeeAlsoToString(EDataType eDataType, Object instanceValue)
- {
- if (instanceValue == null) return null;
- List<?> list = (List<?>)instanceValue;
- if (list.isEmpty()) return "";
- StringBuffer result = new StringBuffer();
- for (Object item : list)
- {
- result.append(XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, item));
- result.append(' ');
- }
- return result.substring(0, result.length() - 1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public OxmPackage getOxmPackage()
{
return (OxmPackage)getEPackage();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
index 585abc2422..fb17878aa6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/OxmPackage.java
@@ -109,7 +109,7 @@ public class OxmPackage extends EPackageImpl
public static final int EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT = 2;
/**
- * The feature id for the '<em><b>Xml See Also</b></em>' attribute.
+ * The feature id for the '<em><b>Xml See Also</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -378,7 +378,7 @@ public class OxmPackage extends EPackageImpl
public static final int EJAVA_TYPE__XML_ROOT_ELEMENT = EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT;
/**
- * The feature id for the '<em><b>Xml See Also</b></em>' attribute.
+ * The feature id for the '<em><b>Xml See Also</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -2085,7 +2085,7 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_ENUM__XML_ROOT_ELEMENT = EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT;
/**
- * The feature id for the '<em><b>Xml See Also</b></em>' attribute.
+ * The feature id for the '<em><b>Xml See Also</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -2909,7 +2909,145 @@ public class OxmPackage extends EPackageImpl
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlTransformation()
* @generated
*/
- public static final int EXML_TRANSFORMATION = 40;
+ public static final int EXML_TRANSFORMATION = 41;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlTransient <em>EXml Transient</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlTransient
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlTransient()
+ * @generated
+ */
+ public static final int EXML_TRANSIENT = 42;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlType <em>EXml Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlType
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlType()
+ * @generated
+ */
+ public static final int EXML_TYPE = 43;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlValue <em>EXml Value</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlValue
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlValue()
+ * @generated
+ */
+ public static final int EXML_VALUE = 44;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethods <em>EXml Virtual Access Methods</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethods
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlVirtualAccessMethods()
+ * @generated
+ */
+ public static final int EXML_VIRTUAL_ACCESS_METHODS = 45;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlWriteTransformer <em>EXml Write Transformer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlWriteTransformer
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlWriteTransformer()
+ * @generated
+ */
+ public static final int EXML_WRITE_TRANSFORMER = 46;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder <em>EXml Access Order</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlAccessOrder()
+ * @generated
+ */
+ public static final int EXML_ACCESS_ORDER = 47;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType <em>EXml Access Type</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlAccessType()
+ * @generated
+ */
+ public static final int EXML_ACCESS_TYPE = 48;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlMarshalNullRepresentation <em>EXml Marshal Null Representation</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlMarshalNullRepresentation
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlMarshalNullRepresentation()
+ * @generated
+ */
+ public static final int EXML_MARSHAL_NULL_REPRESENTATION = 49;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlNsForm <em>EXml Ns Form</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlNsForm
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlNsForm()
+ * @generated
+ */
+ public static final int EXML_NS_FORM = 50;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethodsSchema <em>EXml Virtual Access Methods Schema</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethodsSchema
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlVirtualAccessMethodsSchema()
+ * @generated
+ */
+ public static final int EXML_VIRTUAL_ACCESS_METHODS_SCHEMA = 51;
+
+ /**
+ * The meta object id for the '<em>EProp Order</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.List
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEPropOrder()
+ * @generated
+ */
+ public static final int EPROP_ORDER = 52;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso <em>EXml See Also</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlSeeAlso()
+ * @generated
+ */
+ public static final int EXML_SEE_ALSO = 40;
+
+ /**
+ * The feature id for the '<em><b>Classes</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int EXML_SEE_ALSO__CLASSES = 0;
+
+ /**
+ * The number of structural features of the '<em>EXml See Also</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int EXML_SEE_ALSO_FEATURE_COUNT = 1;
/**
* The feature id for the '<em><b>Java Attribute</b></em>' attribute.
@@ -2984,16 +3122,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_TRANSFORMATION_FEATURE_COUNT = EJAVA_ATTRIBUTE_FEATURE_COUNT + 5;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlTransient <em>EXml Transient</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlTransient
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlTransient()
- * @generated
- */
- public static final int EXML_TRANSIENT = 41;
-
- /**
* The feature id for the '<em><b>Java Attribute</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3030,16 +3158,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_TRANSIENT_FEATURE_COUNT = EJAVA_ATTRIBUTE_FEATURE_COUNT + 1;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlType <em>EXml Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlType
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlType()
- * @generated
- */
- public static final int EXML_TYPE = 42;
-
- /**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3094,16 +3212,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_TYPE_FEATURE_COUNT = 5;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlValue <em>EXml Value</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlValue
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlValue()
- * @generated
- */
- public static final int EXML_VALUE = 43;
-
- /**
* The feature id for the '<em><b>Java Attribute</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3212,16 +3320,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_VALUE_FEATURE_COUNT = EJAVA_ATTRIBUTE_FEATURE_COUNT + 9;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethods <em>EXml Virtual Access Methods</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethods
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlVirtualAccessMethods()
- * @generated
- */
- public static final int EXML_VIRTUAL_ACCESS_METHODS = 44;
-
- /**
* The feature id for the '<em><b>Get Method</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3258,16 +3356,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_VIRTUAL_ACCESS_METHODS_FEATURE_COUNT = 3;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlWriteTransformer <em>EXml Write Transformer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlWriteTransformer
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlWriteTransformer()
- * @generated
- */
- public static final int EXML_WRITE_TRANSFORMER = 45;
-
- /**
* The feature id for the '<em><b>Method</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3304,76 +3392,6 @@ public class OxmPackage extends EPackageImpl
public static final int EXML_WRITE_TRANSFORMER_FEATURE_COUNT = EABSTRACT_XML_TRANSFORMER_FEATURE_COUNT + 1;
/**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder <em>EXml Access Order</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessOrder
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlAccessOrder()
- * @generated
- */
- public static final int EXML_ACCESS_ORDER = 46;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType <em>EXml Access Type</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlAccessType
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlAccessType()
- * @generated
- */
- public static final int EXML_ACCESS_TYPE = 47;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlMarshalNullRepresentation <em>EXml Marshal Null Representation</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlMarshalNullRepresentation
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlMarshalNullRepresentation()
- * @generated
- */
- public static final int EXML_MARSHAL_NULL_REPRESENTATION = 48;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlNsForm <em>EXml Ns Form</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlNsForm
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlNsForm()
- * @generated
- */
- public static final int EXML_NS_FORM = 49;
-
- /**
- * The meta object id for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethodsSchema <em>EXml Virtual Access Methods Schema</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlVirtualAccessMethodsSchema
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlVirtualAccessMethodsSchema()
- * @generated
- */
- public static final int EXML_VIRTUAL_ACCESS_METHODS_SCHEMA = 50;
-
- /**
- * The meta object id for the '<em>EProp Order</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.List
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEPropOrder()
- * @generated
- */
- public static final int EPROP_ORDER = 51;
-
- /**
- * The meta object id for the '<em>EXml See Also</em>' data type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see java.util.List
- * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlSeeAlso()
- * @generated
- */
- public static final int EXML_SEE_ALSO = 52;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -3658,6 +3676,13 @@ public class OxmPackage extends EPackageImpl
* <!-- end-user-doc -->
* @generated
*/
+ private EClass eXmlSeeAlsoEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EClass eXmlTransformationEClass = null;
/**
@@ -3738,13 +3763,6 @@ public class OxmPackage extends EPackageImpl
private EDataType ePropOrderEDataType = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EDataType eXmlSeeAlsoEDataType = null;
-
- /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -3883,17 +3901,17 @@ public class OxmPackage extends EPackageImpl
/**
- * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractTypeMapping#getXmlSeeAlso <em>Xml See Also</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractTypeMapping#getXmlSeeAlso <em>Xml See Also</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Xml See Also</em>'.
+ * @return the meta object for the containment reference '<em>Xml See Also</em>'.
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractTypeMapping#getXmlSeeAlso()
* @see #getEAbstractTypeMapping()
* @generated
*/
- public EAttribute getEAbstractTypeMapping_XmlSeeAlso()
+ public EReference getEAbstractTypeMapping_XmlSeeAlso()
{
- return (EAttribute)eAbstractTypeMappingEClass.getEStructuralFeatures().get(3);
+ return (EReference)eAbstractTypeMappingEClass.getEStructuralFeatures().get(3);
}
@@ -6903,18 +6921,31 @@ public class OxmPackage extends EPackageImpl
/**
- * Returns the meta object for data type '{@link java.util.List <em>EXml See Also</em>}'.
+ * Returns the meta object for class '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso <em>EXml See Also</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for data type '<em>EXml See Also</em>'.
- * @see java.util.List
- * @model instanceClass="java.util.List"
- * extendedMetaData="itemType='http://www.eclipse.org/emf/2003/XMLType#string'"
+ * @return the meta object for class '<em>EXml See Also</em>'.
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso
* @generated
*/
- public EDataType getEXmlSeeAlso()
+ public EClass getEXmlSeeAlso()
{
- return eXmlSeeAlsoEDataType;
+ return eXmlSeeAlsoEClass;
+ }
+
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso#getClasses <em>Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Classes</em>'.
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso#getClasses()
+ * @see #getEXmlSeeAlso()
+ * @generated
+ */
+ public EAttribute getEXmlSeeAlso_Classes()
+ {
+ return (EAttribute)eXmlSeeAlsoEClass.getEStructuralFeatures().get(0);
}
@@ -6954,7 +6985,7 @@ public class OxmPackage extends EPackageImpl
createEAttribute(eAbstractTypeMappingEClass, EABSTRACT_TYPE_MAPPING__XML_TRANSIENT);
createEReference(eAbstractTypeMappingEClass, EABSTRACT_TYPE_MAPPING__XML_TYPE);
createEReference(eAbstractTypeMappingEClass, EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT);
- createEAttribute(eAbstractTypeMappingEClass, EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO);
+ createEReference(eAbstractTypeMappingEClass, EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO);
eAbstractXmlNullPolicyEClass = createEClass(EABSTRACT_XML_NULL_POLICY);
createEAttribute(eAbstractXmlNullPolicyEClass, EABSTRACT_XML_NULL_POLICY__XSI_NIL_REPRESENTS_NULL);
@@ -7173,6 +7204,9 @@ public class OxmPackage extends EPackageImpl
createEAttribute(eXmlSchemaTypeEClass, EXML_SCHEMA_TYPE__NAMESPACE);
createEAttribute(eXmlSchemaTypeEClass, EXML_SCHEMA_TYPE__TYPE);
+ eXmlSeeAlsoEClass = createEClass(EXML_SEE_ALSO);
+ createEAttribute(eXmlSeeAlsoEClass, EXML_SEE_ALSO__CLASSES);
+
eXmlTransformationEClass = createEClass(EXML_TRANSFORMATION);
createEAttribute(eXmlTransformationEClass, EXML_TRANSFORMATION__OPTIONAL);
createEReference(eXmlTransformationEClass, EXML_TRANSFORMATION__XML_READ_TRANSFORMER);
@@ -7209,7 +7243,6 @@ public class OxmPackage extends EPackageImpl
// Create data types
ePropOrderEDataType = createEDataType(EPROP_ORDER);
- eXmlSeeAlsoEDataType = createEDataType(EXML_SEE_ALSO);
}
/**
@@ -7320,7 +7353,7 @@ public class OxmPackage extends EPackageImpl
initEAttribute(getEAbstractTypeMapping_XmlTransient(), ecorePackage.getEBooleanObject(), "xmlTransient", null, 0, 1, EAbstractTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getEAbstractTypeMapping_XmlType(), this.getEXmlType(), null, "xmlType", null, 0, 1, EAbstractTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getEAbstractTypeMapping_XmlRootElement(), this.getEXmlRootElement(), null, "xmlRootElement", null, 0, 1, EAbstractTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEAbstractTypeMapping_XmlSeeAlso(), this.getEXmlSeeAlso(), "xmlSeeAlso", null, 0, 1, EAbstractTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getEAbstractTypeMapping_XmlSeeAlso(), this.getEXmlSeeAlso(), null, "xmlSeeAlso", null, 0, 1, EAbstractTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(eAbstractXmlNullPolicyEClass, EAbstractXmlNullPolicy.class, "EAbstractXmlNullPolicy", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getEAbstractXmlNullPolicy_XsiNilRepresentsNull(), ecorePackage.getEBoolean(), "xsiNilRepresentsNull", null, 0, 1, EAbstractXmlNullPolicy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -7539,6 +7572,9 @@ public class OxmPackage extends EPackageImpl
initEAttribute(getEXmlSchemaType_Namespace(), ecorePackage.getEString(), "namespace", null, 0, 1, EXmlSchemaType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getEXmlSchemaType_Type(), ecorePackage.getEString(), "type", null, 0, 1, EXmlSchemaType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(eXmlSeeAlsoEClass, EXmlSeeAlso.class, "EXmlSeeAlso", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEXmlSeeAlso_Classes(), ecorePackage.getEString(), "classes", null, 0, 1, EXmlSeeAlso.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
initEClass(eXmlTransformationEClass, EXmlTransformation.class, "EXmlTransformation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getEXmlTransformation_Optional(), ecorePackage.getEBoolean(), "optional", null, 0, 1, EXmlTransformation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getEXmlTransformation_XmlReadTransformer(), this.getEXmlReadTransformer(), null, "xmlReadTransformer", null, 0, 1, EXmlTransformation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -7593,7 +7629,6 @@ public class OxmPackage extends EPackageImpl
// Initialize data types
initEDataType(ePropOrderEDataType, List.class, "EPropOrder", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
- initEDataType(eXmlSeeAlsoEDataType, List.class, "EXmlSeeAlso", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
@@ -7618,13 +7653,6 @@ public class OxmPackage extends EPackageImpl
new String[]
{
"itemType", "http://www.eclipse.org/emf/2003/XMLType#string"
- });
- addAnnotation
- (eXmlSeeAlsoEDataType,
- source,
- new String[]
- {
- "itemType", "http://www.eclipse.org/emf/2003/XMLType#string"
});
}
@@ -7677,12 +7705,12 @@ public class OxmPackage extends EPackageImpl
public static final EReference EABSTRACT_TYPE_MAPPING__XML_ROOT_ELEMENT = eINSTANCE.getEAbstractTypeMapping_XmlRootElement();
/**
- * The meta object literal for the '<em><b>Xml See Also</b></em>' attribute feature.
+ * The meta object literal for the '<em><b>Xml See Also</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static final EAttribute EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO = eINSTANCE.getEAbstractTypeMapping_XmlSeeAlso();
+ public static final EReference EABSTRACT_TYPE_MAPPING__XML_SEE_ALSO = eINSTANCE.getEAbstractTypeMapping_XmlSeeAlso();
/**
* The meta object literal for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EAbstractXmlNullPolicy <em>EAbstract Xml Null Policy</em>}' class.
@@ -9427,14 +9455,22 @@ public class OxmPackage extends EPackageImpl
public static final EDataType EPROP_ORDER = eINSTANCE.getEPropOrder();
/**
- * The meta object literal for the '<em>EXml See Also</em>' data type.
+ * The meta object literal for the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso <em>EXml See Also</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see java.util.List
+ * @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlSeeAlso
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlSeeAlso()
* @generated
*/
- public static final EDataType EXML_SEE_ALSO = eINSTANCE.getEXmlSeeAlso();
+ public static final EClass EXML_SEE_ALSO = eINSTANCE.getEXmlSeeAlso();
+
+ /**
+ * The meta object literal for the '<em><b>Classes</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute EXML_SEE_ALSO__CLASSES = eINSTANCE.getEXmlSeeAlso_Classes();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/util/OxmValidator.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/util/OxmValidator.java
index 5fcc50da89..2f2b96ff69 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/util/OxmValidator.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/model/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/util/OxmValidator.java
@@ -186,6 +186,8 @@ public class OxmValidator extends EObjectValidator
return validateEXmlSchema((EXmlSchema)value, diagnostics, context);
case OxmPackage.EXML_SCHEMA_TYPE:
return validateEXmlSchemaType((EXmlSchemaType)value, diagnostics, context);
+ case OxmPackage.EXML_SEE_ALSO:
+ return validateEXmlSeeAlso((EXmlSeeAlso)value, diagnostics, context);
case OxmPackage.EXML_TRANSFORMATION:
return validateEXmlTransformation((EXmlTransformation)value, diagnostics, context);
case OxmPackage.EXML_TRANSIENT:
@@ -210,8 +212,6 @@ public class OxmValidator extends EObjectValidator
return validateEXmlVirtualAccessMethodsSchema((EXmlVirtualAccessMethodsSchema)value, diagnostics, context);
case OxmPackage.EPROP_ORDER:
return validateEPropOrder((List<?>)value, diagnostics, context);
- case OxmPackage.EXML_SEE_ALSO:
- return validateEXmlSeeAlso((List<?>)value, diagnostics, context);
default:
return true;
}
@@ -622,6 +622,16 @@ public class OxmValidator extends EObjectValidator
* <!-- end-user-doc -->
* @generated
*/
+ public boolean validateEXmlSeeAlso(EXmlSeeAlso eXmlSeeAlso, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ return validate_EveryDefaultConstraint((EObject)eXmlSeeAlso, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public boolean validateEXmlTransformation(EXmlTransformation eXmlTransformation, DiagnosticChain diagnostics, Map<Object, Object> context)
{
return validate_EveryDefaultConstraint((EObject)eXmlTransformation, diagnostics, context);
@@ -764,42 +774,6 @@ public class OxmValidator extends EObjectValidator
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean validateEXmlSeeAlso(List<?> eXmlSeeAlso, DiagnosticChain diagnostics, Map<Object, Object> context)
- {
- boolean result = validateEXmlSeeAlso_ItemType(eXmlSeeAlso, diagnostics, context);
- return result;
- }
-
- /**
- * Validates the ItemType constraint of '<em>EXml See Also</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean validateEXmlSeeAlso_ItemType(List<?> eXmlSeeAlso, DiagnosticChain diagnostics, Map<Object, Object> context)
- {
- boolean result = true;
- for (Iterator<?> i = eXmlSeeAlso.iterator(); i.hasNext() && (result || diagnostics != null); )
- {
- Object item = i.next();
- if (XMLTypePackage.Literals.STRING.isInstance(item))
- {
- result &= xmlTypeValidator.validateString((String)item, diagnostics, context);
- }
- else
- {
- result = false;
- reportDataValueTypeViolation(XMLTypePackage.Literals.STRING, item, diagnostics, context);
- }
- }
- return result;
- }
-
- /**
* Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->

Back to the top