Interface Step

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Iterator axisIterator​(java.lang.Object contextNode, ContextSupport support)
      Get an Iterator for the current axis starting in the given contextNode.
      java.util.List evaluate​(Context context)
      For each node in the given context calls matches() for every node on the axis, then filters the result by each of the predicates.
      int getAxis()
      Get an identifier for the current axis.
      java.lang.String getText()
      Returns a String containing the XPath expression.
      boolean matches​(java.lang.Object node, ContextSupport contextSupport)
      Performs the node-test part of evaluating the step for the given node (which must be on the axis).
      void simplify()
      Simplifies the XPath step.
    • Method Detail

      • matches

        boolean matches​(java.lang.Object node,
                        ContextSupport contextSupport)
                 throws JaxenException
        Performs the node-test part of evaluating the step for the given node (which must be on the axis).
        Parameters:
        node - the node to test
        contextSupport - function, namespace, and variable contexts
        Returns:
        true if the node matches this step; false if it doesn't
        Throws:
        JaxenException
      • getText

        java.lang.String getText()
        Returns a String containing the XPath expression.
        Returns:
        the text form of this step
      • simplify

        void simplify()
        Simplifies the XPath step. In practice, this is usually a noop. Jaxen does not currently perform any simplification.
      • getAxis

        int getAxis()
        Get an identifier for the current axis.
        Returns:
        the axis identifier
        See Also:
        Axis
      • axisIterator

        java.util.Iterator axisIterator​(java.lang.Object contextNode,
                                        ContextSupport support)
                                 throws UnsupportedAxisException
        Get an Iterator for the current axis starting in the given contextNode.
        Parameters:
        contextNode - the node from which to follow this step
        support - the remaining context for the traversal
        Returns:
        an iterator over the nodes along the axis
        Throws:
        UnsupportedAxisException - if the navigator does not support this step's axis
      • evaluate

        java.util.List evaluate​(Context context)
                         throws JaxenException
        For each node in the given context calls matches() for every node on the axis, then filters the result by each of the predicates.
        Parameters:
        context - the node in context of its position in the document
        Returns:
        a list of matching nodes
        Throws:
        JaxenException