Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2011-04-07 16:47:32 -0400
committerpfullbright2011-04-07 16:47:32 -0400
commit0b56012dbadaf5d0b1ae5a293e31640aafa97afc (patch)
treeabaec572a3fed21de7d1e68cde810d991b0f1fa0
parent0be654dbc8f794e27ba75df1b2860bc15e005937 (diff)
downloadwebtools.dali-0b56012dbadaf5d0b1ae5a293e31640aafa97afc.tar.gz
webtools.dali-0b56012dbadaf5d0b1ae5a293e31640aafa97afc.tar.xz
webtools.dali-0b56012dbadaf5d0b1ae5a293e31640aafa97afc.zip
added defaults for attribute/elementFormDefault
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlSchema.java56
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java96
-rw-r--r--jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/java/GenericJavaXmlSchemaTests.java70
3 files changed, 155 insertions, 67 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlSchema.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlSchema.java
index 6bf74005b9..60c10d28e6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlSchema.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlSchema.java
@@ -55,26 +55,54 @@ public interface XmlSchema
void setLocation(String location);
String LOCATION_PROPERTY = "location"; //$NON-NLS-1$
String DEFAULT_LOCATION = "##generate"; //$NON-NLS-1$
-
-
+
+
+ // **************** attribute form default ********************************
+
/**
- * Corresponds to the XmlSchema annotation 'attributeFormDefault' element
+ * Return the specified attribute form default or XmlNsForm.UNSET (default value)
*/
XmlNsForm getAttributeFormDefault();
- void setAttributeFormDefault(XmlNsForm newAttributeFormDefault);
- String ATTRIBUTE_FROM_DEFAULT_PROPERTY = "atributeFormDefault"; //$NON-NLS-1$
- XmlNsForm DEFAULT_ATTRIBUTE_FORM_DEFAULT = XmlNsForm.UNSET;
-
-
+
+ /**
+ * Return the specified attribute form default, null if it is not specified
+ */
+ XmlNsForm getSpecifiedAttributeFormDefault();
+
+ /**
+ * Set the attribute form default, null to unspecify
+ */
+ void setSpecifiedAttributeFormDefault(XmlNsForm attributeFormDefault);
+
+ /**
+ * String constant associated with changes to the specified attribute form default
+ */
+ String SPECIFIED_ATTRIBUTE_FORM_DEFAULT_PROPERTY = "attributeFormDefault"; //$NON-NLS-1$
+
+
+ // **************** element form default ********************************
+
/**
- * Corresponds to the XmlSchema annotation 'elementFormDefault' element
+ * Return the specified element form default or XmlNsForm.UNSET (default value)
*/
XmlNsForm getElementFormDefault();
- void setElementFormDefault(XmlNsForm newElementFormDefault);
- String ELEMENT_FROM_DEFAULT_PROPERTY = "elementFormDefault"; //$NON-NLS-1$
- XmlNsForm DEFAULT_ELEMENT_FORM_DEFAULT = XmlNsForm.UNSET;
-
-
+
+ /**
+ * Return the specified element form default, null if it is not specified
+ */
+ XmlNsForm getSpecifiedElementFormDefault();
+
+ /**
+ * Set the element form default, null to unspecify
+ */
+ void setSpecifiedElementFormDefault(XmlNsForm elementFormDefault);
+
+ /**
+ * String constant associated with changes to the specified attribute form default
+ */
+ String SPECIFIED_ELEMENT_FORM_DEFAULT_PROPERTY = "elementFormDefault"; //$NON-NLS-1$
+
+
// ********** xml namespace prefixes **********
ListIterable<XmlNs> getXmlNsPrefixes();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
index 61ea9e2b7f..e35032fe56 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
+import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
@@ -17,13 +18,20 @@ import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
import org.eclipse.jpt.jaxb.core.context.JaxbPackageInfo;
import org.eclipse.jpt.jaxb.core.context.XmlNs;
import org.eclipse.jpt.jaxb.core.context.XmlNsForm;
import org.eclipse.jpt.jaxb.core.context.XmlSchema;
+import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
+import org.eclipse.jpt.jaxb.core.internal.validation.JaxbValidationMessages;
import org.eclipse.jpt.jaxb.core.resource.java.JavaResourcePackage;
import org.eclipse.jpt.jaxb.core.resource.java.XmlNsAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlSchemaAnnotation;
+import org.eclipse.jpt.jaxb.core.xsd.XsdSchema;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.xsd.XSDForm;
public class GenericJavaXmlSchema
extends AbstractJavaContextNode
@@ -33,9 +41,9 @@ public class GenericJavaXmlSchema
protected String location;
- protected XmlNsForm attributeFormDefault;
+ protected XmlNsForm specifiedAttributeFormDefault;
- protected XmlNsForm elementFormDefault;
+ protected XmlNsForm specifiedElementFormDefault;
protected final XmlNsPrefixContainer xmlNsPrefixContainer;
@@ -44,8 +52,8 @@ public class GenericJavaXmlSchema
super(parent);
this.specifiedNamespace = this.getResourceNamespace();
this.location = this.getResourceLocation();
- this.attributeFormDefault = this.getResourceAttributeFormDefault();
- this.elementFormDefault = this.getResourceElementFormDefault();
+ this.specifiedAttributeFormDefault = getResourceAttributeFormDefault();
+ this.specifiedElementFormDefault = getResourceElementFormDefault();
this.xmlNsPrefixContainer = new XmlNsPrefixContainer();
}
@@ -57,8 +65,8 @@ public class GenericJavaXmlSchema
super.synchronizeWithResourceModel();
this.setSpecifiedNamespace_(this.getResourceNamespace());
this.setLocation_(this.getResourceLocation());
- this.setAttributeFormDefault_(this.getResourceAttributeFormDefault());
- this.setElementFormDefault_(this.getResourceElementFormDefault());
+ this.setSpecifiedAttributeFormDefault_(getResourceAttributeFormDefault());
+ this.setSpecifiedElementFormDefault_(getResourceElementFormDefault());
this.syncXmlNsPrefixes();
}
@@ -73,6 +81,10 @@ public class GenericJavaXmlSchema
return (JaxbPackageInfo) super.getParent();
}
+ public JaxbPackage getJaxbPackage() {
+ return getParent().getJaxbPackage();
+ }
+
protected JavaResourcePackage getResourcePackage() {
return getParent().getResourcePackage();
}
@@ -135,18 +147,22 @@ public class GenericJavaXmlSchema
// ********** attribute form default **********
public XmlNsForm getAttributeFormDefault() {
- return this.attributeFormDefault;
+ return (this.specifiedAttributeFormDefault == null) ? XmlNsForm.UNSET : this.specifiedAttributeFormDefault;
+ }
+
+ public XmlNsForm getSpecifiedAttributeFormDefault() {
+ return this.specifiedAttributeFormDefault;
}
- public void setAttributeFormDefault(XmlNsForm xmlNsForm) {
- this.getXmlSchemaAnnotation().setAttributeFormDefault(XmlNsForm.toJavaResourceModel(xmlNsForm));
- this.setAttributeFormDefault_(xmlNsForm);
+ public void setSpecifiedAttributeFormDefault(XmlNsForm attributeFormDefault) {
+ getXmlSchemaAnnotation().setAttributeFormDefault(XmlNsForm.toJavaResourceModel(attributeFormDefault));
+ setSpecifiedAttributeFormDefault_(attributeFormDefault);
}
- protected void setAttributeFormDefault_(XmlNsForm xmlNsForm) {
- XmlNsForm old = this.attributeFormDefault;
- this.attributeFormDefault = xmlNsForm;
- this.firePropertyChanged(ATTRIBUTE_FROM_DEFAULT_PROPERTY, old, xmlNsForm);
+ protected void setSpecifiedAttributeFormDefault_(XmlNsForm attributeFormDefault) {
+ XmlNsForm old = this.specifiedAttributeFormDefault;
+ this.specifiedAttributeFormDefault = attributeFormDefault;
+ firePropertyChanged(SPECIFIED_ATTRIBUTE_FORM_DEFAULT_PROPERTY, old, attributeFormDefault);
}
protected XmlNsForm getResourceAttributeFormDefault() {
@@ -157,18 +173,22 @@ public class GenericJavaXmlSchema
// ********** element form default **********
public XmlNsForm getElementFormDefault() {
- return this.elementFormDefault;
+ return (this.specifiedElementFormDefault == null) ? XmlNsForm.UNSET : this.specifiedElementFormDefault;
}
- public void setElementFormDefault(XmlNsForm xmlNsForm) {
- this.getXmlSchemaAnnotation().setElementFormDefault(XmlNsForm.toJavaResourceModel(xmlNsForm));
- this.setElementFormDefault_(xmlNsForm);
+ public XmlNsForm getSpecifiedElementFormDefault() {
+ return this.specifiedElementFormDefault;
}
- protected void setElementFormDefault_(XmlNsForm xmlNsForm) {
- XmlNsForm old = this.elementFormDefault;
- this.elementFormDefault = xmlNsForm;
- this.firePropertyChanged(ELEMENT_FROM_DEFAULT_PROPERTY, old, xmlNsForm);
+ public void setSpecifiedElementFormDefault(XmlNsForm elementFormDefault) {
+ getXmlSchemaAnnotation().setElementFormDefault(XmlNsForm.toJavaResourceModel(elementFormDefault));
+ setSpecifiedElementFormDefault_(elementFormDefault);
+ }
+
+ protected void setSpecifiedElementFormDefault_(XmlNsForm elementFormDefault) {
+ XmlNsForm old = this.specifiedElementFormDefault;
+ this.specifiedElementFormDefault = elementFormDefault;
+ firePropertyChanged(SPECIFIED_ELEMENT_FORM_DEFAULT_PROPERTY, old, elementFormDefault);
}
protected XmlNsForm getResourceElementFormDefault() {
@@ -258,6 +278,38 @@ public class GenericJavaXmlSchema
}
+
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+
+ XsdSchema schema = getJaxbPackage().getXsdSchema();
+ if (schema != null) {
+ if (formConflicts(getAttributeFormDefault(), schema.getXSDComponent().getAttributeFormDefault())) {
+ messages.add(
+ DefaultValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JaxbValidationMessages.XML_SCHEMA__MISMATCHED_ATTRIBUTE_FORM_DEFAULT,
+ this,
+ getXmlSchemaAnnotation().getAttributeFormDefaultTextRange(astRoot)));
+ }
+
+ if (formConflicts(getElementFormDefault(), schema.getXSDComponent().getElementFormDefault())) {
+ messages.add(
+ DefaultValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JaxbValidationMessages.XML_SCHEMA__MISMATCHED_ELEMENT_FORM_DEFAULT,
+ this,
+ getXmlSchemaAnnotation().getElementFormDefaultTextRange(astRoot)));
+ }
+ }
+ }
+
+ protected boolean formConflicts(XmlNsForm form, XSDForm xsdForm) {
+ return (form == XmlNsForm.QUALIFIED) ^ (xsdForm == XSDForm.QUALIFIED_LITERAL);
+ }
+
+
/**
* xml ns prefix container adapter
*/
diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/java/GenericJavaXmlSchemaTests.java b/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/java/GenericJavaXmlSchemaTests.java
index 2ab04d6a06..349cd95f60 100644
--- a/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/java/GenericJavaXmlSchemaTests.java
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/java/GenericJavaXmlSchemaTests.java
@@ -173,27 +173,28 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JaxbPackageInfo contextPackageInfo = CollectionTools.get(getContextRoot().getPackages(), 0).getPackageInfo();
XmlSchema contextXmlSchema = contextPackageInfo.getXmlSchema();
JavaResourcePackage resourcePackage = contextPackageInfo.getResourcePackage();
-
- assertNull(contextXmlSchema.getAttributeFormDefault());
- contextXmlSchema.setAttributeFormDefault(XmlNsForm.QUALIFIED);
+ assertNull(contextXmlSchema.getSpecifiedAttributeFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getAttributeFormDefault());
+
+ contextXmlSchema.setSpecifiedAttributeFormDefault(XmlNsForm.QUALIFIED);
XmlSchemaAnnotation schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.QUALIFIED, schemaAnnotation.getAttributeFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getAttributeFormDefault());
- contextXmlSchema.setAttributeFormDefault(XmlNsForm.UNQUALIFIED);
+ contextXmlSchema.setSpecifiedAttributeFormDefault(XmlNsForm.UNQUALIFIED);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.UNQUALIFIED, schemaAnnotation.getAttributeFormDefault());
assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getAttributeFormDefault());
//set another annotation so the context model is not blown away by removing the XmlSchema annotation
contextPackageInfo.setSpecifiedAccessType(XmlAccessType.FIELD);
- contextXmlSchema.setAttributeFormDefault(null);
+ contextXmlSchema.setSpecifiedAttributeFormDefault(null);
schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertNull(schemaAnnotation.getAttributeFormDefault());
- assertNull(contextXmlSchema.getAttributeFormDefault());
-
+ assertNull(contextXmlSchema.getSpecifiedAttributeFormDefault());
+
//set attribute form default again, this time starting with no XmlSchema annotation
- contextXmlSchema.setAttributeFormDefault(XmlNsForm.QUALIFIED);
+ contextXmlSchema.setSpecifiedAttributeFormDefault(XmlNsForm.QUALIFIED);
schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.QUALIFIED, schemaAnnotation.getAttributeFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getAttributeFormDefault());
@@ -204,8 +205,9 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JaxbPackageInfo contextPackageInfo = CollectionTools.get(getContextRoot().getPackages(), 0).getPackageInfo();
XmlSchema contextXmlSchema = contextPackageInfo.getXmlSchema();
JavaResourcePackage resourcePackage = contextPackageInfo.getResourcePackage();
-
- assertNull(contextXmlSchema.getAttributeFormDefault());
+
+ assertNull(contextXmlSchema.getSpecifiedAttributeFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getAttributeFormDefault());
//set the attribute form default value to QUALIFIED
AnnotatedElement annotatedElement = this.annotatedElement(resourcePackage);
@@ -217,9 +219,9 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JAXB.XML_NS_FORM__QUALIFIED);
}
});
-
+
+ assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getSpecifiedAttributeFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getAttributeFormDefault());
-
//set the attribute form default value to UNQUALIFIED
annotatedElement.edit(new Member.Editor() {
@@ -231,16 +233,18 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
}
});
+ assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getSpecifiedAttributeFormDefault());
assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getAttributeFormDefault());
-
+
annotatedElement.edit(new Member.Editor() {
public void edit(ModifiedDeclaration declaration) {
GenericJavaXmlSchemaTests.this.removeXmlSchemaAnnotation(declaration);
}
});
-
+
contextXmlSchema = contextPackageInfo.getXmlSchema();
- assertNull(contextXmlSchema.getAttributeFormDefault());
+ assertNull(contextXmlSchema.getSpecifiedAttributeFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getAttributeFormDefault());
}
public void testModifyElementFormDefault() throws Exception {
@@ -248,27 +252,28 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JaxbPackageInfo contextPackageInfo = CollectionTools.get(getContextRoot().getPackages(), 0).getPackageInfo();
XmlSchema contextXmlSchema = contextPackageInfo.getXmlSchema();
JavaResourcePackage resourcePackage = contextPackageInfo.getResourcePackage();
-
- assertNull(contextXmlSchema.getElementFormDefault());
- contextXmlSchema.setElementFormDefault(XmlNsForm.QUALIFIED);
+ assertNull(contextXmlSchema.getSpecifiedElementFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getElementFormDefault());
+
+ contextXmlSchema.setSpecifiedElementFormDefault(XmlNsForm.QUALIFIED);
XmlSchemaAnnotation schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.QUALIFIED, schemaAnnotation.getElementFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getElementFormDefault());
- contextXmlSchema.setElementFormDefault(XmlNsForm.UNQUALIFIED);
+ contextXmlSchema.setSpecifiedElementFormDefault(XmlNsForm.UNQUALIFIED);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.UNQUALIFIED, schemaAnnotation.getElementFormDefault());
assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getElementFormDefault());
//set another annotation so the context model is not blown away by removing the XmlSchema annotation
contextPackageInfo.setSpecifiedAccessType(XmlAccessType.FIELD);
- contextXmlSchema.setElementFormDefault(null);
+ contextXmlSchema.setSpecifiedElementFormDefault(null);
schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertNull(schemaAnnotation.getElementFormDefault());
- assertNull(contextXmlSchema.getElementFormDefault());
-
+ assertNull(contextXmlSchema.getSpecifiedElementFormDefault());
+
//set element form default again, this time starting with no XmlSchema annotation
- contextXmlSchema.setElementFormDefault(XmlNsForm.QUALIFIED);
+ contextXmlSchema.setSpecifiedElementFormDefault(XmlNsForm.QUALIFIED);
schemaAnnotation = (XmlSchemaAnnotation) resourcePackage.getAnnotation(XmlSchemaAnnotation.ANNOTATION_NAME);
assertEquals(org.eclipse.jpt.jaxb.core.resource.java.XmlNsForm.QUALIFIED, schemaAnnotation.getElementFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getElementFormDefault());
@@ -280,7 +285,8 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
XmlSchema contextXmlSchema = contextPackageInfo.getXmlSchema();
JavaResourcePackage resourcePackage = contextPackageInfo.getResourcePackage();
- assertNull(contextXmlSchema.getElementFormDefault());
+ assertNull(contextXmlSchema.getSpecifiedElementFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getElementFormDefault());
//set the element form default value to QUALIFIED
AnnotatedElement annotatedElement = this.annotatedElement(resourcePackage);
@@ -292,9 +298,9 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JAXB.XML_NS_FORM__QUALIFIED);
}
});
-
+
+ assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getSpecifiedElementFormDefault());
assertEquals(XmlNsForm.QUALIFIED, contextXmlSchema.getElementFormDefault());
-
//set the element form default value to UNQUALIFIED
annotatedElement.edit(new Member.Editor() {
@@ -305,19 +311,21 @@ public class GenericJavaXmlSchemaTests extends JaxbContextModelTestCase
JAXB.XML_NS_FORM__UNQUALIFIED);
}
});
-
+
+ assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getSpecifiedElementFormDefault());
assertEquals(XmlNsForm.UNQUALIFIED, contextXmlSchema.getElementFormDefault());
-
+
annotatedElement.edit(new Member.Editor() {
public void edit(ModifiedDeclaration declaration) {
GenericJavaXmlSchemaTests.this.removeXmlSchemaAnnotation(declaration);
}
});
-
+
contextXmlSchema = contextPackageInfo.getXmlSchema();
- assertNull(contextXmlSchema.getElementFormDefault());
+ assertNull(contextXmlSchema.getSpecifiedElementFormDefault());
+ assertEquals(XmlNsForm.UNSET, contextXmlSchema.getElementFormDefault());
}
-
+
public void testGetXmlNsPrefixes() throws Exception {
this.createPackageInfoWithXmlSchema();
JaxbPackageInfo contextPackageInfo = CollectionTools.get(getContextRoot().getPackages(), 0).getPackageInfo();

Back to the top