|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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 | |
java.lang.String |
getComponentType()
Returns the component type of this XMLFieldDescriptor instance, if
the field described represents a collection of values. |
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 |
isDerivedFromXSList()
Indicates whether the field described by this XMLFieldDescriptorImpl is
created as a result of a |
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 |
setDerivedFromXSList(boolean derivedFromXSList)
Sets whether the field described by this XMLFieldDescriptorImpl is
created as a result of a |
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 |
public static final java.lang.String PROPERTY_XML_SPACE
public static final java.lang.String PROPERTY_XML_LANG
| Method Detail |
public int getConstructorArgumentIndex()
Note: This only applies to attribute mapped fields at this time.
isConstructorArgument()public boolean isConstructorArgument()
public 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"
public java.lang.String getNameSpacePrefix()
public java.lang.String getNameSpaceURI()
public NodeType getNodeType()
public java.lang.String getProperty(java.lang.String propertyName)
propertyName - the name of the property whose value should be
returned.
public java.lang.String getSchemaType()
public FieldValidator getValidator()
public java.lang.String getXMLName()
public boolean isContainer()
public boolean isIncremental()
public boolean isMapped()
isMultivalued().
public boolean isMultivalued()
isMultivalued in interface FieldDescriptorpublic boolean isNillable()
public boolean isReference()
public boolean matches(java.lang.String xmlName)
xmlName - the XML name to compare
public boolean matches(java.lang.String xmlName,
java.lang.String namespace)
xmlName - the XML name to comparenamespace - the namespace URI
public java.util.List getSubstitutes()
public void setSubstitutes(java.util.List substitutes)
substitutes - Possible substitution groups for this class.public void setDerivedFromXSList(boolean derivedFromXSList)
XMLFieldDescriptorImpl is
created as a result of a
derivedFromXSList - A boolean value, true or false.public boolean isDerivedFromXSList()
XMLFieldDescriptorImpl is
created as a result of a
public java.lang.String getComponentType()
XMLFieldDescriptor instance, if
the field described represents a collection of values.
getSchemaType()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||