org.exolab.castor.xml
Interface XMLClassDescriptor
- ClassDescriptor
- BaseDescriptor, BindingDescriptor, BindingTypeDescriptor, BindXmlAutoNamingTypeDescriptor, BindXmlDescriptor, BindXmlNodeTypeDescriptor, CacheTypeMappingDescriptor, CenturyDescriptor, ClassChoiceDescriptor, ClassMappingAccessTypeDescriptor, ClassMappingDescriptor, ClassTypeDescriptor, ComponentBindingTypeChoiceDescriptor, ComponentBindingTypeDescriptor, ContainerDescriptor, DatabaseChoiceDescriptor, DatabaseDescriptor, DataSourceDescriptor, DateClassDescriptor, DateDescriptor, DriverDescriptor, DurationDescriptor, EnumerationDescriptor, FieldMappingCollectionTypeDescriptor, FieldMappingDescriptor, FieldTypeCollectionTypeDescriptor, FieldTypeDescriptor, GDayDescriptor, GMonthDayDescriptor, GMonthDescriptor, GYearDescriptor, GYearMonthDescriptor, IncludeDescriptor, IncludeTypeDescriptor, InterfaceDescriptor, IntrospectedXMLClassDescriptor, JdoConfDescriptor, JndiDescriptor, KeyGeneratorDefDescriptor, LdapDescriptor, ListClassDescriptor, LocaleDescriptor, MappingDescriptor, MappingRootDescriptor, MapToDescriptor, MarshalFramework.InternalXMLClassDescriptor, MonthDescriptor, NamedQueryDescriptor, NamingTypeDescriptor, NamingXMLTypeDescriptor, PackageTypeChoiceDescriptor, PackageTypeDescriptor, ParamDescriptor, ParamDescriptor, PathTypeDescriptor, PrimitivesClassDescriptor, PropertyDescriptor, PropertyTypeDescriptor, QueryHintDescriptor, RecurringDurationDescriptor, RootArrayDescriptor, SqlDescriptor, SqlDirtyTypeDescriptor, SQLDateClassDescriptor, SQLTimeClassDescriptor, SQLTimestampClassDescriptor, StringClassDescriptor, TimeDescriptor, TimeDurationDescriptor, TimePeriodDescriptor, TransactionDemarcationDescriptor, TransactionManagerDescriptor, VectorClassDescriptor, XMLClassDescriptorAdapter, XMLClassDescriptorImpl, YearDescriptor
public interface XMLClassDescriptor
A class descriptor for describing relationships between a Class
and an XML element or complexType. This class implements
org.exolab.castor.mapping.ClassDescriptor, yet adds
extra methods for handling XML.
All fields are of type
XMLFieldDescriptor
.
$Revision: 6216 $ $Date: 2004-12-16 22:42:04 -0700 (Thu, 16 Dec 2004) $
canAccept
public boolean canAccept(String name,
String namespace,
Object object)
Returns true if the given object, represented by this
XMLClassDescriptor, can accept a value for the member
associated with the given xml name and namespace.
An XMLClassDescriptor can accept a value for a field if it
contains a descriptor that matches the given xml name and
namespace and if the given object can hold this field
(i.e a value is not already set for this field).
name
- the xml name of the field to checknamespace
- the namespace uriobject
- the object instance represented by this XMLCLassDescriptor
- true if the given object represented by this XMLClassDescriptor
can accept a member whose name is given.
getAttributeDescriptors
public XMLFieldDescriptor[] getAttributeDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML attributes. This
includes namespace nodes.
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML attributes.
getContentDescriptor
public XMLFieldDescriptor getContentDescriptor()
Returns the XMLFieldDescriptor for the member
that should be marshalled as text content.
- the XMLFieldDescriptor for the member
that should be marshalled as text content.
getElementDescriptors
public XMLFieldDescriptor[] getElementDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
getFieldDescriptor
public XMLFieldDescriptor getFieldDescriptor(String name,
String namespace,
NodeType nodeType)
Returns the XML field descriptor matching the given xml name, namespace, and
nodeType. If NodeType is null, then either an AttributeDescriptor, or
ElementDescriptor may be returned. Null is returned if no matching descriptor is
available.
name
- The xml name to match against.nodeType
- The NodeType to match against, or null if the node type is not
known.
- The matching descriptor, or null if no matching descriptor is available.
getNameSpacePrefix
public String getNameSpacePrefix()
Returns the namespace prefix to use when marshalling as XML.
- the namespace prefix to use when marshalling as XML.
getNameSpaceURI
public String getNameSpaceURI()
Returns the namespace URI used when marshalling and unmarshalling as XML.
- the namespace URI used when marshalling and unmarshalling as XML.
getValidator
public TypeValidator getValidator()
Returns a specific validator for the class described by
this ClassDescriptor. A null value may be returned
if no specific validator exists.
- the type validator for the class described by this
ClassDescriptor.
getXMLName
public String getXMLName()
Returns the XML Name for the Class being described.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com