Package net.sf.saxon.option.jdom
Class JDOMDocumentWrapper
- java.lang.Object
-
- net.sf.saxon.om.GenericTreeInfo
-
- net.sf.saxon.option.jdom.JDOMDocumentWrapper
-
public class JDOMDocumentWrapper extends GenericTreeInfo
The tree information for a tree acting as a wrapper for a JDOM Document.- Since:
- 9.7: this class no longer implements NodeInfo; the document node itself is now an instance of JDOMNodeWrapper.
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.om.GenericTreeInfo
root
-
-
Constructor Summary
Constructors Constructor Description JDOMDocumentWrapper(org.jdom.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 booleanisTyped()Ask whether the document contains any nodes whose type annotation is anything other than UNTYPEDNodeInfoselectID(String id, boolean getParent)Get the element with a given ID, if anyJDOMNodeWrapperwrap(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
-
-
-
-
Constructor Detail
-
JDOMDocumentWrapper
public JDOMDocumentWrapper(org.jdom.Document doc, Configuration config)Create a Saxon wrapper for a JDOM document- Parameters:
doc- The JDOM documentconfig- The Saxon Configuration
-
-
Method Detail
-
wrap
public JDOMNodeWrapper wrap(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
-
isTyped
public boolean isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than UNTYPED- Specified by:
isTypedin interfaceTreeInfo- Overrides:
isTypedin classGenericTreeInfo- Returns:
- true if the document contains elements whose type is other than UNTYPED
-
selectID
public NodeInfo selectID(String id, boolean getParent)
Get the element with a given ID, if any- Specified by:
selectIDin interfaceTreeInfo- Overrides:
selectIDin classGenericTreeInfo- Parameters:
id- the required ID valuegetParent-- Returns:
- the element node with the given ID if there is one, otherwise null.
-
-