Marshaller, UnmarshalHandlerabstract class MarshalFramework
extends java.lang.Object
| Modifier and Type | Class | Description | 
|---|---|---|
static class  | 
MarshalFramework.InheritanceMatch | 
 Used to store the information when we find a possible inheritance. 
 | 
(package private) class  | 
MarshalFramework.InternalXMLClassDescriptor | 
 An internal implementation of XMLClassDescriptor used by
 the Unmarshaller and Marshaller... 
 | 
| Modifier and Type | Field | Description | 
|---|---|---|
(package private) static java.lang.String | 
INTERNAL_XML_NAME | 
 A constant to indicate a wrong name without setting null. 
 | 
(package private) static java.lang.String | 
JAVA_PREFIX | 
 The default prefix used for specifying the
 xsi:type as a classname instead of a schema name. 
 | 
static java.lang.String | 
LANG_ATTR | 
 The xml:lang attribute, without the "xml:" prefix. 
 | 
static java.lang.String | 
NIL_ATTR | 
 The xsi:nil attribute, without the "xsi:" prefix. 
 | 
(package private) static XMLFieldDescriptor[] | 
NO_FIELD_DESCRIPTORS | 
 An empty array of field descriptors. 
 | 
(package private) static java.lang.String | 
QNAME_NAME | 
 The name of the QName type. 
 | 
static java.lang.String | 
SPACE_ATTR | 
 The xml:space attribute name, without the "xml:" prefix. 
 | 
static java.lang.String | 
TRUE_VALUE | 
 The value of 'true'. 
 | 
static java.lang.String | 
TYPE_ATTR | 
 The xsi:type attribute name, without the "xsi:" prefix. 
 | 
static java.lang.String | 
XML_LANG_ATTR | 
 The xml:lang attribute name. 
 | 
static java.lang.String | 
XML_SPACE_ATTR | 
 The xml:space attribute name. 
 | 
static java.lang.String | 
XSI_NAMESPACE | 
 The XSI Namespace URI. 
 | 
static java.lang.String | 
XSI_NIL_ATTR | 
 The xsi:nil attribute. 
 | 
static java.lang.String | 
XSI_NO_NAMESPACE_SCHEMA_LOCATION | 
 The name of the no namespace schema location attribute. 
 | 
static java.lang.String | 
XSI_SCHEMA_LOCATION | 
 The name of the Schema location attribute. 
 | 
| Constructor | Description | 
|---|---|
MarshalFramework(InternalContext internalContext) | 
 We need some stuff initialized here. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
CollectionHandler | 
getCollectionHandler(java.lang.Class clazz) | 
 Returns the CollectionHandler associated with the
 given collection, or null if no such handler exists. 
 | 
InternalContext | 
getInternalContext() | 
 To get the  
AbstractInternalContext to use. | 
JavaNaming | 
getJavaNaming() | 
 To get the  
JavaNaming instance to be used. | 
(package private) static boolean | 
hasFieldsAtLocation(java.lang.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(java.lang.Class clazz) | 
 Returns true if the given Class is a considered a
 collection by the marshalling framework. 
 | 
(package private) static boolean | 
isEnum(java.lang.Class type) | 
 Returns true if the given class should be treated as an enum type. 
 | 
(package private) static boolean | 
isPrimitive(java.lang.Class type) | 
 Returns true if the given class should be treated as a primitive
 type. 
 | 
static boolean | 
namespaceEquals(java.lang.String ns1,
               java.lang.String ns2) | 
 Compares the given namespaces (as strings) for equality. 
 | 
(package private) static boolean | 
primitiveOrWrapperEquals(java.lang.Class a,
                        java.lang.Class b) | 
 Returns true if the given classes are both the same
 primitive or primitive wrapper class. 
 | 
protected MarshalFramework.InheritanceMatch[] | 
searchInheritance(java.lang.String name,
                 java.lang.String namespace,
                 XMLClassDescriptor classDesc) | 
 Search there is a field descriptor which can accept one of the class
 descriptor which match the given name and namespace. 
 | 
void | 
setInternalContext(InternalContext internalContext) | 
 To set the  
AbstractInternalContext to use. | 
public static final java.lang.String XSI_NAMESPACE
public static final java.lang.String XSI_SCHEMA_LOCATION
public static final java.lang.String XSI_NO_NAMESPACE_SCHEMA_LOCATION
public static final java.lang.String XML_LANG_ATTR
public static final java.lang.String LANG_ATTR
public static final java.lang.String NIL_ATTR
public static final java.lang.String XSI_NIL_ATTR
public static final java.lang.String XML_SPACE_ATTR
public static final java.lang.String SPACE_ATTR
public static final java.lang.String TYPE_ATTR
public static final java.lang.String TRUE_VALUE
static final java.lang.String INTERNAL_XML_NAME
static final java.lang.String JAVA_PREFIX
static final java.lang.String QNAME_NAME
static final XMLFieldDescriptor[] NO_FIELD_DESCRIPTORS
public MarshalFramework(InternalContext internalContext)
InternalContext, so either one is given or BackwardCompatibilityContext
 is instantiated! Mind that instantiating BackwardCompatibilityContext
 means to (re-)read configuration files.internalContext - either an InternalContext comes from outside
          or BackwardCompatibilityContext is instantiatedpublic JavaNaming getJavaNaming()
JavaNaming instance to be used.public InternalContext getInternalContext()
AbstractInternalContext to use.AbstractInternalContext to usepublic void setInternalContext(InternalContext internalContext)
AbstractInternalContext to use.internalContext - the AbstractInternalContext to usepublic static boolean isCollection(java.lang.Class clazz)
clazz - the Class to checkpublic CollectionHandler getCollectionHandler(java.lang.Class clazz)
clazz - the Class to checkstatic boolean isPrimitive(java.lang.Class type)
type - the Class to checkstatic boolean isEnum(java.lang.Class type)
type - the Class to checkstatic final boolean hasFieldsAtLocation(java.lang.String location,
                                         XMLClassDescriptor classDesc)
location - the location to compare againstclassDesc - the XMLClassDescriptor in which to check the field 
 locationspublic static boolean namespaceEquals(java.lang.String ns1,
                                      java.lang.String ns2)
ns1 - the namespace to compare to argument ns2ns2 - the namespace to compare to argument ns1static boolean primitiveOrWrapperEquals(java.lang.Class a,
                                        java.lang.Class b)
a - compare a with bb - compare a with bprotected MarshalFramework.InheritanceMatch[] searchInheritance(java.lang.String name, java.lang.String namespace, XMLClassDescriptor classDesc) throws MarshalException
name - XML name of the fieldnamespace - namespace of the fieldclassDesc - the class descriptor to match againstcdResolver - the class descriptor resolver to useMarshalException - if the resolver called fails fatallyIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com