Public Member Functions | |
int | getConstructorArgumentIndex () |
String | getNameSpacePrefix () |
String | getNameSpaceURI () |
NodeType | getNodeType () |
String | getProperty (String propertyName) |
FieldValidator | getValidator () |
String | getXMLName () |
String | getLocationPath () |
String | getSchemaType () |
boolean | isConstructorArgument () |
boolean | isIncremental () |
boolean | isMultivalued () |
boolean | isMapped () |
boolean | isNillable () |
boolean | isReference () |
boolean | isContainer () |
boolean | matches (String xmlName) |
boolean | matches (String xmlName, String namespace) |
Static Public Attributes | |
static final String | PROPERTY_XML_SPACE = "xml:space" |
static final String | PROPERTY_XML_LANG = "xml:lang" |
XML field descriptor. Wraps FieldDescriptor and adds XML-related information, type conversion, etc.
int org.exolab.castor.xml.XMLFieldDescriptor.getConstructorArgumentIndex | ( | ) |
Returns the index within the constructor argument array where the value of this field should be. A value less than zero indicates that the value of this field is set via a normal setter method and not via the constructor.
Note: This only applies to attribute mapped fields at this time.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
String org.exolab.castor.xml.XMLFieldDescriptor.getLocationPath | ( | ) |
Returns the "relative" XML path for the field being described.
In most cases, this will be null. However sometimes a field may be mapped to a nested element. In which case the value returned by this method should be the nested element name. If more than one level of nesting is needed each nested element name should be separated by by a path separator (forward slash '/').
The location path name is "relative" to the parent Class. The name of the parent should not be included in the path.
For example, give the following two classes:
class Root { Bar bar; }
class Bar { String value; }
And the following XML:
<root> <foo> <bar> value of bar </bar> </foo> </root>
Since foo has no associated class, the path for 'bar' would be: "foo"
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.MarshalFramework.hasFieldsAtLocation().
String org.exolab.castor.xml.XMLFieldDescriptor.getNameSpacePrefix | ( | ) |
Return the "suggested" namespace prefix to use when marshalling as XML.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
String org.exolab.castor.xml.XMLFieldDescriptor.getNameSpaceURI | ( | ) |
Returns the namespace URI to be used when marshalling and unmarshalling as XML.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
NodeType org.exolab.castor.xml.XMLFieldDescriptor.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.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.canAccept(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.removeFieldDescriptor(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.sortDescriptors(), and org.exolab.castor.xml.Validator.validate().
String org.exolab.castor.xml.XMLFieldDescriptor.getProperty | ( | String | propertyName | ) |
Returns the value property with the given name or null if no such property exists. This method is useful for future evolutions of this interface as well as for user-defined extensions. See class declared properties for built-in properties.
propertyName | the name of the property whose value should be returned. |
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
String org.exolab.castor.xml.XMLFieldDescriptor.getSchemaType | ( | ) |
Returns the XML Schema type of the XML field being described.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().
FieldValidator org.exolab.castor.xml.XMLFieldDescriptor.getValidator | ( | ) |
Returns a specific validator for the field described by this descriptor. A null value may be returned if no specific validator exists.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.canAccept(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(), and org.exolab.castor.xml.Validator.validate().
String org.exolab.castor.xml.XMLFieldDescriptor.getXMLName | ( | ) |
Returns the XML Name for the field being described.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.getFieldDescriptor(), org.exolab.castor.xml.MarshalFramework.searchInheritance(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(), org.exolab.castor.xml.Validator.validate(), and org.exolab.castor.xml.FieldValidator.validate().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isConstructorArgument | ( | ) |
Returns true if the value of the field represented by this descriptor should be set via the constructor of the containing class. This is only valid for attribute mapped fields.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
boolean org.exolab.castor.xml.XMLFieldDescriptor.isContainer | ( | ) |
Returns true if the field described by this descriptor is a container field. A container is a field that is not a first-class object, and should therefore have no XML representation.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.canAccept(), org.exolab.castor.xml.UnmarshalHandler.endElement(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.getFieldDescriptor(), org.exolab.castor.xml.util.XMLClassDescriptorImpl.removeFieldDescriptor(), and org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isIncremental | ( | ) |
Returns the incremental flag which when true indicates that this member may be safely added before the unmarshaller is finished unmarshalling it.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isMapped | ( | ) |
Returns true if the field described by this descriptor is Map or Hashtable. If this method returns true, it must also return true for any call to isMultivalued.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isMultivalued | ( | ) |
Returns true if the field described by this descriptor can contain more than one value
Implements org.exolab.castor.mapping.FieldDescriptor.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.canAccept(), org.exolab.castor.xml.UnmarshalHandler.endElement(), and org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isNillable | ( | ) |
Returns true if the field described by this descriptor may be nillable. A nillable field is one that may have empty content and still be valid. Please see the XML Schema 1.0 Recommendation for more information on nillable.
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.FieldValidator.validate().
boolean org.exolab.castor.xml.XMLFieldDescriptor.isReference | ( | ) |
Returns true if the field described by this descriptor is a reference (ie. IDREF) to another object in the "Object Model" (XML tree)
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement(), and org.exolab.castor.xml.FieldValidator.validate().
boolean org.exolab.castor.xml.XMLFieldDescriptor.matches | ( | String | xmlName, | |
String | namespace | |||
) |
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.
xmlName | the XML name to compare | |
namespace | the namespace URI |
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
boolean org.exolab.castor.xml.XMLFieldDescriptor.matches | ( | 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.
xmlName | the XML name to compare |
Implemented in org.exolab.castor.xml.util.XMLFieldDescriptorImpl.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.getFieldDescriptor(), org.exolab.castor.xml.descriptors.VectorClassDescriptor.getFieldDescriptor(), and org.exolab.castor.xml.descriptors.ListClassDescriptor.getFieldDescriptor().
final String org.exolab.castor.xml.XMLFieldDescriptor.PROPERTY_XML_LANG = "xml:lang" [static] |
The xml:lang property
final String org.exolab.castor.xml.XMLFieldDescriptor.PROPERTY_XML_SPACE = "xml:space" [static] |
The xml:space property