|
|||||||||||
| 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.tinytree.TinyNodeImpl
|
+--net.sf.saxon.tinytree.TinyParentNodeImpl
|
+--net.sf.saxon.tinytree.TinyDocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
| Field Summary | |
protected int[] |
alpha
|
protected int[] |
attCode
|
protected int[] |
attParent
|
protected java.lang.CharSequence[] |
attValue
|
protected int[] |
beta
|
protected char[] |
charBuffer
|
protected int |
charBufferLength
|
protected java.lang.StringBuffer |
commentBuffer
|
protected short[] |
depth
|
protected TinyDocumentImpl |
document
|
protected int[] |
nameCode
|
protected int[] |
namespaceCode
|
protected int[] |
namespaceParent
|
protected int[] |
next
|
protected byte[] |
nodeKind
|
protected int |
nodeNr
|
protected int |
numberOfAttributes
|
protected int |
numberOfNamespaces
|
protected int |
numberOfNodes
|
protected net.sf.saxon.tinytree.TinyNodeImpl |
parent
|
protected int[] |
prior
|
protected int |
rootNode
|
| Fields inherited from class net.sf.saxon.om.AbstractNode |
NODE_LETTER |
| Fields inherited from interface net.sf.saxon.om.NodeInfo |
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
| 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 |
| Constructor Summary | |
TinyDocumentImpl()
|
|
TinyDocumentImpl(int nodes,
int attributes,
int namespaces,
int characters)
|
|
| Method Summary | |
protected void |
addAttribute(int parent0,
int code0,
int type0,
java.lang.CharSequence value0)
|
protected void |
addNamespace(int parent,
int nscode)
|
protected int |
addNode(short kind,
int depth0,
int alpha0,
int beta0,
int nameCode0)
Add a node to the document |
protected void |
appendChars(java.lang.CharSequence chars)
|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
void |
condense()
Condense the tree: release unused memory. |
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations)
Copy this node to a given outputter |
void |
diagnosticDump()
Produce diagnostic print of main tree arrays |
protected void |
ensureAttributeCapacity()
|
protected void |
ensureNamespaceCapacity()
|
protected void |
ensureNodeCapacity()
|
protected void |
ensurePriorIndex()
On demand, make an index for quick access to preceding-sibling nodes |
java.lang.String |
generateId()
Get a character string that uniquely identifies this node |
protected AxisIterator |
getAllElements(int fingerprint)
Get a list of all elements with a given name. |
protected int |
getAttributeAnnotation(int nr)
Get the type annotation of an attribute node. |
protected net.sf.saxon.tinytree.TinyAttributeImpl |
getAttributeNode(int nr)
Make a (transient) attribute node from the array of attributes |
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 root node. |
java.lang.String |
getDisplayName()
Get the display name of this node. |
int |
getDocumentNumber()
Get the unique document number |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
protected int |
getElementAnnotation(int nodeNr)
Get the type annotation of an element node. |
int |
getFingerprint()
Get the fingerprint of the node, used for matching names |
int |
getLineNumber()
Get the line number of this root node. |
protected int |
getLineNumber(int sequence)
Get the line number for an element. |
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 name pool used for the names in this document |
protected net.sf.saxon.tinytree.TinyNamespaceImpl |
getNamespaceNode(int nr)
Make a (transient) namespace node from the array of namespace declarations |
net.sf.saxon.tinytree.TinyNodeImpl |
getNode(int nr)
|
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 |
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 of this root node |
protected java.lang.String |
getSystemId(int seq)
Get the system id of an element in the document |
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given nameID if there is one, or null if not. |
protected UntypedAtomicValue |
getUntypedAtomicValue(int nodeNr)
Get the typed value of a node. |
java.lang.String |
getURI()
Get the URI part of the name of this node. |
boolean |
hasAttributes()
Returns whether this node 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 |
protected boolean |
isUsingNamespaces()
determine whether this document uses namespaces |
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. |
NodeInfo |
selectID(java.lang.String id)
Get the element with a given ID. |
protected void |
setElementAnnotation(int nodeNr,
int typeCode)
Set the type annotation of an element node |
protected void |
setLineNumber(int sequence,
int line)
Set the line number for an element. |
void |
setLineNumbering()
Set line numbering on |
void |
setNamePool(NamePool pool)
Set the name pool used for all names in this document |
protected void |
setParentNode(net.sf.saxon.tinytree.TinyNodeImpl parent)
Set the parent of this node. |
void |
setRootNode(NodeInfo root)
Set the root node. |
protected void |
setSystemId(int seq,
java.lang.String uri)
Set the system id of an element in the document |
void |
setSystemId(java.lang.String uri)
Set the system id of this node |
protected void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set an unparsed entity URI associated with this document. |
void |
showSize()
|
| 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 |
compareOrder, getAttributeValue, getDisplayName, getFingerprint, getLocalPart, getNameCode, getStringValue, getTypeAnnotation, getURI, hasChildNodes, isSameNode, iterateAxis, iterateAxis, outputNamespaceNodes |
| Methods inherited from interface net.sf.saxon.om.Item |
getTypedValue |
| Methods inherited from interface org.w3c.dom.Document |
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Field Detail |
protected int rootNode
protected char[] charBuffer
protected int charBufferLength
protected java.lang.StringBuffer commentBuffer
protected int numberOfNodes
protected byte[] nodeKind
protected short[] depth
protected int[] next
protected int[] alpha
protected int[] beta
protected int[] nameCode
protected int[] prior
protected int numberOfAttributes
protected int[] attParent
protected int[] attCode
protected java.lang.CharSequence[] attValue
protected int numberOfNamespaces
protected int[] namespaceParent
protected int[] namespaceCode
protected TinyDocumentImpl document
protected int nodeNr
protected net.sf.saxon.tinytree.TinyNodeImpl parent
| Constructor Detail |
public TinyDocumentImpl()
public TinyDocumentImpl(int nodes,
int attributes,
int namespaces,
int characters)
| Method Detail |
public void setNamePool(NamePool pool)
setNamePool in interface DocumentInfopool - The name pool to be usedpublic NamePool getNamePool()
getNamePool in interface DocumentInfogetNamePool in class net.sf.saxon.tinytree.TinyNodeImplpublic int getDocumentNumber()
getDocumentNumber in interface DocumentInfogetDocumentNumber in class net.sf.saxon.tinytree.TinyNodeImplprotected void ensureNodeCapacity()
protected void ensureAttributeCapacity()
protected void ensureNamespaceCapacity()
public void setRootNode(NodeInfo root)
protected int addNode(short kind,
int depth0,
int alpha0,
int beta0,
int nameCode0)
kind - The kind of the nodedepth0 - The depth in the treealpha0 - Pointer to attributes or textbeta0 - Pointer to namespaces or textnameCode0 - The name of the node
protected void appendChars(java.lang.CharSequence chars)
public void condense()
protected void setElementAnnotation(int nodeNr,
int typeCode)
protected int getElementAnnotation(int nodeNr)
protected void ensurePriorIndex()
protected void addAttribute(int parent0,
int code0,
int type0,
java.lang.CharSequence value0)
protected void addNamespace(int parent,
int nscode)
public net.sf.saxon.tinytree.TinyNodeImpl getNode(int nr)
protected UntypedAtomicValue getUntypedAtomicValue(int nodeNr)
public long getSequenceNumber()
getSequenceNumber in class net.sf.saxon.tinytree.TinyNodeImplprotected net.sf.saxon.tinytree.TinyAttributeImpl getAttributeNode(int nr)
protected int getAttributeAnnotation(int nr)
protected boolean isUsingNamespaces()
protected net.sf.saxon.tinytree.TinyNamespaceImpl getNamespaceNode(int nr)
public void setSystemId(java.lang.String uri)
setSystemId in interface javax.xml.transform.SourcesetSystemId in class net.sf.saxon.tinytree.TinyNodeImplpublic java.lang.String getSystemId()
getSystemId in interface NodeInfogetSystemId in class net.sf.saxon.tinytree.TinyNodeImplpublic java.lang.String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class net.sf.saxon.tinytree.TinyNodeImpl
protected void setSystemId(int seq,
java.lang.String uri)
protected java.lang.String getSystemId(int seq)
public void setLineNumbering()
protected void setLineNumber(int sequence,
int line)
protected int getLineNumber(int sequence)
public int getLineNumber()
getLineNumber in interface NodeInfogetLineNumber in class net.sf.saxon.tinytree.TinyNodeImplpublic final int getNodeKind()
getNodeKind in interface NodeInfoTypepublic NodeInfo getParent()
getParent in interface NodeInfogetParent in class net.sf.saxon.tinytree.TinyNodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class net.sf.saxon.tinytree.TinyNodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class net.sf.saxon.tinytree.TinyNodeImplpublic java.lang.String generateId()
generateId in interface NodeInfogenerateId in class net.sf.saxon.tinytree.TinyNodeImplprotected AxisIterator getAllElements(int fingerprint)
public NodeInfo selectID(java.lang.String id)
selectID in interface DocumentInfoid - The unique ID of the required element, previously registered using registerID()
protected void setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
public java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity in interface DocumentInfoname - the name of the entity
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations)
throws javax.xml.transform.TransformerException
copy in interface NodeInfoout - 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 copied
javax.xml.transform.TransformerExceptionpublic void diagnosticDump()
public void showSize()
public boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.NodehasChildNodes in class net.sf.saxon.tinytree.TinyNodeImpltrue if this node has any attributes,
false otherwise.public java.lang.String getStringValue()
getStringValue in interface NodeInfogetStringValue in class AbstractNodeprotected void setParentNode(net.sf.saxon.tinytree.TinyNodeImpl parent)
public boolean isSameNode(NodeInfo other)
isSameNode in interface NodeInfoisSameNode in class AbstractNodepublic org.w3c.dom.Node getOriginatingNode()
getOriginatingNode in interface javax.xml.transform.dom.DOMLocatorgetOriginatingNode in class AbstractNodepublic 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 int getFingerprint()
getFingerprint in interface NodeInfogetFingerprint in class AbstractNodepublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class AbstractNodeallocate,
getFingerprintpublic 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 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 NodeInfoiterateAxis in class AbstractNodeaxisNumber - Identifies the required axis, eg. Axis.CHILD or Axis.PARENTnodeTest - 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 void outputNamespaceNodes(Receiver out,
boolean includeAncestors)
throws javax.xml.transform.TransformerException
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
javax.xml.transform.TransformerException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||