public class AxisPath extends Path
| Modifier and Type | Method and Description |
|---|---|
Expr |
addText(QueryContext ctx)
Optionally adds a text node to an expression for potential index rewriting.
|
protected Expr |
compPath(QueryContext ctx)
Compiles the location path.
|
Path |
copy()
Returns a copy of the path expression.
|
int |
count(Var v)
Counts how often the specified variable is used by an expression.
|
AxisPath |
invertPath(Expr r,
AxisStep curr)
Inverts a location path.
|
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items.
|
boolean |
iterable()
Returns true if the expression is iterable, i.e., if it does not contain
any duplicates and if all results are sorted.
|
java.util.ArrayList<PathNode> |
nodes(QueryContext ctx)
Returns the path nodes that will result from this path.
|
boolean |
removable(Var v)
Checks if the specified variable is replaceable by a context item.
|
Expr |
remove(Var v)
|
boolean |
sameAs(Expr cmp)
Compares the current and specified expression for equality.
|
AxisStep |
step(int i)
Returns the specified axis step.
|
checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkIO, checkItem, checkItr, checkItr, checkMap, checkNode, checkNoEmpty, checkStr, checkType, checkUp, checkUp, checkWrite, compBln, ebv, item, optPre, preEval, size, test, type, valuecompEbv, hasFreeVars, indexAccessible, indexEquivalent, isEmpty, isFunction, isItem, isVacuous, isValue, markTailCallsdescription, infoprotected final Expr compPath(QueryContext ctx) throws QueryException
PathcompPath in class Pathctx - query contextQueryException - query exceptionpublic Iter iter(QueryContext ctx) throws QueryException
ExprExpr.item(org.basex.query.QueryContext, org.basex.util.InputInfo) must be implemented
by an expression, as it may be called by this method.iter in class ParseExprctx - query contextQueryException - query exceptionpublic final AxisPath invertPath(Expr r, AxisStep curr)
r - new root nodecurr - current location steppublic final Expr addText(QueryContext ctx)
Exprpublic final AxisStep step(int i)
i - indexpublic final Path copy()
public java.util.ArrayList<PathNode> nodes(QueryContext ctx)
ctx - query contextnull if nodes cannot be evaluatedpublic final int count(Var v)
ExprGFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses as predicates and
remove statically bound or unused clausesGFLWOR.compHoist(org.basex.query.QueryContext) to hoist independent variablespublic final boolean removable(Var v)
ExprPreds.removable(org.basex.query.util.Var), if one of the variables is used within
a predicate.MixedPath.removable(org.basex.query.util.Var), if the variable occurs within
the path.Group.removable(org.basex.query.util.Var), as the group by expression depends on
variable references.GFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses
into predicates.public final Expr remove(Var v)
ExprVarRef expressions for the given variable
by a Context reference. This method is called by
GFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses as predicates.public final boolean iterable()
ExprAxisPath.