Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.xml.xpath
Class Step

    java.lang.Object
      com.novell.xml.xpath.Step

    public class Step

extends Object

class that represents an XPath LocationPath Step The nodes returned from this class will always be in document order. The reason for this is that a Step is defined by XPath as returning a node-set, rather than a list. However, the only way node-sets are used is in document order.

Constructor Summary
`Step(Basis basis)` Construct a Step without a predicate
`Step(Basis basis, Predicate predicate)` Construct a Step with a single predicate
`Step(Basis basis, Predicate[] predicates)` Construct a Step with multiple predicates, e.g., child::*[1][2][3]
`Step(Step step, Predicate predicate)` Construct a Step based on an exising step and an additional predicate.

Method Summary
`void` | `done()` Undo any state changes that may have occurred in the expression context due to evaluation of the Step
`Node` | `first()` Return the first node in the node-set resulting from evaluation of the Step with the expression context set in the setup() call
`Node` | `next()` Return subsequent nodes in the node-set resulting from the evaluation of the Step with the context setup by setup()
`void` | `setup(Node contextNode, ExpressionContext context)` Initialize the Step to enable it to return the resulting node-set based on the passed expression context.
`String` | `toString()` Provide a readable description for debugging.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Step

    public Step(Basis basis)

  Construct a Step without a predicate

  Parameters:
    `basis` - The axis-name::node-test

### Step

    public Step(Basis basis,
                Predicate predicate)

  Construct a Step with a single predicate

  Parameters:
    `basis` - The axis-name::node-test
    `predicate` - The predicate expression

### Step

    public Step(Basis basis,
                Predicate[] predicates)

  Construct a Step with multiple predicates, e.g., child::*[1][2][3]

  Parameters:
    `basis` - The axis-name::node-test
    `predicates` - Array of predicates

### Step

    public Step(Step step,
                Predicate predicate)

  Construct a Step based on an exising step and an additional predicate.

  Parameters:
    `step` - The existing Step
    `predicate` - The additional predicate

Method Detail

### setup

    public void setup(Node contextNode,
                      ExpressionContext context)

  Initialize the Step to enable it to return the resulting node-set based on the passed expression context. Call first()-next() to get the members of the node-set

  Parameters:
    `contextNode` - The node from which evaluation starts
    `context` - The collection of things that make up the expression context for the step and for subexpressions in the step

### done

    public void done()

  Undo any state changes that may have occurred in the expression context due to evaluation of the Step

### first

    public Node first()
               throws XPathEvaluationException

  Return the first node in the node-set resulting from evaluation of the Step with the expression context set in the setup() call

  Returns:
    a node or null, if resulting node-set is empty
  Throws:
    `XPathEvaluationException`

### next

    public Node next()
              throws XPathEvaluationException

  Return subsequent nodes in the node-set resulting from the evaluation of the Step with the context setup by setup()

  Returns:
    a node or null, if the last node in the resulting node-set has already been returned
  Throws:
    `XPathEvaluationException`

### toString

    public String toString()

  Provide a readable description for debugging.

  Overrides:
    `toString` in class `Object`
  Returns:
    String representation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD