Package com.icl.saxon.jdom
Class DocumentWrapper
- java.lang.Object
-
- com.icl.saxon.jdom.NodeWrapper
-
- com.icl.saxon.jdom.DocumentWrapper
-
- All Implemented Interfaces:
DocumentInfo
,NodeInfo
,javax.xml.transform.Source
public class DocumentWrapper extends NodeWrapper implements DocumentInfo
The root node of an XPath tree. (Or equivalently, the tree itself).This class should have been named Root; it is used not only for the root of a document, but also for the root of a result tree fragment, which is not constrained to contain a single top-level element.
- Author:
- Michael H. Kay
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.icl.saxon.jdom.NodeWrapper
NodeWrapper.AncestorEnumeration
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
baseURI
protected java.util.Hashtable
keyTable
protected NamePool
namePool
-
Fields inherited from class com.icl.saxon.jdom.NodeWrapper
docWrapper, index, node, nodeType, parent
-
-
Constructor Summary
Constructors Constructor Description DocumentWrapper(org.jdom.Document doc, java.lang.String baseURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Hashtable
getKeyIndex(KeyManager keyManager, int fingerprint)
Get the index for a given keyNamePool
getNamePool()
Get the name pool used for the names in this documentjava.lang.String
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given nameNodeInfo
selectID(java.lang.String id)
Get the element with a given ID, if anyvoid
setKeyIndex(KeyManager keyManager, int fingerprint, java.util.Hashtable index)
Set the index for a given keyvoid
setNamePool(NamePool pool)
Set the name pool used for all names in this document-
Methods inherited from class com.icl.saxon.jdom.NodeWrapper
compareOrder, copy, copyStringValue, generateId, getAttributeValue, getAttributeValue, getBaseURI, getDisplayName, getDocumentRoot, getEnumeration, getFingerprint, getLineNumber, getLocalName, getNameCode, getNode, getNodeType, getParent, getPrefix, getStringValue, getSystemId, getURI, hasChildNodes, isSameNodeInfo, makeWrapper, outputNamespaceNodes, setSystemId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.icl.saxon.om.NodeInfo
compareOrder, copy, copyStringValue, generateId, getAttributeValue, getAttributeValue, getBaseURI, getDisplayName, getDocumentRoot, getEnumeration, getFingerprint, getLineNumber, getLocalName, getNameCode, getNodeType, getParent, getPrefix, getStringValue, getSystemId, getURI, hasChildNodes, isSameNodeInfo, outputNamespaceNodes
-
-
-
-
Field Detail
-
keyTable
protected java.util.Hashtable keyTable
-
namePool
protected NamePool namePool
-
baseURI
protected java.lang.String baseURI
-
-
Method Detail
-
setNamePool
public void setNamePool(NamePool pool)
Set the name pool used for all names in this document- Specified by:
setNamePool
in interfaceDocumentInfo
-
getNamePool
public NamePool getNamePool()
Get the name pool used for the names in this document- Specified by:
getNamePool
in interfaceDocumentInfo
-
selectID
public NodeInfo selectID(java.lang.String id)
Get the element with a given ID, if any- Specified by:
selectID
in interfaceDocumentInfo
- Parameters:
id
- the required ID value- Returns:
- null: JDOM does not provide any information about attribute types.
-
getKeyIndex
public java.util.Hashtable getKeyIndex(KeyManager keyManager, int fingerprint)
Get the index for a given key- Specified by:
getKeyIndex
in interfaceDocumentInfo
- Parameters:
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)- Returns:
- The index, if one has been built, in the form of a Hashtable that maps the key value to a list of nodes having that key value. If no index has been built, returns null.
-
setKeyIndex
public void setKeyIndex(KeyManager keyManager, int fingerprint, java.util.Hashtable index)
Set the index for a given key- Specified by:
setKeyIndex
in interfaceDocumentInfo
- Parameters:
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)index
- the index, in the form of a Hashtable that maps the key value to a list of nodes having that key value
-
getUnparsedEntity
public java.lang.String getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name- Specified by:
getUnparsedEntity
in interfaceDocumentInfo
- Parameters:
name
- the name of the entity- Returns:
- null: JDOM does not provide access to unparsed entities
-
-