public interface XMLFieldDescriptor extends FieldDescriptor
FieldDescriptor and adds XML-related information, type
conversion, and so on.| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_XML_LANG
The xml:lang property.
|
static String |
PROPERTY_XML_SPACE
The xml:space property.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
getLocationPath()
Returns the "relative" XML path for the field being described.
|
String |
getNameSpacePrefix()
Return the "suggested" namespace prefix to use when marshaling as XML.
|
String |
getNameSpaceURI()
Returns the namespace URI to be used when marshaling and unmarshaling as XML.
|
NodeType |
getNodeType()
Returns the node type of the field being described.
|
String |
getSchemaType()
Returns the XML Schema type of the XML field being described.
|
List<String> |
getSubstitutes()
Returns the possible substitution groups for this class.
|
FieldValidator |
getValidator()
Returns a specific validator for the field described by this descriptor.
|
String |
getXMLName()
Returns the XML Name for the field being described.
|
String |
getXMLProperty(String propertyName)
Returns the value property with the given name or null if no such property exists.
|
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(String xmlName)
Returns true if this descriptor can be used to handle elements or attributes with the given XML
name.
|
boolean |
matches(String xmlName,
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(List<String> substitutes)
Sets the possible substitution groups for this class.
|
getClassDescriptor, getContainingClassDescriptor, getFieldName, getFieldType, getHandler, isImmutable, isRequired, isTransient, setContainingClassDescriptorgetProperty, setPropertyaddNature, hasNaturestatic final String PROPERTY_XML_SPACE
static final String PROPERTY_XML_LANG
int getConstructorArgumentIndex()
Note: This only applies to attribute mapped fields at this time.
isConstructorArgument()boolean isConstructorArgument()
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 must 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"String getNameSpacePrefix()
String getNameSpaceURI()
NodeType getNodeType()
NodeType represents the type of
node that the field will be marshaled into XML as.NodeType of the Field being described.String getXMLProperty(String propertyName)
propertyName - the name of the property whose value should be returned.String getSchemaType()
FieldValidator getValidator()
String getXMLName()
boolean isContainer()
boolean isIncremental()
boolean isMapped()
isMultivalued().boolean isMultivalued()
isMultivalued in interface FieldDescriptorboolean isNillable()
boolean isReference()
boolean matches(String xmlName)
xmlName - the XML name to compareboolean matches(String xmlName, String namespace)
xmlName - the XML name to comparenamespace - the namespace URIList<String> getSubstitutes()
void setSubstitutes(List<String> substitutes)
substitutes - Possible substitution groups for this class.void setDerivedFromXSList(boolean derivedFromXSList)
XMLFieldDescriptorImpl is created as a result
of a derivedFromXSList - A boolean value, true or false.boolean isDerivedFromXSList()
XMLFieldDescriptorImpl is created as a
result of a derivedFromXSList - Trueif the field described by this XMLFieldDescriptorImpl is
created as a result of a String getComponentType()
XMLFieldDescriptor instance, if the field described
represents a collection of values.getSchemaType()Copyright © 2016. All rights reserved.