|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saxon.om.AbstractNode
|
+--net.sf.saxon.tree.NodeImpl
A node in the XML parse tree representing an XML element, character content, or attribute.
This is the top-level class in the implementation class hierarchy; it essentially contains all those methods that can be defined using other primitive methods, without direct access to data.
| Field Summary | |
protected int |
index
|
protected net.sf.saxon.tree.ParentNodeImpl |
parent
|
| Fields inherited from class net.sf.saxon.om.AbstractNode |
NODE_LETTER |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface net.sf.saxon.om.NodeInfo |
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
| Constructor Summary | |
NodeImpl()
|
|
| Method Summary | |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
abstract void |
copy(Receiver out,
int whichNamespaces)
|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy nodes. |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node within this document (The calling code will prepend a document identifier) |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getBaseURI()
Get the base URI for the node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
org.w3c.dom.Element |
getDocumentElement()
Get the outermost element. |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
int |
getFingerprint()
Get the fingerprint of the node. |
org.w3c.dom.Node |
getFirstChild()
Get first child - default implementation used for leaf nodes |
org.w3c.dom.Node |
getLastChild()
Get last child - default implementation used for leaf nodes |
int |
getLineNumber()
Get the line number of the node within its source document entity |
java.lang.String |
getLocalPart()
Get the local name of this node. |
int |
getNameCode()
Get the nameCode of the node. |
NamePool |
getNamePool()
Get the NamePool |
NodeImpl |
getNextInDocument(NodeImpl anchor)
Get the next node in document order |
org.w3c.dom.Node |
getNextSibling()
Get next sibling node |
org.w3c.dom.Node |
getOriginatingNode()
Get the node corresponding to this javax.xml.transform.dom.DOMLocator |
NodeInfo |
getParent()
Find the parent node of this node. |
java.lang.String |
getPrefix()
Get the prefix part of the name of this node. |
NodeImpl |
getPreviousInDocument()
Get the previous node in document order |
org.w3c.dom.Node |
getPreviousSibling()
Get the previous sibling of the node |
NodeInfo |
getRoot()
Get the root node |
protected long |
getSequenceNumber()
Get the node sequence number (in document order). |
java.lang.String |
getSystemId()
Get the system ID for the node. |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
boolean |
hasChildNodes()
Determine whether the node has any children. |
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node |
AxisIterator |
iterateAxis(byte axisNumber)
Return an enumeration over the nodes reached by the given axis from this node |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
void |
outputNamespaceNodes(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setSystemId(java.lang.String uri)
Set the system ID of this node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.om.NodeInfo |
getNodeKind |
| Field Detail |
protected net.sf.saxon.tree.ParentNodeImpl parent
protected int index
| Constructor Detail |
public NodeImpl()
| Method Detail |
public void setSystemId(java.lang.String uri)
public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo in interface NodeInfoisSameNodeInfo in class AbstractNodeother - the node to be compared with this node
public int getNameCode()
getNameCode in interface NodeInfogetNameCode in class AbstractNodeallocate,
getFingerprintpublic int getFingerprint()
getFingerprint in interface NodeInfogetFingerprint in class AbstractNodepublic java.lang.String generateId()
generateId in interface NodeInfogenerateId in class AbstractNodepublic org.w3c.dom.Node getOriginatingNode()
getOriginatingNode in interface javax.xml.transform.dom.DOMLocatorgetOriginatingNode in class AbstractNodepublic java.lang.String getSystemId()
getSystemId in interface NodeInfogetSystemId in class AbstractNodepublic java.lang.String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class AbstractNodeprotected long getSequenceNumber()
public final int compareOrder(NodeInfo other)
compareOrder in interface NodeInfocompareOrder in class AbstractNodeother - The other node, whose position is to be compared with this node
public NamePool getNamePool()
public java.lang.String getPrefix()
public java.lang.String getURI()
getURI in interface NodeInfogetURI in class AbstractNodepublic java.lang.String getDisplayName()
getDisplayName in interface NodeInfogetDisplayName in class AbstractNodepublic java.lang.String getLocalPart()
getLocalPart in interface NodeInfogetLocalPart in class AbstractNodepublic int getLineNumber()
getLineNumber in interface NodeInfogetLineNumber in class AbstractNodepublic final NodeInfo getParent()
getParent in interface NodeInfogetParent in class AbstractNodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.NodegetPreviousSibling in class AbstractNodepublic org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.NodegetNextSibling in class AbstractNodepublic org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.NodegetFirstChild in class AbstractNodepublic org.w3c.dom.Node getLastChild()
getLastChild in interface org.w3c.dom.NodegetLastChild in class AbstractNodepublic AxisIterator iterateAxis(byte axisNumber)
axisNumber - The axis to be iterated over
Axis
public AxisIterator iterateAxis(byte axisNumber,
NodeTest nodeTest)
iterateAxis in interface NodeInfoiterateAxis in class AbstractNodeaxisNumber - The axis to be iterated overnodeTest - A pattern to be matched by the returned nodes
public boolean hasAttributes()
hasAttributes in interface org.w3c.dom.NodehasAttributes in class AbstractNodetrue if this node has any attributes,
false otherwise.public java.lang.String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfogetAttributeValue in class AbstractNodefingerprint - The fingerprint of the attribute name
public org.w3c.dom.Element getDocumentElement()
getDocumentElement in class AbstractNodepublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class AbstractNodepublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class AbstractNodepublic NodeImpl getNextInDocument(NodeImpl anchor)
public NodeImpl getPreviousInDocument()
public void outputNamespaceNodes(Receiver out,
boolean includeAncestors)
throws XPathException
outputNamespaceNodes in interface NodeInfooutputNamespaceNodes in class AbstractNodeout - The relevant outputterincludeAncestors - True if namespaces declared on ancestor elements must
be output; false if it is known that these are already on the result tree
XPathException
public final void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
out - the Receiver to which the node should be copiedwhichNamespaces - in the case of an element, controls
which namespace nodes should be copied. Values are NO_NAMESPACES,
LOCAL_NAMESPACES, ALL_NAMESPACEScopyAnnotations - indicates whether the type annotations
of element and attribute nodes should be copiedlocationId - Identifies the location of the instruction
that requested this copy. Pass zero if no other information is available
XPathException
public abstract void copy(Receiver out,
int whichNamespaces)
throws XPathException
XPathExceptionpublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.NodehasChildNodes in class AbstractNodetrue if the node has any children,
false if the node has no children.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||