public final class TinyDocumentImpl extends TinyParentNodeImpl implements DocumentInfo
NODE_LETTER, nodeNr, parent, tree
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
TinyDocumentImpl(TinyTree tree) |
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.
|
java.lang.String |
getBaseURI()
Get the base URI of this root node.
|
Configuration |
getConfiguration()
Get the configuration previously set using setConfiguration
|
DocumentInfo |
getDocumentRoot()
Get the root (document) node
|
(package private) java.util.List |
getElementList(int fingerprint)
Get a list containing all the elements with a given element name
|
int |
getLineNumber()
Get the line number of this root node.
|
int |
getNodeKind()
Return the type of node.
|
NodeInfo |
getParent()
Find the parent node of this node.
|
NodeInfo |
getRoot()
Get the root node
|
java.lang.String |
getSystemId()
Get the system id of this root node
|
TinyTree |
getTree()
Get the tree containing this node
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given nameID if there is one, or null if not.
|
(package private) void |
registerID(NodeInfo e,
java.lang.String id)
Register a unique element ID.
|
NodeInfo |
selectID(java.lang.String id)
Get the element with a given ID.
|
void |
setBaseURI(java.lang.String uri)
Set the base URI of this document node
|
void |
setConfiguration(Configuration config)
Set the Configuration that contains this document
|
void |
setSystemId(java.lang.String uri)
Set the system id of this node
|
(package private) 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() |
getStringValue, getStringValue, getStringValueCS, hasChildNodes
atomize, compareOrder, equals, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNameCode, getNamePool, getNodeNumber, getParentNodeNr, getPrefix, getPublicId, getSequenceNumber, getTypeAnnotation, getTypedValue, getURI, hashCode, isAncestorOrSelf, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxis, sendNamespaceDeclarations, setParentNode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
atomize, compareOrder, equals, getAttributeValue, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNameCode, getNamePool, getPrefix, getStringValue, getTypeAnnotation, getURI, hasChildNodes, hashCode, isSameNodeInfo, iterateAxis, iterateAxis, sendNamespaceDeclarations
getStringValueCS, getTypedValue
public TinyDocumentImpl(TinyTree tree)
public TinyTree getTree()
public void setConfiguration(Configuration config)
public Configuration getConfiguration()
getConfiguration
in interface NodeInfo
getConfiguration
in class TinyNodeImpl
public void setSystemId(java.lang.String uri)
setSystemId
in interface javax.xml.transform.Source
setSystemId
in class TinyNodeImpl
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Source
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in class TinyNodeImpl
public void setBaseURI(java.lang.String uri)
public java.lang.String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class TinyNodeImpl
public int getLineNumber()
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface NodeInfo
getLineNumber
in class TinyNodeImpl
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class TinyNodeImpl
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class TinyNodeImpl
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class TinyNodeImpl
public void generateId(FastStringBuffer buffer)
generateId
in interface NodeInfo
generateId
in class TinyNodeImpl
buffer
- to contain an identifier based on the document numberAxisIterator getAllElements(int fingerprint)
java.util.List getElementList(int fingerprint)
fingerprint
- the fingerprint of the element namevoid registerID(NodeInfo e, java.lang.String id)
e
- The NodeInfo (always an element) having a particular unique ID valueid
- The unique ID value. The caller is responsible for checking that this
is a valid NCName.public NodeInfo selectID(java.lang.String id)
selectID
in interface DocumentInfo
id
- The unique ID of the required element, previously registered using registerID()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 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
public void showSize()