org.exist.xquery.functions
Class ExtNear

java.lang.Object
  extended by org.exist.xquery.AbstractExpression
      extended by org.exist.xquery.PathExpr
          extended by org.exist.xquery.Function
              extended by org.exist.xquery.functions.ExtFulltext
                  extended by org.exist.xquery.functions.ExtNear
All Implemented Interfaces:
CompiledXQuery, Expression, Optimizable, CompiledExpression

public class ExtNear
extends ExtFulltext

text:near() function.

Author:
Wolfgang Meier (July 31, 2002)

Field Summary
 
Fields inherited from class org.exist.xquery.functions.ExtFulltext
signature
 
Fields inherited from class org.exist.xquery.Function
BUILTIN_FUNCTION_NS
 
Fields inherited from interface org.exist.xquery.Expression
DOT_TEST, EXPRESSION_ID_INVALID, IGNORE_CONTEXT, IN_NODE_CONSTRUCTOR, IN_PREDICATE, IN_UPDATE, IN_WHERE_CLAUSE, NEED_INDEX_INFO, NO_CONTEXT_ID, SINGLE_STEP_EXECUTION, USE_TREE_TRAVERSAL
 
Constructor Summary
ExtNear(XQueryContext context)
           
 
Method Summary
 void analyze(AnalyzeContextInfo contextInfo)
          Statically analyze the expression and its subexpressions.
 void dump(ExpressionDumper dumper)
          Write a diagnostic dump of the expression to the passed ExpressionDumper.
 Sequence evalQuery(String searchArg, NodeSet nodes)
           
 NodeSet preSelect(Sequence contextSequence, boolean useContext)
           
 void setMaxDistance(Expression expr)
           
 void setMinDistance(Expression expr)
           
 String toString()
           
 
Methods inherited from class org.exist.xquery.functions.ExtFulltext
accept, addTerm, canOptimize, eval, getDependencies, getOptimizeAxis, optimizeOnSelf, resetState, returnsType, setContextDocSet, setPath
 
Methods inherited from class org.exist.xquery.Function
createFunction, getArgument, getArgumentCount, getArguments, getASTNode, getCardinality, getName, getParent, getSignature, isCalledAs, setArguments, setASTNode, setParent, setPrimaryAxis
 
Methods inherited from class org.exist.xquery.PathExpr
add, add, addPath, addPredicate, dump, getContext, getDocumentSet, getExpression, getLastExpression, getLength, getLiteralValue, getSource, isValid, replaceExpression, replaceLastExpression, reset, setContext, setSource
 
Methods inherited from class org.exist.xquery.AbstractExpression
eval, getContextDocSet, getContextId, getExpressionId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exist.xquery.Expression
eval, getASTNode, getCardinality, getContextDocSet, getContextId, getExpressionId, setASTNode, setPrimaryAxis
 
Methods inherited from interface org.exist.xquery.CompiledXQuery
eval
 

Constructor Detail

ExtNear

public ExtNear(XQueryContext context)
Method Detail

analyze

public void analyze(AnalyzeContextInfo contextInfo)
             throws XPathException
Description copied from interface: Expression
Statically analyze the expression and its subexpressions. During the static analysis phase, the query engine can detect unknown variables and some type errors.

Specified by:
analyze in interface Expression
Overrides:
analyze in class ExtFulltext
Throws:
XPathException

preSelect

public NodeSet preSelect(Sequence contextSequence,
                         boolean useContext)
                  throws XPathException
Specified by:
preSelect in interface Optimizable
Overrides:
preSelect in class ExtFulltext
Throws:
XPathException

evalQuery

public Sequence evalQuery(String searchArg,
                          NodeSet nodes)
                   throws XPathException
Throws:
XPathException

dump

public void dump(ExpressionDumper dumper)
Description copied from interface: Expression
Write a diagnostic dump of the expression to the passed ExpressionDumper.

Specified by:
dump in interface Expression
Overrides:
dump in class ExtFulltext
Parameters:
dumper - the expression dumper to write to

toString

public String toString()
Overrides:
toString in class ExtFulltext

setMaxDistance

public void setMaxDistance(Expression expr)

setMinDistance

public void setMinDistance(Expression expr)


Copyright (C) Wolfgang Meier. All rights reserved.