public final class TinyDocumentImpl extends TinyParentNodeImpl implements DocumentInfo
NODE_LETTER, nodeNr, parent, treeALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACESEMPTY_VALUE_ARRAY| Constructor and Description |
|---|
TinyDocumentImpl(TinyTree tree) |
| Modifier and Type | Method and Description |
|---|---|
Value |
atomize()
Get the typed value.
|
void |
copy(Receiver out,
int copyOptions,
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
|
int |
getTypeAnnotation()
Get the type annotation of this node, if any.
|
SequenceIterator |
getTypedValue()
Get the typed value of the item.
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given nameID if there is one, or null if not.
|
java.util.Iterator<java.lang.String> |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
|
java.lang.Object |
getUserData(java.lang.String key)
Get user data held in the document node.
|
int |
hashCode()
The hashCode() method obeys the contract for hashCode(): that is, if two objects are equal
(represent the same node) then they must have the same hashCode()
|
(package private) void |
registerID(NodeInfo e,
java.lang.String id)
Register a unique element ID.
|
NodeInfo |
selectID(java.lang.String id,
boolean getParent)
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 |
setUserData(java.lang.String key,
java.lang.Object value)
Set user data on the document node.
|
void |
showSize() |
getStringValue, getStringValueCS, getStringValueCS, hasChildNodescompareOrder, equals, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNameCode, getNamePool, getNodeNumber, getParentNodeNr, getPrefix, getPublicId, getSequenceNumber, getURI, isAncestorOrSelf, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxis, setParentNodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompareOrder, equals, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNameCode, getNamePool, getPrefix, getStringValue, getURI, hasChildNodes, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxisgetStringValueCSpublic TinyDocumentImpl(TinyTree tree)
public TinyTree getTree()
getTree in class TinyNodeImplpublic void setConfiguration(Configuration config)
public Configuration getConfiguration()
getConfiguration in interface NodeInfogetConfiguration in class TinyNodeImplpublic void setSystemId(java.lang.String uri)
setSystemId in interface javax.xml.transform.SourcesetSystemId in class TinyNodeImplpublic java.lang.String getSystemId()
getSystemId in interface javax.xml.transform.SourcegetSystemId in interface javax.xml.transform.SourceLocatorgetSystemId in interface NodeInfogetSystemId in class TinyNodeImplpublic void setBaseURI(java.lang.String uri)
public java.lang.String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class TinyNodeImplpublic int getLineNumber()
getLineNumber in interface javax.xml.transform.SourceLocatorgetLineNumber in interface NodeInfogetLineNumber in class TinyNodeImplpublic final int getNodeKind()
getNodeKind in interface NodeInfoTypepublic NodeInfo getParent()
getParent in interface NodeInfogetParent in class TinyNodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class TinyNodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class TinyNodeImplpublic void generateId(FastStringBuffer buffer)
generateId in interface NodeInfogenerateId in class TinyNodeImplbuffer - to contain an identifier based on the document numberpublic Value atomize() throws XPathException
Item.getTypedValue(). However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.atomize in interface NodeInfoXPathExceptionpublic SequenceIterator getTypedValue() throws XPathException
getTypedValue in interface ItemXPathException - where no typed value is available, for example in the case of
an element with complex contentAxisIterator 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, boolean getParent)
selectID in interface DocumentInfoid - The unique ID of the required element, previously registered using registerID()getParent - void setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
public java.util.Iterator<java.lang.String> getUnparsedEntityNames()
getUnparsedEntityNames in interface DocumentInfopublic java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity in interface DocumentInfoname - the name of the entitypublic int getTypeAnnotation()
getTypeAnnotation in interface NodeInfogetTypeAnnotation in class TinyNodeImplpublic void copy(Receiver out, int copyOptions, int locationId) throws XPathException
copy in interface NodeInfoout - the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.copyOptions - a selection of the options defined in CopyOptionslocationId - If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location informationXPathExceptionpublic void showSize()
public int hashCode()
hashCode in interface NodeInfohashCode in class TinyNodeImplpublic void setUserData(java.lang.String key,
java.lang.Object value)
getUserData(java.lang.String)setUserData in interface DocumentInfokey - A string giving the name of the property to be set. Clients are responsible
for choosing a key that is likely to be unique. Must not be null. Keys used internally
by Saxon are prefixed "saxon:".value - The value to be set for the property. May be null, which effectively
removes the existing value for the property.public java.lang.Object getUserData(java.lang.String key)
setUserData(java.lang.String, java.lang.Object)getUserData in interface DocumentInfokey - A string giving the name of the property to be retrieved.