|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
.
Method Summary | |
---|---|
boolean |
canAccept(java.lang.String fieldName,
java.lang.Object object)
Returns true if the given object represented by this XMLClassDescriptor can accept a member whose name is given. |
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,
NodeType nodeType)
Returns the XML field descriptor matching the given xml name and nodeType. |
java.lang.String |
getNameSpacePrefix()
|
java.lang.String |
getNameSpaceURI()
|
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. |
Methods inherited from interface org.exolab.castor.mapping.ClassDescriptor |
---|
getAccessMode, getExtends, getFields, getIdentity, getJavaClass |
Method Detail |
---|
XMLFieldDescriptor[] getAttributeDescriptors()
XMLFieldDescriptor getContentDescriptor()
XMLFieldDescriptor getFieldDescriptor(java.lang.String name, NodeType nodeType)
name
- the xml name to match againstnodeType,
- the NodeType to match against, or null if
the node type is not known.
XMLFieldDescriptor[] getElementDescriptors()
java.lang.String getNameSpacePrefix()
java.lang.String getNameSpaceURI()
TypeValidator getValidator()
java.lang.String getXMLName()
boolean canAccept(java.lang.String fieldName, java.lang.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). Different reasons can change the acceptance criteria, this is the reason why each implementation of XMLClassDescriptor must define these reasons.
fieldName
- the name of the field to checkobject
- the object represented by this XMLCLassDescriptor
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |