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