org.basex.query.xpath
Class XPOptimizer

java.lang.Object
  extended by org.basex.query.xpath.XPOptimizer

public final class XPOptimizer
extends java.lang.Object

This class assembles optimization methods for the XPath parser.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Method Summary
static void addText(Expr ex, XPContext ctx)
          Adds a text step to the specified path.
static Expr[] getIndexExpr(Expr[] ex)
          Checks if all path expressions are the same; if yes, a path has to be only evaluated once.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addText

public static void addText(Expr ex,
                           XPContext ctx)
Adds a text step to the specified path.

Parameters:
ex - location path expression
ctx - query context

getIndexExpr

public static Expr[] getIndexExpr(Expr[] ex)
Checks if all path expressions are the same; if yes, a path has to be only evaluated once.

Parameters:
ex - expression array
Returns:
result of check