|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.query.ExprInfo
org.basex.query.expr.Expr
public abstract class Expr
Abstract expression.
| Nested Class Summary | |
|---|---|
static class |
Expr.Use
Usage flags. |
| Constructor Summary | |
|---|---|
Expr()
|
|
| Method Summary | |
|---|---|
Expr |
addText(QueryContext ctx)
Optionally adds a text node to an expression for potential index rewriting. |
Item |
atomic(QueryContext ctx)
Evaluates the expression and returns the resulting item or a null reference. |
Item |
checkCtx(QueryContext ctx)
Throws an exception if the context item is not set. |
double |
checkDbl(Expr e,
QueryContext ctx)
Checks if the specified expression yields a string. |
long |
checkItr(Expr e,
QueryContext ctx)
Checks if the specified expression is an integer. |
abstract Expr |
comp(QueryContext ctx)
Optimizes and compiles the expression. |
boolean |
duplicates(QueryContext ctx)
Returns true if the expression might yield duplicates and unsorted results. |
boolean |
e()
Returns if this is an empty sequence. |
Item |
ebv(QueryContext ctx)
Checks if the iterator can be dissolved into an effective boolean value. |
boolean |
i()
Checks if this is an item. |
boolean |
indexAccessible(IndexContext ic)
Checks if an index can be used for query evaluation. |
Expr |
indexEquivalent(IndexContext ic)
Returns an equivalent expression which accesses an index structure. |
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items. |
boolean |
removable(Var v,
QueryContext ctx)
Checks if the specified variable is removable. |
Expr |
remove(Var v)
Removes the specified variable in a sub expression. |
Return |
returned(QueryContext ctx)
Indicates the return type of an expression. |
boolean |
sameAs(Expr cmp)
Checks the current and specified expression for equality. |
long |
size(QueryContext ctx)
Returns the sequence size or 1. |
Item |
test(QueryContext ctx)
Performs a predicate test and returns the item if test was successful. |
abstract boolean |
uses(Expr.Use u,
QueryContext ctx)
Indicates if an expression uses the specified type. |
boolean |
v()
Returns if this is a vacuous expression (empty sequence or error function). |
| Methods inherited from class org.basex.query.ExprInfo |
|---|
color, info, name, plan, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Expr()
| Method Detail |
|---|
public abstract Expr comp(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exception
public Iter iter(QueryContext ctx)
throws QueryException
atomic(org.basex.query.QueryContext) must be implemented.
ctx - query context
QueryException - query exception
public Item atomic(QueryContext ctx)
throws QueryException
null reference.
If this method is not overwritten, iter(org.basex.query.QueryContext) must be implemented.
ctx - query context
QueryException - query exception
public Item ebv(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exception
public Item test(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exceptionpublic boolean i()
public boolean e()
public boolean v()
public long size(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exception
public abstract boolean uses(Expr.Use u,
QueryContext ctx)
true is returned by default and thus assumed as "worst-case".
u - use type to be checkedctx - query context
public boolean removable(Var v,
QueryContext ctx)
v - variable to be removedctx - query context
public Expr remove(Var v)
v - variable to be removed
public Return returned(QueryContext ctx)
ctx - query context
public boolean duplicates(QueryContext ctx)
ctx - query context
public boolean indexAccessible(IndexContext ic)
throws QueryException
ic - index context
QueryException - query exception
public Expr indexEquivalent(IndexContext ic)
throws QueryException
indexAccessible(org.basex.query.IndexContext) is implemented for an
expression.
ic - index context
QueryException - query exceptionpublic boolean sameAs(Expr cmp)
cmp - expression to be compared
public final double checkDbl(Expr e,
QueryContext ctx)
throws QueryException
e - expression to be checkedctx - query context
QueryException - query exception
public final long checkItr(Expr e,
QueryContext ctx)
throws QueryException
e - expression to be checkedctx - query context
QueryException - query exception
public final Item checkCtx(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exception
public Expr addText(QueryContext ctx)
throws QueryException
ctx - query context
QueryException - query exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||