com.saxonica.stream.om

## Class FleetingParentNode

- java.lang.Object
- - com.saxonica.stream.om.FleetingNode
  - - com.saxonica.stream.om.FleetingParentNode

- All Implemented Interfaces:
    Source, PullEvent, Item, NodeInfo, Sequence
  Direct Known Subclasses:
    FleetingDocumentNode, FleetingElementNode

      public abstract class FleetingParentNode
      extends FleetingNode

  A streamed document or element node. This abstract class maintains information about the number of child nodes that have been read, broken down by node kind and node name, so that positional preducates can be supported in patterns and child selections

- - ### Field Summary

    - ### Fields inherited from class com.saxonica.stream.om.FleetingNode

      `root`

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

      `ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FleetingParentNode()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPosition(NodeTest nodeTest)` Get the position of the last child node encountered.
    `void` | `incrementChildCount(int nodeKind, NodeName name)`

    - ### Methods inherited from class com.saxonica.stream.om.FleetingNode

      `atomize, compareOrder, comparePosition, copy, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeKind, getParent, getPrefix, getRoot, getSchemaType, getStringValue, getStringValueCS, getSystemId, getTypeAnnotation, getURI, hasChildNodes, head, isId, isIdref, isNilled, isSameNodeInfo, iterate, iterateAxis, iterateAxis, setNodeKind, setNodeName, setParent, setStringValue, setSystemId, setTypeAnnotation`

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

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

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

      `equals, hashCode`

- - ### Constructor Detail

    - #### FleetingParentNode

          public FleetingParentNode()

  - ### Method Detail

    - #### incrementChildCount

          public void incrementChildCount(int nodeKind,
                                 NodeName name)

    - #### getPosition

          public int getPosition(NodeTest nodeTest)
                          throws XPathException

      Get the position of the last child node encountered. This method must be called AFTER incrementChildCount has been called in respect of that child.
      Parameters:
        `nodeTest` - filters the nodes to be counted
      Returns:
        the number of previous siblings (plus the current node) that match the node test
      Throws:
        `XPathException` - for an unsupported kind of NodeTest

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