Class PathMap.PathMapNode

java.lang.Object
net.sf.saxon.expr.parser.PathMap.PathMapNode
Direct Known Subclasses:
PathMap.PathMapRoot
Enclosing class:
PathMap

public static class PathMap.PathMapNode extends Object
A node in the path map. A node holds a set of arcs, each representing a link to another node in the path map.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Create a node in the PathMap (initially with no arcs)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether the path is entirely within a streamable snapshot of a streamed document: that is, it must only navigate to ancestors and to attributes of ancestors
    createArc(int axis, NodeTest test)
    Create a new arc
    void
    createArc(int axis, NodeTest test, PathMap.PathMapNode target)
    Create a new arc to an existing target
    Get the arcs emanating from this node in the PathMap
    boolean
    Test whether there are any returnable nodes reachable from this node by zero or more arcs
    boolean
    Ask whether the path has unknown dependencies, typically because a node reached by the path is supplied as an argument to a user-defined function
    boolean
    Ask whether the typed value (or string value) of the node reached by this path will be required.
    boolean
    Ask whether the node represents a value that is returnable as the result of the supplied expression, rather than merely a node that is visited en route
    void
    Indicate that the typed value or string value of the node reached by this path will be used.
    void
    Indicate that the path has unknown dependencies, typically because a node reached by the path is supplied as an argument to a user-defined function
    void
    setReturnable(boolean returnable)
    Indicate that the node represents a value that is returnable as the result of the supplied expression, rather than merely a node that is visited en route

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PathMapNode

      protected PathMapNode()
      Create a node in the PathMap (initially with no arcs)
  • Method Details

    • createArc

      public PathMap.PathMapNode createArc(int axis, NodeTest test)
      Create a new arc
      Parameters:
      axis - the axis of this step
      test - the node test of this step
      Returns:
      the newly-constructed target of the new arc
    • createArc

      public void createArc(int axis, NodeTest test, PathMap.PathMapNode target)
      Create a new arc to an existing target
      Parameters:
      axis - the axis of this step
      test - the node test of this step
      target - the target node of the new arc
    • getArcs

      public PathMap.PathMapArc[] getArcs()
      Get the arcs emanating from this node in the PathMap
      Returns:
      the arcs, each representing an AxisStep. The order of arcs in the array is undefined.
    • setReturnable

      public void setReturnable(boolean returnable)
      Indicate that the node represents a value that is returnable as the result of the supplied expression, rather than merely a node that is visited en route
      Parameters:
      returnable - true if the node represents a final result of the expression
    • isReturnable

      public boolean isReturnable()
      Ask whether the node represents a value that is returnable as the result of the supplied expression, rather than merely a node that is visited en route
      Returns:
      true if the node represents a final result of the expression
    • hasReachableReturnables

      public boolean hasReachableReturnables()
      Test whether there are any returnable nodes reachable from this node by zero or more arcs
      Returns:
      true if any arcs lead to a pathmap node representing a returnable XDM node
    • setAtomized

      public void setAtomized()
      Indicate that the typed value or string value of the node reached by this path will be used. Note that because this is being used only to determine navigation paths, the property does not need to be set when nodes other than element or document nodes are atomized.
    • isAtomized

      public boolean isAtomized()
      Ask whether the typed value (or string value) of the node reached by this path will be required.
      Returns:
      true if the typed value or string value of the node is required
    • setHasUnknownDependencies

      public void setHasUnknownDependencies()
      Indicate that the path has unknown dependencies, typically because a node reached by the path is supplied as an argument to a user-defined function
    • hasUnknownDependencies

      public boolean hasUnknownDependencies()
      Ask whether the path has unknown dependencies, typically because a node reached by the path is supplied as an argument to a user-defined function
      Returns:
      true if the path has unknown dependencies
    • allPathsAreWithinStreamableSnapshot

      public boolean allPathsAreWithinStreamableSnapshot()
      Determine whether the path is entirely within a streamable snapshot of a streamed document: that is, it must only navigate to ancestors and to attributes of ancestors
      Returns:
      true if this path performs navigation other than to ancestors and their attributes