|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icl.saxon.om.AbstractNode
com.icl.saxon.tree.NodeImpl
com.icl.saxon.tree.ParentNodeImpl
com.icl.saxon.tree.DocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
Field Summary | |
protected int |
sequence
|
Fields inherited from class com.icl.saxon.tree.NodeImpl |
emptyArray, parent |
Fields inherited from class com.icl.saxon.om.AbstractNode |
NODE_LETTER |
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
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 | |
DocumentImpl()
|
Method Summary | |
void |
addChild(NodeImpl node,
int index)
Add a child node to this node. |
void |
compact(int size)
Compact the space used by this node |
void |
copy(Outputter out)
Copy this node to a given outputter |
void |
copyStringValue(Outputter out)
Copy the string-value of this node to a given outputter |
void |
dropChildren()
Drop a branch of the tree. |
AxisEnumeration |
enumerateChildren(NodeTest test)
Get an enumeration of the children of this node |
String |
generateId()
Get a character string that uniquely identifies this node within the document |
protected AxisEnumeration |
getAllElements(int fingerprint)
Get a list of all elements with a given name fingerprint |
String |
getBaseURI()
Get the base URI of this root node. |
StringBuffer |
getCharacterBuffer()
Get the character buffer |
NodeList |
getChildNodes()
Return a NodeList that contains all children of this node. |
Element |
getDocumentElement()
Get the root (outermost) element. |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
Node |
getFirstChild()
Get the first child node of the element |
Hashtable |
getKeyIndex(KeyManager keymanager,
int fingerprint)
Get the index for a given key |
Node |
getLastChild()
Get the last child node of the element |
int |
getLineNumber()
Get the line number of this root node. |
protected int |
getLineNumber(int sequence)
Get the line number for an element. |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
Node |
getNextSibling()
Get next sibling - always null |
NodeFactory |
getNodeFactory()
Get the node factory that was used to build this document |
short |
getNodeType()
Return the type of node. |
String |
getNodeValue()
Get the node value as defined in the DOM. |
protected NodeImpl |
getNthChild(int n)
Get the nth child node of the element (numbering from 0) |
Node |
getPreviousSibling()
Get previous sibling - always null |
protected long |
getSequenceNumber()
Get the node sequence number (in document order). |
String |
getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes. |
String |
getSystemId()
Get the system id of this root node |
protected String |
getSystemId(int seq)
Get the system id of an element in the document |
String |
getUnparsedEntity(String name)
Get the unparsed entity with a given name |
boolean |
hasChildNodes()
Determine if the node has any children. |
void |
removeChild(int index)
Remove node at given index. |
void |
renumberChildren()
Renumber the children of a given parent node. |
NodeInfo |
selectID(String id)
Get the element with a given ID. |
protected void |
setCharacterBuffer(StringBuffer buffer)
Set the character buffer |
protected void |
setDocumentElement(ElementImpl e)
Set the top-level element of the document (variously called the root element or the document element). |
void |
setKeyIndex(KeyManager keymanager,
int fingerprint,
Hashtable keyindex)
Set the index for a given key. |
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 |
void |
setNodeFactory(NodeFactory factory)
Set the node factory that was used to build this document |
protected void |
setSystemId(int seq,
String uri)
Set the system id of an element in the document |
void |
setSystemId(String uri)
Set the system id of this node |
protected void |
setUnparsedEntity(String name,
String uri)
Set an unparsed entity URI associated with this document. |
void |
useChildrenArray(NodeImpl[] array)
Supply an array to be used for the array of children. |
Methods inherited from class com.icl.saxon.tree.NodeImpl |
compareOrder, getAttributes, getAttributeValue, getAttributeValue, getDisplayName, getEnumeration, getFingerprint, getLocalName, getNameCode, getNextInDocument, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getURI, hasAttributes, isSameNode, outputNamespaceNodes, removeNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.icl.saxon.om.NodeInfo |
compareOrder, copyStringValue, getAttributeValue, getAttributeValue, getDisplayName, getEnumeration, getFingerprint, getLocalName, getNameCode, getParent, getPrefix, getStringValue, getURI, hasChildNodes, isSameNode, outputNamespaceNodes |
Methods inherited from interface org.w3c.dom.Document |
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
protected int sequence
Constructor Detail |
public DocumentImpl()
Method Detail |
protected void setCharacterBuffer(StringBuffer buffer)
public final StringBuffer getCharacterBuffer()
public void setNamePool(NamePool pool)
setNamePool
in interface DocumentInfo
public NamePool getNamePool()
getNamePool
in interface DocumentInfo
getNamePool
in class NodeImpl
public void setNodeFactory(NodeFactory factory)
public NodeFactory getNodeFactory()
protected void setDocumentElement(ElementImpl e)
e
- the top-level elementpublic void setSystemId(String uri)
setSystemId
in interface Source
setSystemId
in class NodeImpl
public String getSystemId()
getSystemId
in interface NodeInfo
getSystemId
in class NodeImpl
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class NodeImpl
protected void setSystemId(int seq, String uri)
protected 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 NodeInfo
getLineNumber
in class NodeImpl
public final short getNodeType()
getNodeType
in interface NodeInfo
public final Node getNextSibling()
getNextSibling
in interface Node
getNextSibling
in class NodeImpl
public final Node getPreviousSibling()
getPreviousSibling
in interface Node
getPreviousSibling
in class NodeImpl
public Element getDocumentElement()
getDocumentElement
in interface Document
getDocumentElement
in class NodeImpl
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class NodeImpl
public String generateId()
generateId
in interface NodeInfo
generateId
in class NodeImpl
protected AxisEnumeration getAllElements(int fingerprint)
public NodeInfo selectID(String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()
public Hashtable getKeyIndex(KeyManager keymanager, int fingerprint)
getKeyIndex
in interface DocumentInfo
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)
public void setKeyIndex(KeyManager keymanager, int fingerprint, Hashtable keyindex)
setKeyIndex
in interface DocumentInfo
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)keyindex
- the index, in the form of a Hashtable that
maps the key value to a Vector of nodes having that key value. Or the String
"under construction", indicating that the index is being built.protected void setUnparsedEntity(String name, String uri)
public String getUnparsedEntity(String name)
getUnparsedEntity
in interface DocumentInfo
name
- the name of the entity
public void copy(Outputter out) throws TransformerException
copy
in interface NodeInfo
TransformerException
protected final long getSequenceNumber()
getSequenceNumber
in class NodeImpl
public final boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class NodeImpl
true
if the node has any children,
false
if the node has no children.public final AxisEnumeration enumerateChildren(NodeTest test)
public final Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
public final Node getLastChild()
getLastChild
in interface Node
getLastChild
in class NodeImpl
public final NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.
getChildNodes
in interface Node
getChildNodes
in class NodeImpl
protected final NodeImpl getNthChild(int n)
public String getStringValue()
public void copyStringValue(Outputter out) throws TransformerException
copyStringValue
in interface NodeInfo
copyStringValue
in class AbstractNode
TransformerException
public void useChildrenArray(NodeImpl[] array)
public void addChild(NodeImpl node, int index)
public void removeChild(int index)
public void renumberChildren()
public void dropChildren()
public void compact(int size)
public String getNodeValue()
getNodeValue
in interface Node
getNodeValue
in class AbstractNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |