|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.javascript.XmlSchemaUtils
public final class XmlSchemaUtils
There are a number of pitfalls in Commons Xml Schema. This class contains some utilities that avoid some of the problems and centralizes some repetitive tasks.
| Field Summary | |
|---|---|
static org.apache.ws.commons.schema.XmlSchemaForm |
QUALIFIED
|
static org.apache.ws.commons.schema.XmlSchemaForm |
UNQUALIFIED
|
static java.lang.String |
XSI_NIL
|
static java.lang.String |
XSI_NIL_WITH_PREFIX
|
static java.lang.String |
XSI_NS_ATTR
|
| Method Summary | |
|---|---|
static org.apache.ws.commons.schema.XmlSchemaElement |
findElementByRefName(org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection,
javax.xml.namespace.QName name,
java.lang.String referencingURI)
This copes with an observed phenomenon in the schema built by the ReflectionServiceFactoryBean. |
static javax.xml.namespace.QName |
getBaseType(org.apache.ws.commons.schema.XmlSchemaComplexType type)
|
static org.apache.ws.commons.schema.XmlSchemaObjectCollection |
getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type)
|
static java.util.List<org.apache.ws.commons.schema.XmlSchemaAnnotated> |
getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type,
org.apache.cxf.common.xmlschema.SchemaCollection collection)
|
static java.util.List<org.apache.ws.commons.schema.XmlSchemaObject> |
getContentElements(org.apache.ws.commons.schema.XmlSchemaComplexType type,
org.apache.cxf.common.xmlschema.SchemaCollection collection)
|
static org.apache.ws.commons.schema.XmlSchemaSequence |
getContentSequence(org.apache.ws.commons.schema.XmlSchemaComplexType type)
|
static org.apache.ws.commons.schema.XmlSchemaType |
getElementType(org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection,
java.lang.String referencingURI,
org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.ws.commons.schema.XmlSchemaType containingType)
Follow a chain of references from element to element until we can obtain a type. |
static org.apache.ws.commons.schema.XmlSchemaAnnotated |
getObjectAnnotated(org.apache.ws.commons.schema.XmlSchemaObject object,
javax.xml.namespace.QName contextName)
If the object is an attribute or an anyAttribute, return the 'Annotated'. |
static org.apache.ws.commons.schema.XmlSchemaParticle |
getObjectParticle(org.apache.ws.commons.schema.XmlSchemaObject object,
javax.xml.namespace.QName contextName)
If the object is an element or an any, return the particle. |
static org.apache.ws.commons.schema.XmlSchemaElement |
getReferredElement(org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection)
|
static org.apache.ws.commons.schema.XmlSchemaSequence |
getSequence(org.apache.ws.commons.schema.XmlSchemaComplexType type)
|
static boolean |
isAttributeNameQualified(org.apache.ws.commons.schema.XmlSchemaAttribute attribute,
org.apache.ws.commons.schema.XmlSchema schema)
|
static boolean |
isAttributeQualified(org.apache.ws.commons.schema.XmlSchemaAttribute attribute,
boolean global,
org.apache.ws.commons.schema.XmlSchema localSchema,
org.apache.ws.commons.schema.XmlSchema attributeSchema)
due to a bug, feature, or just plain oddity of JAXB, it isn't good enough to just check the form of an element and of its schema. |
static boolean |
isComplexType(org.apache.ws.commons.schema.XmlSchemaType type)
|
static boolean |
isElementNameQualified(org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.ws.commons.schema.XmlSchema schema)
|
static boolean |
isElementQualified(org.apache.ws.commons.schema.XmlSchemaElement element,
boolean global,
org.apache.ws.commons.schema.XmlSchema localSchema,
org.apache.ws.commons.schema.XmlSchema elementSchema)
due to a bug, feature, or just plain oddity of JAXB, it isn't good enough to just check the form of an element and of its schema. |
static boolean |
isParticleArray(org.apache.ws.commons.schema.XmlSchemaParticle particle)
|
static boolean |
isParticleOptional(org.apache.ws.commons.schema.XmlSchemaParticle particle)
|
static void |
unsupportedConstruct(java.lang.String messageKey,
java.lang.String what,
javax.xml.namespace.QName subjectName,
org.apache.ws.commons.schema.XmlSchemaObject subject)
|
static void |
unsupportedConstruct(java.lang.String messageKey,
org.apache.ws.commons.schema.XmlSchemaType subject)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.ws.commons.schema.XmlSchemaForm QUALIFIED
public static final org.apache.ws.commons.schema.XmlSchemaForm UNQUALIFIED
public static final java.lang.String XSI_NS_ATTR
public static final java.lang.String XSI_NIL_WITH_PREFIX
public static final java.lang.String XSI_NIL
| Method Detail |
|---|
public static void unsupportedConstruct(java.lang.String messageKey,
org.apache.ws.commons.schema.XmlSchemaType subject)
public static void unsupportedConstruct(java.lang.String messageKey,
java.lang.String what,
javax.xml.namespace.QName subjectName,
org.apache.ws.commons.schema.XmlSchemaObject subject)
public static javax.xml.namespace.QName getBaseType(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static org.apache.ws.commons.schema.XmlSchemaSequence getContentSequence(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static org.apache.ws.commons.schema.XmlSchemaObjectCollection getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static java.util.List<org.apache.ws.commons.schema.XmlSchemaObject> getContentElements(org.apache.ws.commons.schema.XmlSchemaComplexType type,
org.apache.cxf.common.xmlschema.SchemaCollection collection)
public static java.util.List<org.apache.ws.commons.schema.XmlSchemaAnnotated> getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type,
org.apache.cxf.common.xmlschema.SchemaCollection collection)
public static org.apache.ws.commons.schema.XmlSchemaSequence getSequence(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static org.apache.ws.commons.schema.XmlSchemaElement findElementByRefName(org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection,
javax.xml.namespace.QName name,
java.lang.String referencingURI)
name - referencingURI -
public static org.apache.ws.commons.schema.XmlSchemaType getElementType(org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection,
java.lang.String referencingURI,
org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.ws.commons.schema.XmlSchemaType containingType)
element -
public static boolean isComplexType(org.apache.ws.commons.schema.XmlSchemaType type)
public static boolean isElementNameQualified(org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.ws.commons.schema.XmlSchema schema)
public static boolean isAttributeNameQualified(org.apache.ws.commons.schema.XmlSchemaAttribute attribute,
org.apache.ws.commons.schema.XmlSchema schema)
public static boolean isElementQualified(org.apache.ws.commons.schema.XmlSchemaElement element,
boolean global,
org.apache.ws.commons.schema.XmlSchema localSchema,
org.apache.ws.commons.schema.XmlSchema elementSchema)
element - the element.global - if this element is a global element (complex type ref= to
it, or in a part)localSchema - the schema of the complex type containing the
reference, only used for the 'odd case'.elementSchema - the schema for the element.
public static boolean isAttributeQualified(org.apache.ws.commons.schema.XmlSchemaAttribute attribute,
boolean global,
org.apache.ws.commons.schema.XmlSchema localSchema,
org.apache.ws.commons.schema.XmlSchema attributeSchema)
attribute - the attributeglobal - if this element is a global element (complex type ref= to
it, or in a part)localSchema - the schema of the complex type containing the
reference, only used for the 'odd case'.elementSchema - the schema for the element.
public static org.apache.ws.commons.schema.XmlSchemaParticle getObjectParticle(org.apache.ws.commons.schema.XmlSchemaObject object,
javax.xml.namespace.QName contextName)
object -
public static org.apache.ws.commons.schema.XmlSchemaAnnotated getObjectAnnotated(org.apache.ws.commons.schema.XmlSchemaObject object,
javax.xml.namespace.QName contextName)
object -
public static boolean isParticleArray(org.apache.ws.commons.schema.XmlSchemaParticle particle)
public static boolean isParticleOptional(org.apache.ws.commons.schema.XmlSchemaParticle particle)
public static org.apache.ws.commons.schema.XmlSchemaElement getReferredElement(org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.cxf.common.xmlschema.SchemaCollection xmlSchemaCollection)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||