Class AxisPath

Direct Known Subclasses:
CachedPath, IterPath, SingleIterPath

public abstract class AxisPath extends Path
Abstract axis path expression.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Details

    • iter

      public final Iter iter(QueryContext qc) throws QueryException
      Description copied from class: Expr
      Evaluates the expression and returns an iterator on the resulting items. The implementation of this method is optional.
      Overrides:
      iter in class ParseExpr
      Parameters:
      qc - query context
      Returns:
      iterator
      Throws:
      QueryException - query exception
    • value

      public final Value value(QueryContext qc) throws QueryException
      Description copied from class: Expr
      Evaluates the expression and returns the resulting value. If this method is not implemented, Expr.item(QueryContext, InputInfo) must be implemented instead.
      Overrides:
      value in class ParseExpr
      Parameters:
      qc - query context
      Returns:
      value
      Throws:
      QueryException - query exception
    • iterator

      protected abstract Iter iterator(QueryContext qc) throws QueryException
      Returns a node iterator.
      Parameters:
      qc - query context
      Returns:
      iterator
      Throws:
      QueryException - query exception
    • nodes

      protected abstract Value nodes(QueryContext qc) throws QueryException
      Returns a node sequence.
      Parameters:
      qc - query context
      Returns:
      iterator
      Throws:
      QueryException - query exception
    • step

      public final Step step(int index)
      Returns the specified axis step.
      Parameters:
      index - index
      Returns:
      step
    • addPredicates

      public final Expr addPredicates(CompileContext cc, Expr... preds) throws QueryException
      Adds predicates to the last step and returns the optimized expression.
      Parameters:
      cc - compilation context
      preds - predicates to be added
      Returns:
      new path
      Throws:
      QueryException - query exception
    • mergeEbv

      public final Expr mergeEbv(Expr expr, boolean or, CompileContext cc) throws QueryException
      Description copied from class: Expr
      Tries to merge two expressions that are part of an EBV test. Called by And, Or), Step and Filter. Overwritten by CmpG, CmpIR, CmpR, CmpSR, ItrPos, Pos and others.
      Overrides:
      mergeEbv in class Expr
      Parameters:
      expr - second expression
      or - union or intersection
      cc - compilation context
      Returns:
      optimized expression or null
      Throws:
      QueryException - query exception
    • ddo

      public final boolean ddo()
      Description copied from class: Expr
      Indicates if this expression returns nodes in document order without duplicates.
      Overrides:
      ddo in class Expr
      Returns:
      result of check
    • data

      public final Data data()
      Description copied from class: Expr
      Returns the data reference bound to this expression. This method is currently overwritten by DBNode, DBNodeSeq, AxisPath and VarRef.
      Overrides:
      data in class Expr
      Returns:
      data reference (can be null)
    • data

      public final void data(Data dt)
      Description copied from class: Expr
      Assigns a data reference, if supported.
      Overrides:
      data in class Expr
      Parameters:
      dt - data reference