class ConfigurationNodePointer
extends org.apache.commons.jxpath.ri.model.NodePointer
A specific NodePointer
implementation for configuration nodes.
This is needed for queries using JXPath.
Modifier and Type | Field and Description |
---|---|
private ConfigurationNode |
node
Stores the associated configuration node.
|
private static long |
serialVersionUID
The serial version UID.
|
Constructor and Description |
---|
ConfigurationNodePointer(ConfigurationNode node,
java.util.Locale locale)
Creates a new instance of
ConfigurationNodePointer . |
ConfigurationNodePointer(org.apache.commons.jxpath.ri.model.NodePointer parent,
ConfigurationNode node)
Creates a new instance of
ConfigurationNodePointer and
initializes it with its parent pointer. |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.jxpath.ri.model.NodeIterator |
attributeIterator(org.apache.commons.jxpath.ri.QName name)
Returns an iterator for the attributes that match the given name.
|
org.apache.commons.jxpath.ri.model.NodeIterator |
childIterator(org.apache.commons.jxpath.ri.compiler.NodeTest test,
boolean reverse,
org.apache.commons.jxpath.ri.model.NodePointer startWith)
Returns an iterator for the children of this pointer that match the given
test object.
|
int |
compareChildNodePointers(org.apache.commons.jxpath.ri.model.NodePointer pointer1,
org.apache.commons.jxpath.ri.model.NodePointer pointer2)
Compares two child node pointers.
|
java.lang.Object |
getBaseValue()
Returns this node's base value.
|
java.lang.Object |
getImmediateNode()
Returns the immediate node.
|
int |
getLength()
Returns this node's length.
|
org.apache.commons.jxpath.ri.QName |
getName()
Returns this node's name.
|
java.lang.Object |
getValue()
Returns the value of this node.
|
boolean |
isAttribute()
Checks whether this node pointer refers to an attribute node.
|
boolean |
isCollection()
Returns a flag if this node is a collection.
|
boolean |
isLeaf()
Returns a flag whether this node is a leaf.
|
void |
setValue(java.lang.Object value)
Sets the value of this node.
|
boolean |
testNode(org.apache.commons.jxpath.ri.compiler.NodeTest test)
Tests if this node matches the given test.
|
asPath, clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValuePointer, isActual, isContainer, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, remove, setAttribute, setIndex, setNamespaceResolver, toString
private static final long serialVersionUID
private ConfigurationNode node
public ConfigurationNodePointer(ConfigurationNode node, java.util.Locale locale)
ConfigurationNodePointer
.node
- the nodelocale
- the localepublic ConfigurationNodePointer(org.apache.commons.jxpath.ri.model.NodePointer parent, ConfigurationNode node)
ConfigurationNodePointer
and
initializes it with its parent pointer.parent
- the parent pointernode
- the associated nodepublic boolean isLeaf()
isLeaf
in class org.apache.commons.jxpath.ri.model.NodePointer
public boolean isCollection()
isCollection
in class org.apache.commons.jxpath.ri.model.NodePointer
public int getLength()
getLength
in class org.apache.commons.jxpath.ri.model.NodePointer
public boolean isAttribute()
isAttribute
in class org.apache.commons.jxpath.ri.model.NodePointer
public org.apache.commons.jxpath.ri.QName getName()
getName
in class org.apache.commons.jxpath.ri.model.NodePointer
public java.lang.Object getBaseValue()
getBaseValue
in class org.apache.commons.jxpath.ri.model.NodePointer
public java.lang.Object getImmediateNode()
getImmediateNode
in class org.apache.commons.jxpath.ri.model.NodePointer
public java.lang.Object getValue()
getValue
in interface org.apache.commons.jxpath.Pointer
getValue
in class org.apache.commons.jxpath.ri.model.NodePointer
public void setValue(java.lang.Object value)
setValue
in interface org.apache.commons.jxpath.Pointer
setValue
in class org.apache.commons.jxpath.ri.model.NodePointer
value
- the new valuepublic int compareChildNodePointers(org.apache.commons.jxpath.ri.model.NodePointer pointer1, org.apache.commons.jxpath.ri.model.NodePointer pointer2)
compareChildNodePointers
in class org.apache.commons.jxpath.ri.model.NodePointer
pointer1
- one pointerpointer2
- another pointerpublic org.apache.commons.jxpath.ri.model.NodeIterator attributeIterator(org.apache.commons.jxpath.ri.QName name)
attributeIterator
in class org.apache.commons.jxpath.ri.model.NodePointer
name
- the attribute namepublic org.apache.commons.jxpath.ri.model.NodeIterator childIterator(org.apache.commons.jxpath.ri.compiler.NodeTest test, boolean reverse, org.apache.commons.jxpath.ri.model.NodePointer startWith)
childIterator
in class org.apache.commons.jxpath.ri.model.NodePointer
test
- the test objectreverse
- the reverse flagstartWith
- the start value of the iterationpublic boolean testNode(org.apache.commons.jxpath.ri.compiler.NodeTest test)
testNode
in class org.apache.commons.jxpath.ri.model.NodePointer
test
- the test object