|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.commons.jxpath.ri.model.NodePointer
|
+--org.apache.commons.jxpath.ri.model.beans.PropertyPointer
|
+--org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer
| Fields inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer |
bean, propertyIndex, UNSPECIFIED_PROPERTY |
| Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION |
| Constructor Summary | |
NullPropertyPointer(NodePointer parent)
|
|
| Method Summary | |
java.lang.String |
asPath()
Returns an XPath that maps to this Pointer. |
NodePointer |
createChild(JXPathContext context,
QName name,
int index)
Called by a child pointer when it needs to create a parent object for a non-existent collection element. |
NodePointer |
createChild(JXPathContext context,
QName name,
int index,
java.lang.Object value)
Called by a child pointer if that child needs to assign the value supplied in the createPath(context, value) call to a non-existent node. |
NodePointer |
createPath(JXPathContext context)
Called by a child pointer when it needs to create a parent object. |
NodePointer |
createPath(JXPathContext context,
java.lang.Object value)
Called directly by JXPathContext. |
java.lang.Object |
getBaseValue()
Returns the value represented by the pointer before indexing. |
java.lang.Object |
getImmediateNode()
Returns the object the pointer points to; does not convert it to a "canonical" type. |
int |
getLength()
If the property contains a collection, then the length of that collection, otherwise - 1. |
QName |
getName()
Returns the name of this node. |
int |
getPropertyCount()
|
java.lang.String |
getPropertyName()
|
java.lang.String[] |
getPropertyNames()
|
NodePointer |
getValuePointer()
If this pointer manages a transparent container, like a variable, this method returns the pointer to the contents. |
boolean |
isActual()
An actual pointer points to an existing part of an object graph, even if it is null. |
protected boolean |
isActualProperty()
|
boolean |
isCollection()
Returns true if the value of the pointer is an array or
a Collection. |
boolean |
isContainer()
If true, this node is axiliary and can only be used as an intermediate in the chain of pointers. |
boolean |
isLeaf()
If true, this node does not have children |
void |
setNameAttributeValue(java.lang.String attributeValue)
|
void |
setPropertyIndex(int index)
|
void |
setPropertyName(java.lang.String propertyName)
|
void |
setValue(java.lang.Object value)
Converts the value to the required type and changes the corresponding object to that value. |
| Methods inherited from class org.apache.commons.jxpath.ri.model.beans.PropertyPointer |
compareChildNodePointers, equals, getBean, getImmediateValuePointer, getPropertyIndex, hashCode |
| Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
attributeIterator, childIterator, clone, compareTo, createAttribute, getDefaultNamespaceURI, getExpandedName, getIndex, getLocale, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, remove, setAttribute, setIndex, testNode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NullPropertyPointer(NodePointer parent)
| Method Detail |
public QName getName()
NodePointergetName in class PropertyPointerpublic void setPropertyIndex(int index)
setPropertyIndex in class PropertyPointerpublic int getLength()
PropertyPointergetLength in class PropertyPointerpublic java.lang.Object getBaseValue()
NodePointergetBaseValue in class NodePointerpublic java.lang.Object getImmediateNode()
NodePointergetImmediateNode in class PropertyPointerpublic boolean isLeaf()
NodePointerisLeaf in class PropertyPointerpublic NodePointer getValuePointer()
NodePointergetValuePointer() directly. Override the
getImmediateValuePointer() method instead. The
getValuePointer() method is calls
getImmediateValuePointer() and, if the result is not
this, invokes getValuePointer() recursively.
The idea here is to open all nested containers. Let's say we have a
container within a container within a container. The
getValuePointer() method should then open all those
containers and return the pointer to the ultimate contents. It does so
with the above recursion.getValuePointer in class NodePointerprotected boolean isActualProperty()
isActualProperty in class PropertyPointerpublic boolean isActual()
NodePointerisActual in class PropertyPointerpublic boolean isContainer()
NodePointerisContainer in class NodePointerpublic void setValue(java.lang.Object value)
NodePointersetValue in class NodePointerpublic NodePointer createPath(JXPathContext context)
NodePointercreatePath in class PropertyPointer
public NodePointer createPath(JXPathContext context,
java.lang.Object value)
NodePointercreatePath in class PropertyPointer
public NodePointer createChild(JXPathContext context,
QName name,
int index)
NodePointercreateChild in class PropertyPointer
public NodePointer createChild(JXPathContext context,
QName name,
int index,
java.lang.Object value)
NodePointercreateChild in class PropertyPointerpublic java.lang.String getPropertyName()
getPropertyName in class PropertyPointerpublic void setPropertyName(java.lang.String propertyName)
setPropertyName in class PropertyPointerpublic void setNameAttributeValue(java.lang.String attributeValue)
public boolean isCollection()
NodePointertrue if the value of the pointer is an array or
a Collection.isCollection in class PropertyPointerpublic int getPropertyCount()
getPropertyCount in class PropertyPointerpublic java.lang.String[] getPropertyNames()
getPropertyNames in class PropertyPointerpublic java.lang.String asPath()
NodePointerasPath in class NodePointer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||