public class NodeDescriptor extends Object
Common superclass for ElementDescriptor
and AttributeDescriptor
.
Nodes can have just a local name or they can have a local name, qualified name and a namespace uri.
Modifier and Type | Field and Description |
---|---|
private String |
localName
The local name of this node without any namespace prefix
|
private String |
propertyName
The property expression to which this node refers to, or null if it is just a constant
|
private Class |
propertyType
the property type associated with this node, if any
|
private String |
qualifiedName
The qualified name of the xml node associated with this descriptor.
|
private Class |
singularPropertyType
the singular property type (i.e.
|
private Expression |
textExpression
the expression used to evaluate the text value of this node
|
private Updater |
updater
the updater used to update the current bean from the text value of this node
|
private String |
uri
The namespace URI of this node
|
Constructor and Description |
---|
NodeDescriptor()
Base constructor
|
NodeDescriptor(String localName)
Creates a NodeDescriptor with no namespace URI or prefix.
|
NodeDescriptor(String localName,
String qualifiedName,
String uri)
Creates a NodeDescriptor with namespace URI and qualified name
|
Modifier and Type | Method and Description |
---|---|
String |
getLocalName()
Gets the local name, excluding any namespace prefix
|
String |
getPropertyName()
Gets the name of the bean property to which this node refers
|
Class |
getPropertyType()
Gets the type of the bean property associated with this node, if any
|
String |
getQualifiedName()
Gets the qualified name, including any namespace prefix
|
Class |
getSingularPropertyType()
Gets the underlying type ignoring any wrapping a Collection or Array.
|
Expression |
getTextExpression()
Gets the expression used to evaluate the text value of this node
for a particular
Context . |
Updater |
getUpdater()
Gets the
Updater used to update a Context from the text value
corresponding to this node in an xml document |
String |
getURI()
Gets the (xml) namespace URI prefix for this node.
|
void |
setLocalName(String localName)
Sets the local name
|
void |
setPropertyName(String propertyName)
Sets the name of the bean property to which this node refers
|
void |
setPropertyType(Class propertyType)
Sets the type of the bean property associated with this node, if any
|
void |
setQualifiedName(String qualifiedName)
Sets the qualified name
|
void |
setSingularPropertyType(Class singularPropertyType)
Sets the underlying type ignoring any wrapping Collection or Array.
|
void |
setTextExpression(Expression textExpression)
Sets the expression used to evaluate the text value of this node
for a particular
Context |
void |
setUpdater(Updater updater)
Sets the
Updater used to update a Context from the text value
corresponding to this node in an xml document |
void |
setURI(String uri)
Sets the namespace URI that this node belongs to.
|
private String localName
private String qualifiedName
private String uri
private Expression textExpression
private Updater updater
private String propertyName
private Class propertyType
private Class singularPropertyType
public NodeDescriptor()
public NodeDescriptor(String localName)
localName
- the (xml) local name of this node.
This will be used to set both qualified and local name for this name.public NodeDescriptor(String localName, String qualifiedName, String uri)
localName
- the (xml) local name of this nodequalifiedName
- the (xml) qualified name of this nodeuri
- the (xml) namespace prefix of this nodepublic String getLocalName()
public void setLocalName(String localName)
localName
- the (xml) local name of this nodepublic String getQualifiedName()
public void setQualifiedName(String qualifiedName)
qualifiedName
- the new (xml) qualified name for this nodepublic String getURI()
public void setURI(String uri)
uri
- the new namespace uri for this nodepublic Expression getTextExpression()
Context
.public void setTextExpression(Expression textExpression)
Context
textExpression
- the Expression to be used to evaluate the value of this nodepublic Updater getUpdater()
Updater
used to update a Context
from the text value
corresponding to this node in an xml documentpublic void setUpdater(Updater updater)
Updater
used to update a Context
from the text value
corresponding to this node in an xml documentupdater
- the Updater to be used to update the values of this nodepublic Class getPropertyType()
public void setPropertyType(Class propertyType)
propertyType
- the Class of the bean propertypublic String getPropertyName()
public void setPropertyName(String propertyName)
propertyName
- the name of the bean property.
Or null, if this node is not mapped to to a bean propertypublic Class getSingularPropertyType()
public void setSingularPropertyType(Class singularPropertyType)
singularPropertyType
- the Class of the items in the Collection or Array.
If node is associated with a collective bean property, then this should not be null.