Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Package Functions | Static Package Attributes

org.exolab.castor.xml.MarshalFramework Class Reference

Inheritance diagram for org.exolab.castor.xml.MarshalFramework:
org.exolab.castor.xml.Marshaller org.exolab.castor.xml.UnmarshalHandler

List of all members.

Classes

class  InheritanceMatch
class  InternalXMLClassDescriptor

Public Member Functions

CollectionHandler getCollectionHandler (Class clazz)

Static Public Member Functions

static boolean isCollection (Class clazz)
static boolean namespaceEquals (String ns1, String ns2)
static InheritanceMatch[] searchInheritance (String name, String namespace, XMLClassDescriptor classDesc, ClassDescriptorResolver cdResolver)

Static Public Attributes

static final String XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance"
static final String XSI_SCHEMA_LOCATION = "schemaLocation"
static final String XSI_NO_NAMESPACE_SCHEMA_LOCATION = "noNamespaceSchemaLocation"
static final String XML_LANG_ATTR = "xml:lang"
static final String LANG_ATTR = "lang"
static final String NIL_ATTR = "nil"
static final String XSI_NIL_ATTR = "xsi:nil"
static final String XML_SPACE_ATTR = "xml:space"
static final String SPACE_ATTR = "space"
static final String TYPE_ATTR = "type"
static final String TRUE_VALUE = "true"

Static Package Functions

static boolean isPrimitive (Class type)
static final boolean hasFieldsAtLocation (String location, XMLClassDescriptor classDesc)
static boolean primitiveOrWrapperEquals (Class a, Class b)

Static Package Attributes

static final String INTERNAL_XML_NAME = "-error-if-this-is-used-"
static final String JAVA_PREFIX = "java:"
static final String QNAME_NAME = "QName"
static final XMLFieldDescriptor[] NO_FIELD_DESCRIPTORS = new XMLFieldDescriptor[0]

Detailed Description

A core class for common code shared throughout the Marshalling Framework

Author:
Keith Visco
Version:
Revision:
1.11
Date:
2004/12/17 07:29:52

Member Function Documentation

CollectionHandler org.exolab.castor.xml.MarshalFramework.getCollectionHandler ( Class  clazz  ) 

Returns the CollectionHandler associated with the given collection, or null if no such handler exists.

Returns:
the CollectionHandler for the associated type.
static final boolean org.exolab.castor.xml.MarshalFramework.hasFieldsAtLocation ( String  location,
XMLClassDescriptor  classDesc 
) [static, package]

Returns true if any of the fields associated with the given XMLClassDescriptor are located at, or beneath, the given location.

Parameters:
location the location to compare against
classDesc the XMLClassDescriptor in which to check the field locations

References org.exolab.castor.xml.XMLClassDescriptor.getAttributeDescriptors(), org.exolab.castor.xml.XMLClassDescriptor.getContentDescriptor(), org.exolab.castor.xml.XMLClassDescriptor.getElementDescriptors(), and org.exolab.castor.xml.XMLFieldDescriptor.getLocationPath().

static boolean org.exolab.castor.xml.MarshalFramework.isCollection ( Class  clazz  )  [static]

Returns true if the given Class is a considered a collection by the marshalling framework.

Returns:
true if the given Class is considered a collection.
static boolean org.exolab.castor.xml.MarshalFramework.isPrimitive ( Class  type  )  [static, package]

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.

Returns:
true if the given class should be treated as a primitive type

Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement(), and org.exolab.castor.xml.MarshalFramework.primitiveOrWrapperEquals().

static boolean org.exolab.castor.xml.MarshalFramework.namespaceEquals ( String  ns1,
String  ns2 
) [static]

Compares the given namespaces (as strings) for equality. null and empty values are considered equal.

Parameters:
ns1 the namespace to compare to argument ns2
ns2 the namespace to compare to argument ns1
static boolean org.exolab.castor.xml.MarshalFramework.primitiveOrWrapperEquals ( Class  a,
Class  b 
) [static, package]

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.

Returns:
true if both a and b are considered equal

References org.exolab.castor.xml.MarshalFramework.isPrimitive().


Member Data Documentation

final String org.exolab.castor.xml.MarshalFramework.INTERNAL_XML_NAME = "-error-if-this-is-used-" [static, package]
final String org.exolab.castor.xml.MarshalFramework.JAVA_PREFIX = "java:" [static, package]

The default prefix used for specifying the xsi:type as a classname instead of a schema name. This is a Castor specific hack.

final String org.exolab.castor.xml.MarshalFramework.LANG_ATTR = "lang" [static]

The xml:lang attribute, without the "xml:" prefix.

final String org.exolab.castor.xml.MarshalFramework.NIL_ATTR = "nil" [static]

The xsi:nil attribute, without the "xsi:" prefix.

An empty array of field descriptors

final String org.exolab.castor.xml.MarshalFramework.QNAME_NAME = "QName" [static, package]

The name of the QName type

Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().

final String org.exolab.castor.xml.MarshalFramework.SPACE_ATTR = "space" [static]

The xml:space attribute name, without the "xml:" prefix

final String org.exolab.castor.xml.MarshalFramework.TRUE_VALUE = "true" [static]

The value of 'true'

final String org.exolab.castor.xml.MarshalFramework.TYPE_ATTR = "type" [static]

The xsi:type attribute name, without the "xsi:" prefix

final String org.exolab.castor.xml.MarshalFramework.XML_LANG_ATTR = "xml:lang" [static]

The xml:lang attribute name

final String org.exolab.castor.xml.MarshalFramework.XML_SPACE_ATTR = "xml:space" [static]

The xml:space attribute name

final String org.exolab.castor.xml.MarshalFramework.XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance" [static]
final String org.exolab.castor.xml.MarshalFramework.XSI_NIL_ATTR = "xsi:nil" [static]
final String org.exolab.castor.xml.MarshalFramework.XSI_NO_NAMESPACE_SCHEMA_LOCATION = "noNamespaceSchemaLocation" [static]

The name of the no namespace schema location attribute

Referenced by org.exolab.castor.xml.Marshaller.setNoNamespaceSchemaLocation().

final String org.exolab.castor.xml.MarshalFramework.XSI_SCHEMA_LOCATION = "schemaLocation" [static]

The name of the Schema location attribute

Referenced by org.exolab.castor.xml.Marshaller.setSchemaLocation().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties