public final class DocumentImpl extends ParentNodeImpl implements DocumentInfo
sequence
index, NODE_LETTER, parent
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, LOCAL_NAMESPACES, NO_NAMESPACES
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
DocumentImpl() |
Modifier and Type | Method and Description |
---|---|
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
|
(package private) AxisIterator |
getAllElements(int fingerprint)
Get a list of all elements with a given name fingerprint
|
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
|
int |
getLineNumber()
Get the line number of this root node.
|
(package private) int |
getLineNumber(int sequence)
Get the line number for an element.
|
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 |
getSystemId()
Get the system id of this root node
|
(package private) 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
|
NodeInfo |
selectID(String id)
Get the element with a given ID.
|
void |
setConfiguration(Configuration config)
Set the Configuration that contains this document
|
(package private) void |
setDocumentElement(ElementImpl e)
Set the top-level element of the document (variously called the root element or the
document element).
|
(package private) void |
setLineNumber(int sequence,
int line)
Set the line number for an element.
|
void |
setLineNumbering()
Set line numbering on
|
(package private) 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
|
(package private) void |
setUnparsedEntity(String name,
String uri,
String publicId)
Set an unparsed entity URI associated with this document.
|
addChild, compact, enumerateChildren, getFirstChild, getLastChild, getNthChild, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, useChildrenArray
atomize, compareOrder, equals, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getDisplayName, getFingerprint, getLocalPart, getNameCode, getNextInDocument, getParent, getPrefix, getPreviousInDocument, getPublicId, getTypeAnnotation, getTypedValue, getURI, hashCode, isSameNodeInfo, iterateAxis, iterateAxis, sendNamespaceDeclarations
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
atomize, compareOrder, equals, getAttributeValue, getDeclaredNamespaces, getDisplayName, getFingerprint, getLocalPart, getNameCode, getParent, getPrefix, getStringValue, getTypeAnnotation, getURI, hasChildNodes, hashCode, isSameNodeInfo, iterateAxis, iterateAxis, sendNamespaceDeclarations
getStringValueCS, getTypedValue
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
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 Source
getSystemId
in interface SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in class NodeImpl
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class NodeImpl
void setSystemId(int seq, String uri)
String getSystemId(int seq)
public void setLineNumbering()
void setLineNumber(int sequence, int line)
int getLineNumber(int sequence)
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()
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 numberAxisIterator getAllElements(int fingerprint)
public NodeInfo selectID(String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()void setUnparsedEntity(String name, String uri, String publicId)
public String[] getUnparsedEntity(String name)
getUnparsedEntity
in interface DocumentInfo
name
- the name of the entitypublic 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 LocationCopierXPathException