|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.tree.NodeImpl net.sf.saxon.tree.DocumentImpl
public final class DocumentImpl
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
Field Summary |
---|
Fields inherited from class net.sf.saxon.tree.NodeImpl |
---|
NODE_LETTER |
Fields inherited from interface net.sf.saxon.om.NodeInfo |
---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES |
Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
---|
EMPTY_VALUE_ARRAY |
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(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given outputter |
void |
generateId(FastStringBuffer buffer)
Get a character string that uniquely identifies this node |
String |
getBaseURI()
Get the base URI of this root node. |
Configuration |
getConfiguration()
Get the configuration previously set using setConfiguration |
ElementImpl |
getDocumentElement()
Get the root (outermost) element. |
int |
getDocumentNumber()
Get the unique document number |
DocumentInfo |
getDocumentRoot()
Get the root (document) node |
NodeInfo |
getFirstChild()
Get the first child node of the element |
NodeInfo |
getLastChild()
Get the last child node of the element |
int |
getLineNumber()
Get the line number of this root node. |
NamePool |
getNamePool()
Get the name pool used for the names in this document |
NodeInfo |
getNextSibling()
Get next sibling - always null |
int |
getNodeKind()
Return the type of node. |
NodeInfo |
getPreviousSibling()
Get previous sibling - always null |
NodeInfo |
getRoot()
Get the root node |
String |
getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes. |
CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence. |
String |
getSystemId()
Get the system id of this root node |
String[] |
getUnparsedEntity(String name)
Get the unparsed entity with a given name |
boolean |
hasChildNodes()
Determine if the node has any children. |
NodeInfo |
selectID(String id)
Get the element with a given ID. |
void |
setBaseURI(String uri)
Set the base URI of this document node |
void |
setConfiguration(Configuration config)
Set the Configuration that contains this document |
void |
setLineNumbering()
Set line numbering on |
void |
setSystemId(String uri)
Set the system id of this node |
Methods inherited from class net.sf.saxon.tree.NodeImpl |
---|
atomize, compareOrder, equals, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getDisplayName, getFingerprint, getLocalPart, getNameCode, getNextInDocument, getParent, getPrefix, getPreviousInDocument, getPublicId, getTypeAnnotation, getTypedValue, getURI, hashCode, isSameNodeInfo, iterateAxis, iterateAxis |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.om.NodeInfo |
---|
atomize, compareOrder, equals, getAttributeValue, getDeclaredNamespaces, getDisplayName, getFingerprint, getLocalPart, getNameCode, getParent, getPrefix, getStringValue, getTypeAnnotation, getURI, hasChildNodes, hashCode, isSameNodeInfo, iterateAxis, iterateAxis |
Methods inherited from interface net.sf.saxon.om.Item |
---|
getStringValueCS, getTypedValue |
Constructor Detail |
---|
public DocumentImpl()
Method Detail |
---|
public void setConfiguration(Configuration config)
public Configuration getConfiguration()
getConfiguration
in interface NodeInfo
getConfiguration
in class NodeImpl
public NamePool getNamePool()
getNamePool
in interface NodeInfo
getNamePool
in class NodeImpl
public int getDocumentNumber()
getDocumentNumber
in interface NodeInfo
getDocumentNumber
in class NodeImpl
public void setSystemId(String uri)
setSystemId
in interface Source
setSystemId
in class NodeImpl
public String getSystemId()
getSystemId
in interface Source
getSystemId
in interface SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in class NodeImpl
public void setBaseURI(String uri)
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class NodeImpl
public void setLineNumbering()
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface NodeInfo
getLineNumber
in class NodeImpl
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public final NodeInfo getNextSibling()
getNextSibling
in class NodeImpl
public final NodeInfo getPreviousSibling()
getPreviousSibling
in class NodeImpl
public ElementImpl getDocumentElement()
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class NodeImpl
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class NodeImpl
public void generateId(FastStringBuffer buffer)
generateId
in interface NodeInfo
generateId
in class NodeImpl
buffer
- a buffer into which will be placed a string based on the document numberpublic NodeInfo selectID(String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()
public String[] getUnparsedEntity(String name)
getUnparsedEntity
in interface DocumentInfo
name
- the name of the entity
public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException
copy
in interface NodeInfo
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 NodeInfo.NO_NAMESPACES
,
NodeInfo.LOCAL_NAMESPACES
, NodeInfo.ALL_NAMESPACES
copyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copiedlocationId
- If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
for the original node is to be copied; in this case the Receiver must be
a LocationCopier
XPathException
public final boolean hasChildNodes()
hasChildNodes
in interface NodeInfo
hasChildNodes
in class NodeImpl
true
if the node has any children,
false
if the node has no children.public final NodeInfo getFirstChild()
getFirstChild
in class NodeImpl
public final NodeInfo getLastChild()
getLastChild
in class NodeImpl
public String getStringValue()
Item.getStringValueCS()
public CharSequence getStringValueCS()
NodeImpl
getStringValueCS
in interface Item
getStringValueCS
in interface ValueRepresentation
getStringValueCS
in class NodeImpl
Item.getStringValue()
public void addChild(NodeImpl node, int index)
node
- the node to be added as a child of this nodeindex
- the position where the child is to be addedpublic void compact(int size)
size
- the number of actual children
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |