org.exolab.castor.xml
abstract class MarshalFramework extends Object
Version: $Revision: 6230 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
Nested Class Summary | |
---|---|
static class | MarshalFramework.InheritanceMatch
Used to store the information when we find a possible inheritance. |
class | MarshalFramework.InternalXMLClassDescriptor
An internal implementation of XMLClassDescriptor used by
the Unmarshaller and Marshaller... |
Field Summary | |
---|---|
static String | INTERNAL_XML_NAME |
static String | JAVA_PREFIX
The default prefix used for specifying the
xsi:type as a classname instead of a schema name.
|
static String | LANG_ATTR
The xml:lang attribute, without the "xml:" prefix. |
static String | NIL_ATTR
The xsi:nil attribute, without the "xsi:" prefix. |
static XMLFieldDescriptor[] | NO_FIELD_DESCRIPTORS
An empty array of field descriptors |
static String | QNAME_NAME
The name of the QName type |
static String | SPACE_ATTR
The xml:space attribute name, without the "xml:" prefix |
static String | TRUE_VALUE
The value of 'true' |
static String | TYPE_ATTR
The xsi:type attribute name, without the "xsi:" prefix |
static String | XML_LANG_ATTR
The xml:lang attribute name |
static String | XML_SPACE_ATTR
The xml:space attribute name |
static String | XSI_NAMESPACE
The XSI Namespace URI
|
static String | XSI_NIL_ATTR |
static String | XSI_NO_NAMESPACE_SCHEMA_LOCATION
The name of the no namespace schema location attribute
|
static String | XSI_SCHEMA_LOCATION
The name of the Schema location attribute
|
Method Summary | |
---|---|
CollectionHandler | getCollectionHandler(Class clazz)
Returns the CollectionHandler associated with the
given collection, or null if no such handler exists.
|
static boolean | hasFieldsAtLocation(String location, XMLClassDescriptor classDesc)
Returns true if any of the fields associated with the given
XMLClassDescriptor are located at, or beneath, the given location.
|
static boolean | isCollection(Class clazz)
Returns true if the given Class is a considered a
collection by the marshalling framework.
|
static boolean | isPrimitive(Class type)
Returns true if the given class should be treated as a primitive
type. |
static boolean | namespaceEquals(String ns1, String ns2)
Compares the given namespaces (as strings) for equality.
null and empty values are considered equal.
|
static boolean | primitiveOrWrapperEquals(Class a, Class b)
Returns true if the given classes are both the same
primitive or primitive wrapper class. |
static MarshalFramework.InheritanceMatch[] | searchInheritance(String name, String namespace, XMLClassDescriptor classDesc, XMLClassDescriptorResolver cdResolver)
Search there is a field descriptor which can accept one of the class
descriptor which match the given name and namespace.
|
Returns: the CollectionHandler for the associated type.
Parameters: location the location to compare against classDesc the XMLClassDescriptor in which to check the field locations
Returns: true if the given Class is considered a collection.
Returns: true if the given class should be treated as a primitive type
Parameters: ns1 the namespace to compare to argument ns2 ns2 the namespace to compare to argument ns1
Returns: true if both a and b are considered equal
Returns: An array of InheritanceMatch.