Package net.sf.saxon.s9api
Class XdmJNode
java.lang.Object
net.sf.saxon.s9api.XdmValue
net.sf.saxon.s9api.XdmItem
net.sf.saxon.s9api.XdmJNode
This class represents a JNode in the XDM data model. An
XdmJNode is an XdmItem, and is therefore an
XdmValue in its own right, and may also participate as one item within a sequence value.
An XdmJNode is implemented as a wrapper around an object of type JNode.
The XdmJNode interface exposes basic properties of the JNode, such as its parent, its
selector, its position, and its contained value.
- Since:
- 13.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the content property of the JNode.intGet the position of the JNode, as an integerGet the selector of the JNode, as an XdmAtomicValueGet the underlying implementation object representing the JNode.Methods inherited from class net.sf.saxon.s9api.XdmItem
asMap, getStringValue, getUnicodeStringValue, isAtomicValue, isNode, matches, size, stream, wrapItem, wrapItem, wrapItemMethods inherited from class net.sf.saxon.s9api.XdmValue
append, documentOrder, isEmpty, isEmptySequence, itemAt, iterator, makeSequence, makeValue, matches, select, select, select, subsequence, toString, where, wrap, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
XdmJNode
Construct anXdmJNodeas a wrapper around an existing JNode object. This constructor is intended primarily for system use.- Parameters:
node- theJNodeobject to be wrapped. This can be retrieved using thegetUnderlyingValue()method.
-
-
Method Details
-
getContent
Get the content property of the JNode.- Returns:
- the value of the content property
-
getUnderlyingValue
Get the underlying implementation object representing the JNode. This method allows access to lower-level Saxon functionality, including classes and methods that offer no guarantee of stability across releases.- Overrides:
getUnderlyingValuein classXdmItem- Returns:
- the underlying implementation object representing the JNode
-
getSelector
Get the selector of the JNode, as an XdmAtomicValue- Returns:
- the selector of the JNode. Returns null for a root JNode; otherwise the key value for a JNode representing an entry in a map, or the 1-based index for a JNode representing a member of an array.
-
getPosition
public int getPosition()Get the position of the JNode, as an integer- Returns:
- the integer of the JNode. Returns -1 for a root JNode; otherwise the position of the JNode within a sequence-valued parent (normally 1, since array members and map entry values are usually singletons)
-