public class SchemaUtil
extends java.lang.Object
Constructor and Description |
---|
SchemaUtil() |
Modifier and Type | Method and Description |
---|---|
static SchemaItem |
findPropertyMapping(SchemaElementComplex def,
java.lang.String property)
Finds an apropiate definition for the given property, starting at the * given definition.
|
static SchemaElementComplex |
findRootElement(SchemaModel schema,
java.lang.String namespace,
java.lang.String elementName)
Returns the root element for a given schema given a root element name and namespace.
|
static java.lang.String |
serialize(org.w3c.dom.Node doc)
Serialize the given node.
|
static javax.xml.namespace.QName |
simpleTypeToQName(short type)
Returns the XPathConstants type for a given Xerces type definition.
|
static java.lang.Class |
toReturnType(javax.xml.namespace.QName resultType,
java.lang.Class optionalCastToType)
Returns the native type based on XPathConstants qname and an optional cast-to type, if provided.
|
static java.lang.Class |
toReturnType(SchemaItem item)
Returns the Class-type of the schema item.
|
static java.lang.Class |
toReturnType(short xsType,
java.lang.String typeName,
java.lang.Integer optionalFractionDigits)
Returns the type for a give short type and type name.
|
public static java.lang.Class toReturnType(SchemaItem item)
item
- to to determine type forpublic static java.lang.Class toReturnType(short xsType, java.lang.String typeName, java.lang.Integer optionalFractionDigits)
xsType
- XSSimplyType typetypeName
- type name in XML standardoptionalFractionDigits
- fraction digits if any are definedpublic static java.lang.Class toReturnType(javax.xml.namespace.QName resultType, java.lang.Class optionalCastToType)
resultType
- qnameoptionalCastToType
- null or cast-to typepublic static javax.xml.namespace.QName simpleTypeToQName(short type)
type
- is the typepublic static SchemaElementComplex findRootElement(SchemaModel schema, java.lang.String namespace, java.lang.String elementName)
schema
- is the schema to interrogatenamespace
- is the namespace of the root elementelementName
- is the name of the root elementpublic static SchemaItem findPropertyMapping(SchemaElementComplex def, java.lang.String property)
def
- the definition to start lookingproperty
- the property to look forpublic static java.lang.String serialize(org.w3c.dom.Node doc)
doc
- node to serialize