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, PullEvent, Item, NodeInfo, Sequence, SiblingCountingNode, VirtualNode
  Direct Known Subclasses:
    AxiomDocumentWrapper, 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.
  Author:
    Michael H. Kay

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `AxiomParentNodeWrapper.ChildWrappingIterator` Iterator over the children of a supplied node
    `protected class` | `AxiomParentNodeWrapper.DescendantWrappingIterator` Iterator over the descendants of a supplied node (optionally including the node itself)

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.axiom.om.OMContainer` | `node`

    - ### Fields inherited from interface net.sf.saxon.om.NodeInfo

      `ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AxiomParentNodeWrapper(org.apache.axiom.om.OMContainer node)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AtomicSequence` | `atomize()` Get the typed value.
    `void` | `generateId(FastStringBuffer buffer)` Get a character string that uniquely identifies this node.
    `CharSequence` | `getStringValueCS()` Get the value of the item as a CharSequence.
    `Object` | `getUnderlyingNode()` Get the underlying Axiom node, to implement the VirtualNode interface
    `boolean` | `hasChildNodes()` Determine whether the node has any children.
    `protected AxisIterator<NodeInfo>` | `iterateChildren(NodeTest nodeTest)` Return an iterator over the children of this node.
    `protected AxisIterator<NodeInfo>` | `iterateDescendants(NodeTest nodeTest, boolean includeSelf)` Return an iterator over the descendants of this node.

    - ### Methods inherited from class net.sf.saxon.tree.wrapper.AbstractNodeWrapper

      `comparePosition, copy, equals, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLineNumber, getNameCode, getNamePool, getRealNode, getRoot, getSchemaType, getStringValue, getSystemId, getTypeAnnotation, hashCode, head, isId, isIdref, isNilled, isSameNodeInfo, iterate, iterateAttributes, iterateAxis, iterateAxis, iterateSiblings, setSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.tree.wrapper.SiblingCountingNode

      `getSiblingPosition`

    - ### Methods inherited from interface net.sf.saxon.om.NodeInfo

      `compareOrder, comparePosition, copy, equals, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeKind, getParent, getPrefix, getRoot, getSchemaType, getStringValue, getSystemId, getTypeAnnotation, getURI, hashCode, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxis`

    - ### Methods inherited from interface javax.xml.transform.Source

      `setSystemId`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `head, iterate`

- - ### Field Detail

    - #### node

          protected org.apache.axiom.om.OMContainer node

  - ### Constructor Detail

    - #### AxiomParentNodeWrapper

          protected AxiomParentNodeWrapper(org.apache.axiom.om.OMContainer node)

  - ### Method Detail

    - #### getUnderlyingNode

          public Object getUnderlyingNode()

      Get the underlying Axiom node, to implement the VirtualNode interface
      Specified by:
        `getUnderlyingNode` in interface `VirtualNode`
      Returns:
        The underlying node.

    - #### atomize

          public AtomicSequence atomize()

      Get the typed value.
      Specified by:
        `atomize` in interface `NodeInfo`
      Overrides:
        `atomize` in class `AbstractNodeWrapper`
      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.

    - #### getStringValueCS

          public CharSequence getStringValueCS()

      Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.
      Specified by:
        `getStringValueCS` in interface `Item`
      Returns:
        the string value of the item
      See Also:
        `Item.getStringValue()`

    - #### 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:
        `hasChildNodes` in interface `NodeInfo`
      Overrides:
        `hasChildNodes` in class `AbstractNodeWrapper`
      Returns:
        True if the node has one or more children

    - #### generateId

          public void generateId(FastStringBuffer buffer)

      Get a character string that uniquely identifies this node. Note: a.isSameNode(b) if and only if generateId(a)==generateId(b)
      Specified by:
        `generateId` in interface `NodeInfo`
      Parameters:
        `buffer` - a buffer to contain a string that uniquely identifies this node, across all documents

    - #### iterateChildren

          protected final AxisIterator<NodeInfo> iterateChildren(NodeTest nodeTest)

      Description copied from class: `AbstractNodeWrapper`
      Return 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:
        `iterateChildren` in class `AbstractNodeWrapper`
      Parameters:
        `nodeTest` - a test that the returned attributes must satisfy
      Returns:
        an iterator over the child nodes, in document order.

    - #### iterateDescendants

          protected AxisIterator<NodeInfo> iterateDescendants(NodeTest nodeTest,
                                                  boolean includeSelf)

      Description copied from class: `AbstractNodeWrapper`
      Return an iterator over the descendants of this node. This method is only called after checking that the node is an element or document node.
      Specified by:
        `iterateDescendants` in class `AbstractNodeWrapper`
      Parameters:
        `nodeTest` - a test that the returned descendants must satisfy
        `includeSelf` - true if this node is to be included in the result
      Returns:
        an iterator over the sibling nodes, in axis order.

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.