Class CGINPointer
- java.lang.Object
-
- org.apache.commons.jxpath.ri.model.NodePointer
-
- CGINPointer
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
,org.apache.commons.jxpath.Pointer
- Direct Known Subclasses:
CollectionCGINPointer
,LeafCGINPointer
public abstract class CGINPointer extends org.apache.commons.jxpath.ri.model.NodePointer
Abstract superclass of NodePointers for CGIN data structures.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CGINPointer(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.jxpath.ri.QName name)
Creates a pointer for a node with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareChildNodePointers(org.apache.commons.jxpath.ri.model.NodePointer pointer1, org.apache.commons.jxpath.ri.model.NodePointer pointer2)
Compares two child NodePointers and returns a positive number, zero or a positive number according to the order of the pointers.CGINPointer
createChild(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.jxpath.ri.QName name, Object object)
Modifies the referenced node to have an additional child.Object
getBaseValue()
Gets the value before any indexing.int
getLength()
Gets the size of a collection, or 1 if not a collection.org.apache.commons.jxpath.ri.QName
getName()
Gets the name of the referenced node.-
Methods inherited from class org.apache.commons.jxpath.ri.model.NodePointer
asPath, attributeIterator, childIterator, clone, compareTo, createAttribute, createChild, createChild, createPath, createPath, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateNode, getImmediateParentPointer, getImmediateValuePointer, getIndex, 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, remove, setAttribute, setIndex, setNamespaceResolver, setValue, testNode, toString
-
-
-
-
Method Detail
-
createChild
public CGINPointer createChild(org.apache.commons.jxpath.ri.model.NodePointer parent, org.apache.commons.jxpath.ri.QName name, Object object)
Modifies the referenced node to have an additional child.- Parameters:
parent
- pointer to the surrounding nodename
- name of the new nodeobject
- value of the new node
-
compareChildNodePointers
public int compareChildNodePointers(org.apache.commons.jxpath.ri.model.NodePointer pointer1, org.apache.commons.jxpath.ri.model.NodePointer pointer2)
Compares two child NodePointers and returns a positive number, zero or a positive number according to the order of the pointers.- Specified by:
compareChildNodePointers
in classorg.apache.commons.jxpath.ri.model.NodePointer
- Parameters:
pointer1
- first pointerpointer2
- second pointer- Returns:
- int
-
getName
public org.apache.commons.jxpath.ri.QName getName()
Gets the name of the referenced node.- Specified by:
getName
in classorg.apache.commons.jxpath.ri.model.NodePointer
- Returns:
- QName
-
getBaseValue
public Object getBaseValue()
Gets the value before any indexing.- Specified by:
getBaseValue
in classorg.apache.commons.jxpath.ri.model.NodePointer
- Returns:
- Object
-
getLength
public int getLength()
Gets the size of a collection, or 1 if not a collection. No CGINPointer is a collection in the JXPath sense, so returns 1.- Specified by:
getLength
in classorg.apache.commons.jxpath.ri.model.NodePointer
- Returns:
- 1
-
-