public class GenericTreeInfo extends java.lang.Object implements TreeInfo
Constructor and Description |
---|
GenericTreeInfo(Configuration config)
Create the TreeInfo
|
GenericTreeInfo(Configuration config,
NodeInfo root)
Create the TreeInfo
|
Modifier and Type | Method and Description |
---|---|
Configuration |
getConfiguration()
Get the Configuration to which this document belongs
|
long |
getDocumentNumber()
Get the document number, which identifies this document uniquely within a Configuration
|
java.lang.String |
getPublicId()
Get the Public ID of the entity containing the node.
|
NodeInfo |
getRootNode()
Get the NodeInfo object representing the root of the tree (not necessarily a document node)
|
java.lang.String |
getSystemId()
Get the systemId of the document node
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
|
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.
|
boolean |
isStreamed() |
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than
UNTYPED
|
NodeInfo |
selectID(java.lang.String id,
boolean getParent)
Get the element with a given ID, if any
|
void |
setConfiguration(Configuration config)
Set the configuration (containing the name pool used for all names in this document)
|
void |
setDocumentNumber(long documentNumber)
Set the document number, which identifies this document uniquely within a Configuration
|
void |
setRootNode(NodeInfo root)
Set the root node of the tree
|
void |
setSystemId(java.lang.String systemId)
Set the systemId of the document node (for most implementations, this is likely to be the systemId
of the entire tree
|
void |
setUserData(java.lang.String key,
java.lang.Object value)
Set user data on the document node.
|
public GenericTreeInfo(Configuration config)
config
- the Saxon Configurationpublic GenericTreeInfo(Configuration config, NodeInfo root)
config
- the Saxon Configurationroot
- the root nodejava.lang.IllegalArgumentException
- if the supplied node is not parentlesspublic void setConfiguration(Configuration config)
config
- the configurationpublic Configuration getConfiguration()
getConfiguration
in interface TreeInfo
public void setRootNode(NodeInfo root)
root
- the root node (not necessarily a document nodejava.lang.IllegalArgumentException
- if the supplied node is not parentlesspublic NodeInfo getRootNode()
getRootNode
in interface TreeInfo
public void setSystemId(java.lang.String systemId)
setSystemId
in interface javax.xml.transform.Source
systemId
- the system IDpublic java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Source
public java.lang.String getPublicId()
public long getDocumentNumber()
getDocumentNumber
in interface TreeInfo
public void setDocumentNumber(long documentNumber)
documentNumber
- the document number allocated to this documentpublic boolean isTyped()
public NodeInfo selectID(java.lang.String id, boolean getParent)
selectID
in interface TreeInfo
id
- the required ID valuegetParent
- true if running the element-with-id() function rather than the id()
function; the difference is that in the case of an element of type xs:ID, the parent of
the element should be returned, not the element itself.public java.util.Iterator<java.lang.String> getUnparsedEntityNames()
getUnparsedEntityNames
in interface TreeInfo
public java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity
in interface TreeInfo
name
- the name of the entitypublic void setUserData(java.lang.String key, java.lang.Object value)
getUserData(java.lang.String)
setUserData
in interface TreeInfo
key
- 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 effectivelypublic java.lang.Object getUserData(java.lang.String key)
setUserData(java.lang.String, java.lang.Object)
getUserData
in interface TreeInfo
key
- A string giving the name of the property to be retrieved.public boolean isStreamed()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.