java.io.Serializable
, java.lang.Cloneable
, java.lang.Comparable
, Pointer
BeanPointer
, DynaBeanPointer
, DynamicPointer
, NullPointer
public abstract class PropertyOwnerPointer extends NodePointer
Modifier and Type | Field | Description |
---|---|---|
private static java.lang.Object |
UNINITIALIZED |
|
private java.lang.Object |
value |
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
Modifier | Constructor | Description |
---|---|---|
protected |
PropertyOwnerPointer(NodePointer parent) |
Create a new PropertyOwnerPointer.
|
protected |
PropertyOwnerPointer(NodePointer parent,
java.util.Locale locale) |
Create a new PropertyOwnerPointer.
|
Modifier and Type | Method | 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(java.lang.String property,
boolean reverse,
NodePointer startWith) |
Create a NodeIterator.
|
java.lang.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(java.lang.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, isActual, isAttribute, isCollection, isContainer, isDefaultNamespace, isLanguage, isLeaf, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setNamespaceResolver, testNode, toString
private static final java.lang.Object UNINITIALIZED
private java.lang.Object value
protected PropertyOwnerPointer(NodePointer parent, java.util.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(java.lang.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 java.lang.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(java.lang.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 compared