Package net.sf.saxon.option.jdom2
Class JDOM2DocumentWrapper
- java.lang.Object
-
- net.sf.saxon.om.GenericTreeInfo
-
- net.sf.saxon.option.jdom2.JDOM2DocumentWrapper
-
- All Implemented Interfaces:
javax.xml.transform.Source
,TreeInfo
public class JDOM2DocumentWrapper extends GenericTreeInfo
The tree information for a tree acting as a wrapper for a JDOM2 Document.- Since:
- 9.7: this class no longer implements NodeInfo; the document node itself is now an instance of JDOM2NodeWrapper.
-
-
Field Summary
Fields Modifier and Type Field Description protected Configuration
config
protected long
documentNumber
-
Fields inherited from class net.sf.saxon.om.GenericTreeInfo
root
-
-
Constructor Summary
Constructors Constructor Description JDOM2DocumentWrapper(org.jdom2.Document doc, Configuration config)
Create a Saxon wrapper for a JDOM document
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeInfo
selectID(java.lang.String id, boolean getParent)
Get the element with a given ID, if anyJDOM2NodeWrapper
wrap(java.lang.Object node)
Wrap a node in the JDOM document.-
Methods inherited from class net.sf.saxon.om.GenericTreeInfo
getConfiguration, getDocumentNumber, getPublicId, getRootNode, getSpaceStrippingRule, getSystemId, getUnparsedEntity, getUnparsedEntityNames, getUserData, isStreamed, setConfiguration, setDocumentNumber, setRootNode, setSpaceStrippingRule, setSystemId, setUserData
-
-
-
-
Field Detail
-
config
protected Configuration config
-
documentNumber
protected long documentNumber
-
-
Constructor Detail
-
JDOM2DocumentWrapper
public JDOM2DocumentWrapper(org.jdom2.Document doc, Configuration config)
Create a Saxon wrapper for a JDOM document- Parameters:
doc
- The JDOM documentconfig
- The Saxon Configuration
-
-
Method Detail
-
wrap
public JDOM2NodeWrapper wrap(java.lang.Object node)
Wrap a node in the JDOM document.- Parameters:
node
- The node to be wrapped. This must be a node in the same document (the system does not check for this).- Returns:
- the wrapping NodeInfo object
-
selectID
public NodeInfo selectID(java.lang.String id, boolean getParent)
Get the element with a given ID, if any- Specified by:
selectID
in interfaceTreeInfo
- Overrides:
selectID
in classGenericTreeInfo
- Parameters:
id
- the required ID valuegetParent
-- Returns:
- the element node with the given ID if there is one, otherwise null.
-
-