|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.ft.FTExpr
org.basex.query.ft.FTFilter
org.basex.query.ft.FTDistance
public final class FTDistance
FTDistance expression.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary |
---|
Fields inherited from class org.basex.query.ft.FTExpr |
---|
expr |
Fields inherited from class org.basex.query.expr.ParseExpr |
---|
info, size, type |
Constructor Summary | |
---|---|
FTDistance(InputInfo ii,
FTExpr e,
Expr[] d,
FTUnit u)
Constructor. |
Method Summary | |
---|---|
boolean |
accept(ASTVisitor visitor)
Traverses this expression, notifying the visitor of declared and used variables, and checking the tree for other recursive properties. |
void |
checkUp()
Checks if all updating expressions are correctly placed. |
FTExpr |
compile(QueryContext ctx,
VarScope scp)
Compiles and optimizes the expression, assigns data types and cardinalities. |
FTExpr |
copy(QueryContext ctx,
VarScope scp,
IntObjMap<Var> vs)
Copies an expression. |
VarUsage |
count(Var v)
Checks how often a variable is used in this expression. |
int |
exprSize()
Counts the number of expressions in this expression's sub-tree. |
protected boolean |
filter(QueryContext ctx,
FTMatch mtc,
FTLexer lex)
Evaluates the filter expression. |
boolean |
has(Expr.Flag flag)
Indicates if an expression has the specified compiler property. |
FTExpr |
inline(QueryContext ctx,
VarScope scp,
Var v,
Expr e)
Inlines an expression into this one, replacing all references to the given variable. |
void |
plan(FElem plan)
Creates an expression tree. |
boolean |
removable(Var v)
Checks if the specified variable is replaceable by a context item. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.query.ft.FTFilter |
---|
indexAccessible, item, iter |
Methods inherited from class org.basex.query.ft.FTExpr |
---|
indexEquivalent, optimize |
Methods inherited from class org.basex.query.expr.ParseExpr |
---|
checkAdmin, checkAllUp, checkBinary, checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkFunc, checkItem, checkItr, checkItr, checkMap, checkNode, checkNode, checkNode, checkNoEmpty, checkNoneUp, checkNoUp, checkQNm, checkStr, checkStr, checkStrBin, checkType, checkWrite, compBln, copyType, ebv, optPre, preEval, size, test, type, value |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, compEbv, copy, hasFreeVars, inlineAll, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, sameAs, uses, visitAll |
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, description, info, planAttr, planElem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FTDistance(InputInfo ii, FTExpr e, Expr[] d, FTUnit u)
ii
- input infoe
- expressiond
- distancesu
- unitMethod Detail |
---|
public void checkUp() throws QueryException
Expr
checkUp
in class FTExpr
QueryException
- query exceptionpublic FTExpr compile(QueryContext ctx, VarScope scp) throws QueryException
Expr
compile
in class FTExpr
ctx
- query contextscp
- variable scope
QueryException
- query exceptionprotected boolean filter(QueryContext ctx, FTMatch mtc, FTLexer lex) throws QueryException
FTFilter
filter
in class FTFilter
ctx
- query contextmtc
- full-text matchlex
- tokenizer
QueryException
- query exceptionpublic boolean has(Expr.Flag flag)
Expr
Expr.compile(org.basex.query.QueryContext, org.basex.query.var.VarScope)
methods to test properties of sub-expressions.
It returns true
if at least one test is successful.
has
in class FTExpr
flag
- flag to be found
public boolean removable(Var v)
Expr
Preds.removable(org.basex.query.var.Var)
, if one of the variables is used within a predicate.MixedPath.removable(org.basex.query.var.Var)
, if the variable occurs within the path.GFLWOR.compile(org.basex.query.QueryContext, org.basex.query.var.VarScope)
to rewrite where clauses
into predicates.
removable
in class FTExpr
v
- variable to be replaced
public VarUsage count(Var v)
Expr
count
in class FTExpr
v
- variable to look for
VarUsage
public FTExpr inline(QueryContext ctx, VarScope scp, Var v, Expr e) throws QueryException
Expr
inline
in class FTExpr
ctx
- query context for recompilationscp
- variable scope for recompilationv
- variable to replacee
- expression to inline
null
otherwise
QueryException
- query exceptionpublic FTExpr copy(QueryContext ctx, VarScope scp, IntObjMap<Var> vs)
Expr
copy
in class FTExpr
ctx
- query contextscp
- variable scope for creating new variablesvs
- mapping from old variable IDs to new variable copies
public void plan(FElem plan)
ExprInfo
plan
in class FTExpr
plan
- root elementpublic java.lang.String toString()
toString
in class FTFilter
public boolean accept(ASTVisitor visitor)
Expr
accept
in class FTExpr
visitor
- visitor
public int exprSize()
Expr
exprSize
in class FTExpr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |