public abstract class PropertyOwnerPointer extends NodePointer
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
Modifier | Constructor and Description |
---|---|
protected |
PropertyOwnerPointer(NodePointer parent)
Create a new PropertyOwnerPointer.
|
protected |
PropertyOwnerPointer(NodePointer parent,
Locale locale)
Create a new PropertyOwnerPointer.
|
Modifier and Type | Method and Description |
---|---|
NodeIterator |
attributeIterator(QName name)
Returns a NodeIterator that iterates over all attributes of the current
node matching the supplied node name (could have a wildcard).
|
NodeIterator |
childIterator(NodeTest test,
boolean reverse,
NodePointer startWith)
Returns a NodeIterator that iterates over all children or all children
that match the given NodeTest, starting with the specified one.
|
int |
compareChildNodePointers(NodePointer pointer1,
NodePointer pointer2)
Compares two child NodePointers and returns a positive number,
zero or a positive number according to the order of the pointers.
|
NodeIterator |
createNodeIterator(String property,
boolean reverse,
NodePointer startWith)
Create a NodeIterator.
|
Object |
getImmediateNode()
Returns the object the pointer points to; does not convert it
to a "canonical" type.
|
abstract QName |
getName()
Returns the name of this node.
|
abstract PropertyPointer |
getPropertyPointer()
Get a PropertyPointer for this PropertyOwnerPointer.
|
boolean |
isDynamicPropertyDeclarationSupported()
Learn whether dynamic property declaration is supported.
|
boolean |
isValidProperty(QName name)
Learn whether
name is a valid child name for this PropertyOwnerPointer. |
void |
remove()
If this is a root node pointer, throws an exception; otherwise
forwards the call to the parent node.
|
void |
setIndex(int index)
Set the index of this NodePointer.
|
void |
setValue(Object value)
Throws an exception if you try to change the root element, otherwise
forwards the call to the parent pointer.
|
asPath, clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, escape, getAbstractFactory, getBaseValue, getDefaultNamespaceURI, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLength, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, handle, handle, isActual, isAttribute, isCollection, isContainer, isDefaultNamespace, isLanguage, isLeaf, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setExceptionHandler, setNamespaceResolver, testNode, toString, verify
protected PropertyOwnerPointer(NodePointer parent, Locale locale)
parent
- parent pointerlocale
- Localeprotected PropertyOwnerPointer(NodePointer parent)
parent
- pointerpublic NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith)
NodePointer
childIterator
in class NodePointer
test
- NodeTest to filter childrenreverse
- specified iteration directionstartWith
- the NodePointer to start withpublic NodeIterator createNodeIterator(String property, boolean reverse, NodePointer startWith)
property
- property namereverse
- whether to iterate in reversestartWith
- first pointer to returnpublic NodeIterator attributeIterator(QName name)
NodePointer
attributeIterator
in class NodePointer
name
- the attribute name to testpublic void setIndex(int index)
NodePointer
setIndex
in class NodePointer
index
- intpublic Object getImmediateNode()
NodePointer
getImmediateNode
in class NodePointer
public abstract QName getName()
NodePointer
getName
in class NodePointer
public boolean isValidProperty(QName name)
name
is a valid child name for this PropertyOwnerPointer.name
- the QName to testtrue
if QName
is a valid property name.public void setValue(Object value)
setValue
in interface Pointer
setValue
in class NodePointer
value
- to setpublic void remove()
remove
in class NodePointer
public abstract PropertyPointer getPropertyPointer()
public boolean isDynamicPropertyDeclarationSupported()
public int compareChildNodePointers(NodePointer pointer1, NodePointer pointer2)
NodePointer
compareChildNodePointers
in class NodePointer
pointer1
- first pointer to be comparedpointer2
- second pointer to be comparedCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.