|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.om.AbstractNode | +--com.icl.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 static NodeInfo[] |
emptyArray
|
protected int |
index
|
protected com.icl.saxon.tree.ParentNodeImpl |
parent
|
Fields inherited from class com.icl.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 com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
Constructor Summary | |
NodeImpl()
|
Method Summary | |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node within this document (The calling code will prepend a document identifier) |
org.w3c.dom.NamedNodeMap |
getAttributes()
Return a NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise. |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String localName)
Find the value of a given attribute of this node. |
java.lang.String |
getBaseURI()
Get the base URI for the node. |
org.w3c.dom.NodeList |
getChildNodes()
Return a NodeList that contains all children of this 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 |
AxisEnumeration |
getEnumeration(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this 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 |
getLocalName()
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 |
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 |
isSameNode(NodeInfo other)
Determine whether this is the same node as another node |
void |
outputNamespaceNodes(Outputter out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
removeNode()
Remove this node from the tree. |
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 org.w3c.dom.Node |
getNodeType |
Methods inherited from interface com.icl.saxon.om.NodeInfo |
copy, getNodeType, getStringValue |
Field Detail |
protected static NodeInfo[] emptyArray
protected com.icl.saxon.tree.ParentNodeImpl parent
protected int index
Constructor Detail |
public NodeImpl()
Method Detail |
public void setSystemId(java.lang.String uri)
public boolean isSameNode(NodeInfo other)
isSameNode
in class AbstractNode
public int getNameCode()
getNameCode
in class AbstractNode
com.icl.saxon.om.NodeInfo
allocate
,
getFingerprint
public int getFingerprint()
getFingerprint
in class AbstractNode
public java.lang.String generateId()
generateId
in class AbstractNode
public org.w3c.dom.Node getOriginatingNode()
getOriginatingNode
in class AbstractNode
public java.lang.String getSystemId()
getSystemId
in class AbstractNode
com.icl.saxon.om.NodeInfo
public java.lang.String getBaseURI()
getBaseURI
in class AbstractNode
protected long getSequenceNumber()
public final int compareOrder(NodeInfo other)
compareOrder
in class AbstractNode
other
- The other node, whose position is to be compared with this nodepublic NamePool getNamePool()
public java.lang.String getPrefix()
getPrefix
in class AbstractNode
public java.lang.String getURI()
getURI
in class AbstractNode
public java.lang.String getDisplayName()
getDisplayName
in class AbstractNode
public java.lang.String getLocalName()
getLocalName
in class AbstractNode
public int getLineNumber()
getLineNumber
in class AbstractNode
com.icl.saxon.om.NodeInfo
public final NodeInfo getParent()
getParent
in class AbstractNode
public org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in class AbstractNode
public org.w3c.dom.Node getNextSibling()
getNextSibling
in class AbstractNode
public org.w3c.dom.Node getFirstChild()
getFirstChild
in class AbstractNode
public org.w3c.dom.Node getLastChild()
getLastChild
in class AbstractNode
public AxisEnumeration getEnumeration(byte axisNumber, NodeTest nodeTest)
getEnumeration
in class AbstractNode
node
- NodeInfo representing the node from which the enumeration startsnodeType
- the type(s) of node to be included, e.g. NodeInfo.ELEMENT, NodeInfo.TEXT.
The value NodeInfo.NODE means include any type of node.nodeTest
- A pattern to be matched by the returned nodespublic boolean hasAttributes()
hasAttributes
in class AbstractNode
true
if this node has any attributes,
false
otherwise.public java.lang.String getAttributeValue(java.lang.String uri, java.lang.String localName)
getAttributeValue
in class AbstractNode
uri
- the namespace uri of an attributelocalName
- the local name of an attributepublic java.lang.String getAttributeValue(int fingerprint)
getAttributeValue
in class AbstractNode
fingerprint
- The fingerprint of the attribute namepublic org.w3c.dom.Element getDocumentElement()
getDocumentElement
in class AbstractNode
public DocumentInfo getDocumentRoot()
getDocumentRoot
in class AbstractNode
public NodeImpl getNextInDocument(NodeImpl anchor)
anchor:
- the scan stops when it reaches a node that is not a descendant of the specified
anchor nodepublic NodeImpl getPreviousInDocument()
public void outputNamespaceNodes(Outputter out, boolean includeAncestors) throws javax.xml.transform.TransformerException
outputNamespaceNodes
in class AbstractNode
out
- 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 treepublic void removeNode()
public org.w3c.dom.NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.getChildNodes
in class AbstractNode
public org.w3c.dom.NamedNodeMap getAttributes()
NamedNodeMap
containing the attributes of this node (if
it is an Element
) or null
otherwise. (DOM method)getAttributes
in class AbstractNode
public boolean hasChildNodes()
hasChildNodes
in class AbstractNode
true
if the node has any children,
false
if the node has no children.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |