Package net.sf.saxon.option.axiom
Class AxiomParentNodeWrapper
java.lang.Object
net.sf.saxon.tree.wrapper.AbstractNodeWrapper
net.sf.saxon.option.axiom.AxiomParentNodeWrapper
- All Implemented Interfaces:
Source,SourceLocator,ActiveSource,GroundedValue,Item,NodeInfo,Sequence,Location,SiblingCountingNode,VirtualNode,Locator
- Direct Known Subclasses:
AxiomDocumentNodeWrapper,AxiomElementNodeWrapper
public abstract class AxiomParentNodeWrapper
extends AbstractNodeWrapper
implements SiblingCountingNode
A node in the XDM tree; specifically, a node that wraps an Axiom document node or element node.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classIterator over the children of a supplied nodeprotected classIterator over the descendants of a supplied node (optionally including the node itself) -
Field Summary
FieldsFields inherited from class net.sf.saxon.tree.wrapper.AbstractNodeWrapper
treeInfo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAxiomParentNodeWrapper(org.apache.axiom.om.OMContainer node) -
Method Summary
Modifier and TypeMethodDescriptionatomize()Get the typed value.voidgenerateId(StringBuilder buffer) Get a character string that uniquely identifies this node.org.apache.axiom.om.OMContainerGet the underlying Axiom node, to implement the VirtualNode interfaceGet the string value of the node as a UnicodeString.booleanDetermine whether the node has any children.protected final AxisIteratoriterateChildren(NodeTest nodeTest) Return an iterator over the children of this node.protected AxisIteratoriterateDescendants(NodeTest nodeTest, boolean includeSelf) Return an iterator over the descendants of this node.Methods inherited from class net.sf.saxon.tree.wrapper.AbstractNodeWrapper
equals, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDisplayName, getFingerprint, getLineNumber, getNamePool, getRealNode, getRoot, getSystemId, getTreeInfo, hasFingerprint, hashCode, iterateAttributes, iterateAxis, iterateAxis, iterateSiblings, saveLocation, setSystemIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.s9api.Location
saveLocationMethods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, attributes, children, children, compareOrder, copy, deliver, equals, getAllNamespaces, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getGenre, getLineNumber, getLocalPart, getNamespaceUri, getNodeKind, getParent, getPrefix, getPublicId, getRoot, getSchemaType, getSystemId, getTreeInfo, getURI, hasFingerprint, hashCode, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, iterateAxis, setSystemId, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatableMethods inherited from interface net.sf.saxon.tree.wrapper.SiblingCountingNode
getSiblingPosition
-
Field Details
-
node
protected org.apache.axiom.om.OMContainer node
-
-
Constructor Details
-
AxiomParentNodeWrapper
protected AxiomParentNodeWrapper(org.apache.axiom.om.OMContainer node)
-
-
Method Details
-
getUnderlyingNode
public org.apache.axiom.om.OMContainer getUnderlyingNode()Get the underlying Axiom node, to implement the VirtualNode interface- Specified by:
getUnderlyingNodein interfaceVirtualNode- Returns:
- The underlying node.
-
atomize
Get the typed value.- Specified by:
atomizein interfaceItem- Specified by:
atomizein interfaceNodeInfo- Overrides:
atomizein classAbstractNodeWrapper- Returns:
- the typed value. If requireSingleton is set to true, the result will always be an AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic values.
-
getUnicodeStringValue
Get the string value of the node as a UnicodeString.- Specified by:
getUnicodeStringValuein interfaceGroundedValue- Specified by:
getUnicodeStringValuein interfaceItem- Returns:
- the node's string value
-
hasChildNodes
public boolean hasChildNodes()Determine whether the node has any children.Note: the result is equivalent to
getEnumeration(Axis.CHILD, AnyNodeTest.getInstance()).hasNext()- Specified by:
hasChildNodesin interfaceNodeInfo- Overrides:
hasChildNodesin classAbstractNodeWrapper- Returns:
- True if the node has one or more children
-
generateId
Get a character string that uniquely identifies this node. Note: a.isSameNode(b) if and only if generateId(a)==generateId(b)- Specified by:
generateIdin interfaceNodeInfo- Parameters:
buffer- a buffer to contain a string that uniquely identifies this node, across all documents
-
iterateChildren
Description copied from class:AbstractNodeWrapperReturn an iterator over the children of this node. This method is only called after checking that the node is an element or document.- Specified by:
iterateChildrenin classAbstractNodeWrapper- Parameters:
nodeTest- a test that the returned attributes must satisfy- Returns:
- an iterator over the child nodes, in document order.
-
iterateDescendants
Description copied from class:AbstractNodeWrapperReturn an iterator over the descendants of this node. This method is only called after checking that the node is an element or document node.- Overrides:
iterateDescendantsin classAbstractNodeWrapper- Parameters:
nodeTest- a test that the returned descendants must satisfyincludeSelf- true if this node is to be included in the result- Returns:
- an iterator over the sibling nodes, in axis order.
-