Class DefaultStep

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPredicate​(Predicate predicate)
      Add an additional predicate to this object.
      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 getAxisName()  
      IterableAxis getIterableAxis()  
      java.util.List getPredicates()
      Returns a possibly empty list of predicates.
      PredicateSet getPredicateSet()
      Returns a possibly empty set of predicates.
      java.lang.String getText()
      Returns a String containing the XPath expression.
      void simplify()
      Simplifies the XPath step.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.jaxen.expr.Step

        matches
    • Method Detail

      • addPredicate

        public void addPredicate​(Predicate predicate)
        Description copied from interface: Predicated
        Add an additional predicate to this object.
        Specified by:
        addPredicate in interface Predicated
        Parameters:
        predicate - the predicate to add
      • getPredicates

        public java.util.List getPredicates()
        Description copied from interface: Predicated
        Returns a possibly empty list of predicates.
        Specified by:
        getPredicates in interface Predicated
        Returns:
        the list of predicates
      • getPredicateSet

        public PredicateSet getPredicateSet()
        Description copied from interface: Predicated
        Returns a possibly empty set of predicates.
        Specified by:
        getPredicateSet in interface Predicated
        Returns:
        the set of predicates
      • getAxis

        public int getAxis()
        Description copied from interface: Step
        Get an identifier for the current axis.
        Specified by:
        getAxis in interface Step
        Returns:
        the axis identifier
        See Also:
        Axis
      • getAxisName

        public java.lang.String getAxisName()
      • getText

        public java.lang.String getText()
        Description copied from interface: Step
        Returns a String containing the XPath expression.
        Specified by:
        getText in interface Step
        Returns:
        the text form of this step
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • simplify

        public void simplify()
        Description copied from interface: Step
        Simplifies the XPath step. In practice, this is usually a noop. Jaxen does not currently perform any simplification.
        Specified by:
        simplify in interface Step
      • axisIterator

        public java.util.Iterator axisIterator​(java.lang.Object contextNode,
                                               ContextSupport support)
                                        throws UnsupportedAxisException
        Description copied from interface: Step
        Get an Iterator for the current axis starting in the given contextNode.
        Specified by:
        axisIterator in interface Step
        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

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