org.exolab.castor.xml
Interface XMLClassDescriptor
- All Superinterfaces:
- ClassDescriptor
- All Known Implementing Classes:
- AutomaticNamingTypeDescriptor, BaseDescriptor, BindingDescriptor, BindingTypeDescriptor, BindXmlAutoNamingTypeDescriptor, BindXmlDescriptor, BindXmlNodeTypeDescriptor, BugFixDescriptor, CacheTypeMappingDescriptor, CallMethodDescriptor, CategoryTypeDescriptor, CenturyDescriptor, ClassChoiceDescriptor, ClassMappingAccessTypeDescriptor, ClassMappingDescriptor, ClassTypeDescriptor, CollectionTypeDescriptor, ComponentBindingTypeChoiceDescriptor, ComponentBindingTypeDescriptor, ConfigurationDescriptor, ConfigurationTypeDescriptor, ContainerDescriptor, ContentMemberTypeDescriptor, CustomTestDescriptor, CustomTestTypeDescriptor, DateClassDescriptor, DateDescriptor, DateTimeDescriptor, DurationDescriptor, EnumBindingTypeDescriptor, EnumClassNameDescriptor, EnumerationDescriptor, EnumMemberDescriptor, ExcludeDescriptor, ExcludesDescriptor, ExpectedSourcesDescriptor, FailureDescriptor, FailureStepTypeDescriptor, FailureTypeDescriptor, FieldMappingCollectionTypeDescriptor, FieldMappingDescriptor, FieldTypeCollectionTypeDescriptor, FieldTypeDescriptor, FieldTypeVisibilityTypeDescriptor, ForceDescriptor, ForcesDescriptor, GDayDescriptor, GMonthDayDescriptor, GMonthDescriptor, GYearDescriptor, GYearMonthDescriptor, IncludeDescriptor, IncludeTypeDescriptor, InterfaceDescriptor, IntrospectedXMLClassDescriptor, KeyGeneratorDefDescriptor, LdapDescriptor, ListClassDescriptor, ListenerDescriptor, ListenerTypeDescriptor, LocaleDescriptor, MappingRootDescriptor, MapToDescriptor, MarshalDescriptor, MarshalFramework.InternalXMLClassDescriptor, MarshallingTestDescriptor, MethodsDescriptor, MonthDescriptor, NamedQueryDescriptor, NamingTypeDescriptor, NamingXMLTypeDescriptor, OnlySourceGenerationTestDescriptor, PackageTypeChoiceDescriptor, PackageTypeDescriptor, ParamDescriptor, PrimitivesClassDescriptor, PropertyDescriptor, PropertyTypeDescriptor, QueryHintDescriptor, RecurringDurationDescriptor, Root_ObjectDescriptor, RootArrayDescriptor, RootTypeDescriptor, SchemaDifferencesDescriptor, SchemaDifferencesTypeDescriptor, SchemaTestDescriptor, SourceGeneratorTestDescriptor, SQLDateClassDescriptor, SqlDescriptor, SqlDirtyTypeDescriptor, SQLTimeClassDescriptor, SQLTimestampClassDescriptor, StringClassDescriptor, StringTypeDescriptor, TestDescriptorChoiceDescriptor, TestDescriptorDescriptor, TimeDescriptor, TimeDurationDescriptor, TimePeriodDescriptor, TypeTypeDescriptor, UnitTestCaseChoiceDescriptor, UnitTestCaseDescriptor, UnmarshalDescriptor, ValueDescriptor, VectorClassDescriptor, VisibilityTypeDescriptor, XMLClassDescriptorAdapter, XMLClassDescriptorImpl, YearDescriptor
public interface XMLClassDescriptor
- extends ClassDescriptor
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
.
- Version:
- $Revision: 6806 $ $Date: 2004-12-16 22:42:04 -0700 (Thu, 16 Dec 2004) $
- Author:
- Keith Visco
Method Summary |
boolean |
canAccept(java.lang.String name,
java.lang.String namespace,
java.lang.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. |
void |
checkDescriptorForCorrectOrderWithinSequence(XMLFieldDescriptor elementDescriptor,
UnmarshalState parentState,
java.lang.String xmlName)
Checks whether the given XMLFieldDescriptor is the one actually expected,
given the natural order as defined by a sequence definition |
XMLFieldDescriptor[] |
getAttributeDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML attributes. |
XMLFieldDescriptor |
getContentDescriptor()
Returns the XMLFieldDescriptor for the member
that should be marshalled as text content. |
XMLFieldDescriptor[] |
getElementDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML elements. |
XMLFieldDescriptor |
getFieldDescriptor(java.lang.String name,
java.lang.String namespace,
NodeType nodeType)
Returns the XML field descriptor matching the given xml name, namespace, and
nodeType. |
java.lang.String |
getNameSpacePrefix()
Returns the namespace prefix to use when marshalling as XML. |
java.lang.String |
getNameSpaceURI()
Returns the namespace URI used when marshalling and unmarshalling as XML. |
TypeValidator |
getValidator()
Returns a specific validator for the class described by
this ClassDescriptor. |
java.lang.String |
getXMLName()
Returns the XML Name for the Class being described. |
getAttributeDescriptors
XMLFieldDescriptor[] getAttributeDescriptors()
- Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML attributes. This
includes namespace nodes.
- Returns:
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML attributes.
getContentDescriptor
XMLFieldDescriptor getContentDescriptor()
- Returns the XMLFieldDescriptor for the member
that should be marshalled as text content.
- Returns:
- the XMLFieldDescriptor for the member
that should be marshalled as text content.
getElementDescriptors
XMLFieldDescriptor[] getElementDescriptors()
- Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
- Returns:
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
getFieldDescriptor
XMLFieldDescriptor getFieldDescriptor(java.lang.String name,
java.lang.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.
- Parameters:
name
- The xml name to match against.nodeType
- The NodeType to match against, or null if the node type is not
known.
- Returns:
- The matching descriptor, or null if no matching descriptor is available.
getNameSpacePrefix
java.lang.String getNameSpacePrefix()
- Returns the namespace prefix to use when marshalling as XML.
- Returns:
- the namespace prefix to use when marshalling as XML.
getNameSpaceURI
java.lang.String getNameSpaceURI()
- Returns the namespace URI used when marshalling and unmarshalling as XML.
- Returns:
- the namespace URI used when marshalling and unmarshalling as XML.
getValidator
TypeValidator getValidator()
- Returns a specific validator for the class described by
this ClassDescriptor. A null value may be returned
if no specific validator exists.
- Returns:
- the type validator for the class described by this
ClassDescriptor.
getXMLName
java.lang.String getXMLName()
- Returns the XML Name for the Class being described.
- Returns:
- the XML name.
canAccept
boolean canAccept(java.lang.String name,
java.lang.String namespace,
java.lang.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).
- Parameters:
name
- the xml name of the field to checknamespace
- the namespace uriobject
- the object instance represented by this XMLCLassDescriptor
- Returns:
- true if the given object represented by this XMLClassDescriptor
can accept a member whose name is given.
checkDescriptorForCorrectOrderWithinSequence
void checkDescriptorForCorrectOrderWithinSequence(XMLFieldDescriptor elementDescriptor,
UnmarshalState parentState,
java.lang.String xmlName)
throws ValidationException
- Checks whether the given XMLFieldDescriptor is the one actually expected,
given the natural order as defined by a sequence definition
- Parameters:
elementDescriptor
- The XML field descriptor to be checkedxmlName
- TODO
- Throws:
ValidationException
- If the descriptor is not the one expected
Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com