org.exolab.castor.xml.descriptors

Class BaseDescriptor

Implemented Interfaces:
ClassDescriptor, XMLClassDescriptor
Known Direct Subclasses:
DateClassDescriptor, ListClassDescriptor, LocaleDescriptor, RootArrayDescriptor, SQLDateClassDescriptor, SQLTimeClassDescriptor, SQLTimestampClassDescriptor, StringClassDescriptor, VectorClassDescriptor

public abstract class BaseDescriptor
extends java.lang.Object
implements XMLClassDescriptor

Method Summary

boolean
canAccept(String name, String namespace, Object object)
Returns true if the given object represented by this XMLClassDescriptor can accept a member whose name is given.
void
checkDescriptorForCorrectOrderWithinSequence(XMLFieldDescriptor elementDescriptor, UnmarshalState parentState, String xmlName)
boolean
isChoice()

Method Details

canAccept

public boolean canAccept(String name,
                         String namespace,
                         Object object)
Returns true if the given object represented by this XMLClassDescriptor can accept a member whose name is given. An XMLClassDescriptor can accept a field if it contains a descriptor that matches the given name and if the given object can hold this field (i.e a value is not already set for this field).

This is mainly used for container object (that can contain other objects), in this particular case the implementation returns false.

Specified by:
canAccept in interface XMLClassDescriptor
Parameters:
name - the name of the field to check
namespace - the namespace of the element. This may be null. Note: A null namespace is not the same as the default namespace unless the default namespace is also null.
object - the object represented by this XMLCLassDescriptor
Returns:
true if the given object represented by this XMLClassDescriptor can accept a member whose name is given.

checkDescriptorForCorrectOrderWithinSequence

public void checkDescriptorForCorrectOrderWithinSequence(XMLFieldDescriptor elementDescriptor,
                                                         UnmarshalState parentState,
                                                         String xmlName)
            throws ValidationException
Specified by:
checkDescriptorForCorrectOrderWithinSequence in interface XMLClassDescriptor
See Also:
checkDescriptorForCorrectOrderWithinSequence(org.exolab.castor.xml.XMLFieldDescriptor, org.exolab.castor.xml.UnmarshalState, java.lang.String)

isChoice

public boolean isChoice()
Specified by:
isChoice in interface XMLClassDescriptor

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com