public final class XmlSchemaUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addImportIfNeeded(org.apache.ws.commons.schema.XmlSchema schema,
QName qname)
For convenience, start from a qname, and add the import if it is non-null
and has a namespace.
|
static void |
addImportIfNeeded(org.apache.ws.commons.schema.XmlSchema schema,
String namespaceUri)
Assist in managing the required
|
static List<String> |
enumeratorValues(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
Retrieve the string values for an enumeration.
|
static org.apache.ws.commons.schema.XmlSchemaElement |
findElementByRefName(SchemaCollection xmlSchemaCollection,
QName name,
String referencingURI)
This copes with an observed phenomenon in the schema built by the
ReflectionServiceFactoryBean.
|
static QName |
getBaseType(org.apache.ws.commons.schema.XmlSchemaComplexType type) |
static List<org.apache.ws.commons.schema.XmlSchemaAttributeOrGroupRef> |
getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type) |
static List<org.apache.ws.commons.schema.XmlSchemaAnnotated> |
getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type,
SchemaCollection collection) |
static QName |
getElementQualifiedName(org.apache.ws.commons.schema.XmlSchemaElement element,
org.apache.ws.commons.schema.XmlSchema schema)
By convention, an element that is named in its schema's TNS can have a 'name' but
no QName.
|
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 |
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 |
isEumeration(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
Return true if a simple type is a straightforward XML Schema representation of an enumeration.
|
static boolean |
isParticleArray(org.apache.ws.commons.schema.XmlSchemaParticle particle) |
static boolean |
isParticleOptional(org.apache.ws.commons.schema.XmlSchemaParticle particle) |
static boolean |
schemaImportsNamespace(org.apache.ws.commons.schema.XmlSchema schema,
String namespaceUri)
Is there an import for a particular namespace in a schema?
|
static void |
setElementRefName(org.apache.ws.commons.schema.XmlSchemaElement element,
QName name)
Wrapper around XmlSchemaElement.setRefName that checks for inconsistency with
name and QName.
|
public static final String XSI_NIL
public static void setElementRefName(org.apache.ws.commons.schema.XmlSchemaElement element, QName name)
element
- name
- public static boolean isEumeration(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
type
- Simple type, possible an enumeration.public static List<String> enumeratorValues(org.apache.ws.commons.schema.XmlSchemaSimpleType type)
type
- public static boolean schemaImportsNamespace(org.apache.ws.commons.schema.XmlSchema schema, String namespaceUri)
schema
- namespaceUri
- public static void addImportIfNeeded(org.apache.ws.commons.schema.XmlSchema schema, String namespaceUri)
schema
- namespaceUri
- public static void addImportIfNeeded(org.apache.ws.commons.schema.XmlSchema schema, QName qname)
schema
- qname
- addImportIfNeeded(XmlSchema, String)
public static org.apache.ws.commons.schema.XmlSchemaElement findElementByRefName(SchemaCollection xmlSchemaCollection, QName name, String referencingURI)
name
- referencingURI
- public static QName getBaseType(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static List<org.apache.ws.commons.schema.XmlSchemaAttributeOrGroupRef> getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type)
public static List<org.apache.ws.commons.schema.XmlSchemaAnnotated> getContentAttributes(org.apache.ws.commons.schema.XmlSchemaComplexType type, SchemaCollection collection)
public static QName getElementQualifiedName(org.apache.ws.commons.schema.XmlSchemaElement element, org.apache.ws.commons.schema.XmlSchema schema)
element
- schema
- public static boolean isAttributeNameQualified(org.apache.ws.commons.schema.XmlSchemaAttribute attribute, org.apache.ws.commons.schema.XmlSchema schema)
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'.attributeSchema
- the schema for the element.public static boolean isElementNameQualified(org.apache.ws.commons.schema.XmlSchemaElement element, 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 isParticleArray(org.apache.ws.commons.schema.XmlSchemaParticle particle)
public static boolean isParticleOptional(org.apache.ws.commons.schema.XmlSchemaParticle particle)
Copyright © 2019 JBoss by Red Hat. All rights reserved.