|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLFieldDescriptor
XML field descriptor. Wraps FieldDescriptor
and adds
XML-related information, type conversion, and so on.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_XML_LANG
The xml:lang property. |
static java.lang.String |
PROPERTY_XML_SPACE
The xml:space property. |
Method Summary | |
---|---|
int |
getConstructorArgumentIndex()
Returns the index within the constructor argument array where the value of this field should be. |
java.lang.String |
getLocationPath()
Returns the "relative" XML path for the field being described. |
java.lang.String |
getNameSpacePrefix()
Return the "suggested" namespace prefix to use when marshaling as XML. |
java.lang.String |
getNameSpaceURI()
Returns the namespace URI to be used when marshaling and unmarshaling as XML. |
NodeType |
getNodeType()
Returns the NodeType of the Field being described. |
java.lang.String |
getProperty(java.lang.String propertyName)
Returns the value property with the given name or null if no such property exists. |
java.lang.String |
getSchemaType()
Returns the XML Schema type of the XML field being described. |
java.util.List |
getSubstitutes()
Returns the possible substitution groups for this class. |
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 |
isConstructorArgument()
Returns true if the value of the field represented by this descriptor should be set via the constructor of the containing class. |
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 unmarshaler is finished unmarshaling it. |
boolean |
isMapped()
Returns true if the field described by this descriptor is Map or Hashtable. |
boolean |
isMultivalued()
Returns true if the field described by this descriptor can contain more than one value. |
boolean |
isNillable()
Returns true if the field described by this descriptor may be nillable. |
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. |
boolean |
matches(java.lang.String xmlName,
java.lang.String namespace)
Returns true if this descriptor can be used to handle elements or attributes with the given XML name. |
void |
setSubstitutes(java.util.List substitutes)
Sets the possible substitution groups for this class. |
Methods inherited from interface org.exolab.castor.mapping.FieldDescriptor |
---|
getClassDescriptor, getContainingClassDescriptor, getFieldName, getFieldType, getHandler, isImmutable, isRequired, isTransient, setContainingClassDescriptor |
Field Detail |
---|
static final java.lang.String PROPERTY_XML_SPACE
static final java.lang.String PROPERTY_XML_LANG
Method Detail |
---|
int getConstructorArgumentIndex()
Note: This only applies to attribute mapped fields at this time.
isConstructorArgument()
boolean isConstructorArgument()
java.lang.String getLocationPath()
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"
java.lang.String getNameSpacePrefix()
java.lang.String getNameSpaceURI()
NodeType getNodeType()
java.lang.String getProperty(java.lang.String propertyName)
propertyName
- the name of the property whose value should be
returned.
java.lang.String getSchemaType()
FieldValidator getValidator()
java.lang.String getXMLName()
boolean isContainer()
boolean isIncremental()
boolean isMapped()
isMultivalued()
.
boolean isMultivalued()
isMultivalued
in interface FieldDescriptor
boolean isNillable()
boolean isReference()
boolean matches(java.lang.String xmlName)
xmlName
- the XML name to compare
boolean matches(java.lang.String xmlName, java.lang.String namespace)
xmlName
- the XML name to comparenamespace
- the namespace URI
java.util.List getSubstitutes()
void setSubstitutes(java.util.List substitutes)
substitutes
- Possible substitution groups for this class.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |