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

## org.basex.query.xpath.locpath
Class LocPath

    java.lang.Object
      org.basex.query.xpath.expr.Expr
          org.basex.query.xpath.locpath.LocPath

Direct Known Subclasses:
  LocPathAbs, LocPathRel

    public abstract class LocPath

extends Expr

LocationPath (absolute or relative).

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Tim Petrowsky

Field Summary
`Steps` | `steps` List of location steps.

Constructor Summary
`LocPath()`

Method Summary
`void` | `addPosPred(XPContext ctx)` Limit evaluation of predicates to first hit when only existence of path has to be checked...
`boolean` | `checkAxes()` Checks if the specified location step has suitable index axes.
`Expr` | `compile(XPContext ctx)` Tries to optimize the Expression.
`abstract NodeSet` | `eval(XPContext ctx)` Evaluates the expression with the specified context set.
`Index.TYPE` | `indexable(XPContext ctx, Expr exp, Comp cmp)` Checks if the path is indexable.
`LocPath` | `invertPath(Step curr)` Inverts a location path.
`boolean` | `sameAs(Expr cmp)` Checks current and specified expression for equivalence.
`boolean` | `usesPos()` Checks whether this Expression (or its children) make use of the position parameter.
`boolean` | `usesSize()` Checks whether this Expression (or its children) make use of the setsize parameter.

Methods inherited from class org.basex.query.xpath.expr.Expr
`indexEquivalent, indexSizes, returnedValue, toString`

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

Field Detail

### steps

    public Steps steps

  List of location steps.

Constructor Detail

### LocPath

    public LocPath()

Method Detail

### addPosPred

    public final void addPosPred(XPContext ctx)

  Limit evaluation of predicates to first hit when only existence of path has to be checked...

  Parameters:
    `ctx` - query context

### checkAxes

    public final boolean checkAxes()

  Checks if the specified location step has suitable index axes.

  Returns:
    true result of check

### compile

    public final Expr compile(XPContext ctx)
                       throws EvalException

  Description copied from class: `Expr`
  Tries to optimize the Expression.

  Specified by:
    `compile` in class `Expr`
  Parameters:
    `ctx` - expression context
  Returns:
    optimized Expression
  Throws:
    `EvalException` - evaluation exception

### eval

    public abstract NodeSet eval(XPContext ctx)
                          throws EvalException

  Description copied from class: `Expr`
  Evaluates the expression with the specified context set. Additionally provides a context

  Specified by:
    `eval` in class `Expr`
  Parameters:
    `ctx` - query context
  Returns:
    resulting XPathValue
  Throws:
    `EvalException` - evaluation exception

### indexable

    public final Index.TYPE indexable(XPContext ctx,
                                      Expr exp,
                                      Comp cmp)

  Checks if the path is indexable.

  Parameters:
    `ctx` - query context
    `exp` - expression which must be a literal
    `cmp` - comparator
  Returns:
    result of check

### invertPath

    public final LocPath invertPath(Step curr)

  Inverts a location path.

  Parameters:
    `curr` - current location step
  Returns:
    inverted path

### sameAs

    public final boolean sameAs(Expr cmp)

  Description copied from class: `Expr`
  Checks current and specified expression for equivalence.

  Overrides:
    `sameAs` in class `Expr`
  Parameters:
    `cmp` - expression to be compared
  Returns:
    result of check

### usesPos

    public final boolean usesPos()

  Description copied from class: `Expr`
  Checks whether this Expression (or its children) make use of the position parameter. If not this allows some nice optimizations.

  Specified by:
    `usesPos` in class `Expr`
  Returns:
    whether position is used

### usesSize

    public final boolean usesSize()

  Description copied from class: `Expr`
  Checks whether this Expression (or its children) make use of the setsize parameter. If not this allows early predicate evaluation.

  Specified by:
    `usesSize` in class `Expr`
  Returns:
    whether setsize is used

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