|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.om.AbstractNode
net.sf.saxon.tinytree.TinyNodeImpl
net.sf.saxon.tinytree.TinyParentNodeImpl
net.sf.saxon.tinytree.TinyElementImpl
A node in the XML parse tree representing an XML element.
This class is an implementation of NodeInfo and also implements the DOM Element interface
Field Summary | |
protected TinyDocumentImpl |
document
|
protected int |
nodeNr
|
protected TinyNodeImpl |
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 | |
TinyElementImpl(TinyDocumentImpl doc,
int nodeNr)
Constructor |
Method Summary | |
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
copy(Receiver receiver,
int whichNamespaces,
boolean copyAnnotations)
Copy this node to a given outputter |
void |
copyRUUD(Receiver receiver,
int whichNamespaces,
boolean copyAnnotations)
|
java.lang.String |
generateId()
Get a character string that uniquely identifies this node |
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
java.lang.String |
getBaseURI()
Get the base URI of this element node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
int |
getDocumentNumber()
Get the document number of the document containing this node (Needed when the document isn't a real node, for sorting free-standing elements) |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
int |
getFingerprint()
Get the fingerprint of the node, used for matching names |
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 name code of the node, used for matching names |
NamePool |
getNamePool()
Get the NamePool for the tree containing this node |
int |
getNodeKind()
Return the type of 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. |
NodeInfo |
getRoot()
Get the root node of the tree (not necessarily a document node) |
protected long |
getSequenceNumber()
Get the node sequence number (in document order). |
java.lang.String |
getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes. |
java.lang.String |
getSystemId()
Get the system ID for the entity containing the node. |
int |
getTypeAnnotation()
Get the type annotation of this node, if any Returns Type.UNTYPED_ANY if there is no type annotation |
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 if the node has children. |
boolean |
isSameNode(NodeInfo other)
Determine whether this is the same node as another node |
AxisIterator |
iterateAxis(byte axisNumber)
Return an iterator over all the nodes reached by the given axis from this node |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an iterator 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 |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value of an attribute on the current element. |
protected void |
setParentNode(TinyNodeImpl parent)
Set the parent of this node. |
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.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
protected TinyDocumentImpl document
protected int nodeNr
protected TinyNodeImpl parent
Constructor Detail |
public TinyElementImpl(TinyDocumentImpl doc, int nodeNr)
Method Detail |
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public java.lang.String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class TinyNodeImpl
public int getTypeAnnotation()
getTypeAnnotation
in interface NodeInfo
getTypeAnnotation
in class AbstractNode
public void outputNamespaceNodes(Receiver out, boolean includeAncestors) throws javax.xml.transform.TransformerException
outputNamespaceNodes
in interface NodeInfo
outputNamespaceNodes
in class TinyNodeImpl
out
- The relevant outputterincludeAncestors
- True if namespaces associated with ancestor
elements must also be output; false if these are already known to be
on the result tree.
javax.xml.transform.TransformerException
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
hasAttributes
in class TinyNodeImpl
true
if this node has any attributes,
false
otherwise.public java.lang.String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class TinyNodeImpl
fingerprint
- The fingerprint of the attribute name
public void setAttribute(java.lang.String name, java.lang.String value) throws org.w3c.dom.DOMException
setAttribute
in interface org.w3c.dom.Element
name
- The name of the attribute to be set. Any prefix is interpreted relative
to the namespaces defined for this element.value
- The new value of the attribute. Set this to null to remove the attribute.
org.w3c.dom.DOMException
public void copy(Receiver receiver, int whichNamespaces, boolean copyAnnotations) throws javax.xml.transform.TransformerException
copy
in interface NodeInfo
whichNamespaces
- indicates which namespaces should be copied: all, none,
or local (i.e., those not declared on a parent element)receiver
- the Receiver to which the node should be copiedcopyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copied
javax.xml.transform.TransformerException
public void copyRUUD(Receiver receiver, int whichNamespaces, boolean copyAnnotations) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public boolean hasChildNodes()
hasChildNodes
in interface org.w3c.dom.Node
hasChildNodes
in class TinyNodeImpl
true
if this node has any attributes,
false
otherwise.public java.lang.String getStringValue()
getStringValue
in interface NodeInfo
getStringValue
in class AbstractNode
public void setSystemId(java.lang.String uri)
protected void setParentNode(TinyNodeImpl parent)
public boolean isSameNode(NodeInfo other)
isSameNode
in interface NodeInfo
isSameNode
in class AbstractNode
public java.lang.String getSystemId()
getSystemId
in interface NodeInfo
getSystemId
in class AbstractNode
public org.w3c.dom.Node getOriginatingNode()
getOriginatingNode
in interface javax.xml.transform.dom.DOMLocator
getOriginatingNode
in class AbstractNode
public int getLineNumber()
getLineNumber
in interface NodeInfo
getLineNumber
in class AbstractNode
protected long getSequenceNumber()
public final int compareOrder(NodeInfo other)
compareOrder
in interface NodeInfo
compareOrder
in class AbstractNode
other
- The other node, whose position is to be compared with this node
public int getFingerprint()
getFingerprint
in interface NodeInfo
getFingerprint
in class AbstractNode
public int getNameCode()
getNameCode
in interface NodeInfo
getNameCode
in class AbstractNode
public java.lang.String getPrefix()
public java.lang.String getURI()
getURI
in interface NodeInfo
getURI
in class AbstractNode
public java.lang.String getDisplayName()
getDisplayName
in interface NodeInfo
getDisplayName
in class AbstractNode
public java.lang.String getLocalPart()
getLocalPart
in interface NodeInfo
getLocalPart
in class AbstractNode
public AxisIterator iterateAxis(byte axisNumber)
axisNumber
- Identifies the required axis, eg. Axis.CHILD or Axis.PARENT
Axis
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
iterateAxis
in interface NodeInfo
iterateAxis
in class AbstractNode
axisNumber
- Identifies the required axis, eg. Axis.CHILD or Axis.PARENTnodeTest
- A pattern to be matched by the returned nodes.
public NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class AbstractNode
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class AbstractNode
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class AbstractNode
public NamePool getNamePool()
public java.lang.String generateId()
generateId
in interface NodeInfo
generateId
in class AbstractNode
public int getDocumentNumber()
getDocumentNumber
in interface NodeInfo
getDocumentNumber
in class AbstractNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |