Home » Castor-1.3-src » org.exolab.castor » xml » [javadoc | source]
org.exolab.castor.xml
abstract class: MarshalFramework [javadoc | source]
java.lang.Object
   org.exolab.castor.xml.MarshalFramework

Direct Known Subclasses:
    Marshaller, UnmarshalHandler

A core class for common code shared throughout the Marshalling Framework
Nested Class Summary:
public static class  MarshalFramework.InheritanceMatch  Used to store the information when we find a possible inheritance. It store the XMLClassDescriptor of the object to instantiate and the XMLFieldDescriptor of the parent, where the instance of the XMLClassDescriptor will be put. 
class  MarshalFramework.InternalXMLClassDescriptor  An internal implementation of XMLClassDescriptor used by the Unmarshaller and Marshaller... 
Field Summary
public static final  String XSI_NAMESPACE    The XSI Namespace URI. 
public static final  String XSI_SCHEMA_LOCATION    The name of the Schema location attribute. 
public static final  String XSI_NO_NAMESPACE_SCHEMA_LOCATION    The name of the no namespace schema location attribute. 
public static final  String XML_LANG_ATTR    The xml:lang attribute name. 
public static final  String LANG_ATTR    The xml:lang attribute, without the "xml:" prefix. 
public static final  String NIL_ATTR    The xsi:nil attribute, without the "xsi:" prefix. 
public static final  String XSI_NIL_ATTR    The xsi:nil attribute. 
public static final  String XML_SPACE_ATTR    The xml:space attribute name. 
public static final  String SPACE_ATTR    The xml:space attribute name, without the "xml:" prefix. 
public static final  String TYPE_ATTR    The xsi:type attribute name, without the "xsi:" prefix. 
public static final  String TRUE_VALUE    The value of 'true'. 
static final  String INTERNAL_XML_NAME    A constant to indicate a wrong name without setting null. 
static final  String JAVA_PREFIX    The default prefix used for specifying the xsi:type as a classname instead of a schema name. This is a Castor specific hack. 
static final  String QNAME_NAME    The name of the QName type. 
static final  XMLFieldDescriptor[] NO_FIELD_DESCRIPTORS    An empty array of field descriptors. 
Constructor:
 public MarshalFramework(InternalContext internalContext) 
Method from org.exolab.castor.xml.MarshalFramework Summary:
getCollectionHandler,   getInternalContext,   getJavaNaming,   hasFieldsAtLocation,   isCollection,   isEnum,   isPrimitive,   namespaceEquals,   primitiveOrWrapperEquals,   searchInheritance,   setInternalContext
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.exolab.castor.xml.MarshalFramework Detail:
 public CollectionHandler getCollectionHandler(Class clazz) 
    Returns the CollectionHandler associated with the given collection, or null if no such handler exists.
 public InternalContext getInternalContext() 
 public JavaNaming getJavaNaming() 
 static final 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.
 public static boolean isCollection(Class clazz) 
    Returns true if the given Class is a considered a collection by the marshalling framework.
 static boolean isEnum(Class type) 
    Returns true if the given class should be treated as an enum type. This method will return true for all Java 5 (or later) enums, and for enum-style classes.
 static boolean isPrimitive(Class type) 
    Returns true if the given class should be treated as a primitive type. This method will return true for all Java primitive types, the set of primitive object wrappers, as well as Strings.
 public 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. For exmaple, if class "a" is an int (Integer.TYPE) and class "b" is either an int or Integer.class then true will be returned, otherwise false.
 protected InheritanceMatch[] searchInheritance(String name,
    String namespace,
    XMLClassDescriptor classDesc) throws MarshalException 
    Search there is a field descriptor which can accept one of the class descriptor which match the given name and namespace.
 public  void setInternalContext(InternalContext internalContext)