|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jxpath.ri.model.NodePointer
org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
public abstract class PropertyOwnerPointer
A pointer describing a node that has properties, each of which could be a collection.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
|---|
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION |
| Constructor Summary | |
|---|---|
protected |
PropertyOwnerPointer(NodePointer parent)
Create a new PropertyOwnerPointer. |
protected |
PropertyOwnerPointer(NodePointer parent,
Locale locale)
Create a new PropertyOwnerPointer. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected PropertyOwnerPointer(NodePointer parent,
Locale locale)
parent - parent pointerlocale - Localeprotected PropertyOwnerPointer(NodePointer parent)
parent - pointer| Method Detail |
|---|
public NodeIterator childIterator(NodeTest test,
boolean reverse,
NodePointer startWith)
NodePointer
childIterator in class NodePointertest - NodeTest to filter childrenreverse - specified iteration directionstartWith - the NodePointer to start with
public NodeIterator createNodeIterator(String property,
boolean reverse,
NodePointer startWith)
property - property namereverse - whether to iterate in reversestartWith - first pointer to return
public NodeIterator attributeIterator(QName name)
NodePointer
attributeIterator in class NodePointername - the attribute name to test
public void setIndex(int index)
NodePointer
setIndex in class NodePointerindex - intpublic Object getImmediateNode()
NodePointer
getImmediateNode in class NodePointerpublic abstract QName getName()
NodePointer
getName in class NodePointerpublic boolean isValidProperty(QName name)
name is a valid child name for this PropertyOwnerPointer.
name - the QName to test
true if QName is a valid property name.public void setValue(Object value)
setValue in interface PointersetValue in class NodePointervalue - to setpublic void remove()
remove in class NodePointerpublic abstract PropertyPointer getPropertyPointer()
public boolean isDynamicPropertyDeclarationSupported()
public int compareChildNodePointers(NodePointer pointer1,
NodePointer pointer2)
NodePointer
compareChildNodePointers in class NodePointerpointer1 - first pointer to be comparedpointer2 - second pointer to be compared
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||