org.exolab.castor.xml
Interface XMLFieldDescriptor

All Superinterfaces:
FieldDescriptor
All Known Implementing Classes:
XMLFieldDescriptorImpl

public interface XMLFieldDescriptor
extends FieldDescriptor

XML field descriptor. Wraps FieldDescriptor and adds XML-related information, type conversion, etc.

Version:
$Revision: 1.7 $ $Date: 2001/08/15 16:07:25 $
Author:
Assaf Arkin, Keith Visco

Method Summary
 java.lang.String getNameSpacePrefix()
          Return the "suggested" namespace prefix to use when marshalling as XML.
 java.lang.String getNameSpaceURI()
          Returns the namespace URI to be used when marshalling and unmarshalling as XML.
 NodeType getNodeType()
          Returns the NodeType of the Field being described.
 java.lang.String getSchemaType()
          Returns the XML Schema type of the XML field being described.
 FieldValidator getValidator()
          Returns a specific validator for the field described by this descriptor.
 java.lang.String getXMLName()
          Returns the XML Name for the field being described.
 boolean isContainer()
          Returns true if the field described by this descriptor is a container field.
 boolean isIncremental()
          Returns the incremental flag which when true indicates that this member may be safely added before the unmarshaller is finished unmarshalling it.
 boolean isMultivalued()
          Returns true if the field described by this descriptor can contain more than one value
 boolean isReference()
          Returns true if the field described by this descriptor is a reference (ie.
 boolean matches(java.lang.String xmlName)
          Returns true if this descriptor can be used to handle elements or attributes with the given XML name.
 
Methods inherited from interface org.exolab.castor.mapping.FieldDescriptor
getClassDescriptor, getContainingClassDescriptor, getFieldName, getFieldType, getHandler, isImmutable, isRequired, isTransient, setContainingClassDescriptor
 

Method Detail

getNameSpacePrefix

public java.lang.String getNameSpacePrefix()
Return the "suggested" namespace prefix to use when marshalling as XML.

Returns:
the "suggested" namespace prefix.

getNameSpaceURI

public java.lang.String getNameSpaceURI()
Returns the namespace URI to be used when marshalling and unmarshalling as XML.

Returns:
the namespace URI.

getNodeType

public NodeType getNodeType()
Returns the NodeType of the Field being described. The NodeType represents the Type of Node that the Field will be marshalled into XML as.

Returns:
the NodeType of the Field being described.

getValidator

public FieldValidator getValidator()
Returns a specific validator for the field described by this descriptor. A null value may be returned if no specific validator exists.

Returns:
the field validator for the described field

getXMLName

public java.lang.String getXMLName()
Returns the XML Name for the field being described.

Returns:
the XML name.

getSchemaType

public java.lang.String getSchemaType()
Returns the XML Schema type of the XML field being described.


isIncremental

public boolean isIncremental()
Returns the incremental flag which when true indicates that this member may be safely added before the unmarshaller is finished unmarshalling it.

Returns:
true if the Object can safely be added before the unmarshaller is finished unmarshalling the Object.

isMultivalued

public boolean isMultivalued()
Returns true if the field described by this descriptor can contain more than one value

Specified by:
isMultivalued in interface FieldDescriptor
Returns:
true if the field described by this descriptor can contain more than one value

isReference

public boolean isReference()
Returns true if the field described by this descriptor is a reference (ie. IDREF) to another object in the "Object Model" (XML tree)


isContainer

public boolean isContainer()
Returns true if the field described by this descriptor is a container field.


matches

public boolean matches(java.lang.String xmlName)
Returns true if this descriptor can be used to handle elements or attributes with the given XML name. By default this method simply compares the given XML name with the internal XML name. This method can be overridden to provide more complex matching.

Parameters:
xmlName - the XML name to compare
Returns:
true if this descriptor can be used to handle elements or attributes with the given XML name.


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