Package net.sf.saxon.ma.jnode
Class RootJNode
java.lang.Object
net.sf.saxon.ma.jnode.JNode
net.sf.saxon.ma.jnode.RootJNode
- All Implemented Interfaces:
GNode,GroundedValue,Item,Sequence
A root JNode that wraps a map or array
-
Constructor Summary
ConstructorsConstructorDescriptionRootJNode(MapOrArray value) Construct a JNode that wraps a given map or array -
Method Summary
Modifier and TypeMethodDescriptionintcompareOrder(GNode other) Compare document order of this node against another node.voidgenerateId(StringBuilder buffer) Construct a character string that uniquely identifies this node.Get the children of the JNodeGet the value/content property of the JNodeGet the parent property of the JNodeintGet the position property of the JNodeGet the selector property of the JNodeiterateChildAxis(NodePredicate predicate) Get an iterator over the child axis, starting at this node; the nodes will be in document order.iterateFollowingSiblingAxis(NodePredicate predicate) Get an iterator over the following-sibling axis, starting at this node; the nodes will be in document order.iteratePrecedingSiblingAxis(NodePredicate predicate) Get an iterator over the preceding-sibling axis, starting at this node; the nodes will be in reverse document order.static RootJNodeobtainRootJNode(MapOrArray value) Methods inherited from class net.sf.saxon.ma.jnode.JNode
atomize, getGenre, getNodeKind, getRoot, getUnicodeStringValue, hasChildNodes, toShortString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GNode
iterateAncestorAxis, iterateAncestorOrSelfAxis, iterateAttributeAxis, iterateDescendantAxis, iterateDescendantOrSelfAxis, iterateFollowingAxis, iterateFollowingOrSelfAxis, iterateFollowingSiblingOrSelfAxis, iterateNamespaceAxis, iterateParentAxis, iteratePrecedingAxis, iteratePrecedingOrSelfAxis, iteratePrecedingSiblingOrSelfAxis, iterateSelfAxisMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLabel, getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
RootJNode
Construct a JNode that wraps a given map or array- Parameters:
value- the map or array to be wrapped
-
-
Method Details
-
obtainRootJNode
-
getContent
Get the value/content property of the JNode- Specified by:
getContentin classJNode- Returns:
- the wrapped value/content
-
getPosition
public int getPosition()Get the position property of the JNode- Specified by:
getPositionin classJNode- Returns:
- always absent for a root JNode: return -1
-
getSelector
Get the selector property of the JNode- Specified by:
getSelectorin classJNode- Returns:
- always absent for a root JNode: return null
-
getParent
Get the parent property of the JNode -
getChildren
Get the children of the JNode- Returns:
- a sequence of JNodes that wrap the array members or map entries
-
iterateChildAxis
Get an iterator over the child axis, starting at this node; the nodes will be in document order.- Parameters:
predicate- a condition that the nodes must satisfy, or null- Returns:
- the required iterator
-
iterateFollowingSiblingAxis
Get an iterator over the following-sibling axis, starting at this node; the nodes will be in document order.- Parameters:
predicate- a condition that the nodes must satisfy, or null- Returns:
- the required iterator
-
iteratePrecedingSiblingAxis
Get an iterator over the preceding-sibling axis, starting at this node; the nodes will be in reverse document order.- Parameters:
predicate- a condition that the nodes must satisfy, or null- Returns:
- the required iterator
-
compareOrder
Compare document order of this node against another node.The other node must always be in the same tree; the effect of calling this method when the two nodes are in different trees is undefined. To obtain a global ordering of nodes, the application should first compare the result of getDocumentNumber(), and only if the document number is the same should compareOrder() be called.
- Parameters:
other- the other node- Returns:
- -1 if this node precedes the other, 0 if they are the same node, +1 if this node follows the other
-
generateId
Construct a character string that uniquely identifies this node. Note: a.isSameNode(b) if and only if generateId(a)==generateId(b)- Parameters:
buffer- a buffer which will be updated to hold a string that uniquely identifies this node, across all documents.- Since:
- 8.7
Changed in Saxon 8.7 to generate the ID value in a client-supplied buffer
-