org.basex.query.xquery.func
Class Fun

java.lang.Object
  extended by org.basex.query.xquery.expr.Expr
      extended by org.basex.query.xquery.func.Fun
Direct Known Subclasses:
FNSimple

public abstract class Fun
extends Expr

Abstract function definition.

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

Field Summary
 FunDef func
          Function description.
 
Fields inherited from class org.basex.query.xquery.expr.Expr
type
 
Constructor Summary
Fun()
           
 
Method Summary
 Expr comp(XQContext ctx)
          Optimizes and compiles the expression tree.
 Expr comp(XQContext ctx, Expr[] arg)
          Compiles the function.
 Item eval(XQContext ctx)
          Evaluates the expression and returns the resulting item.
abstract  Item eval(XQContext ctx, Item[] arg)
          Evaluates the function.
 java.lang.String info()
          Returns a string description of the expression.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xquery.expr.Expr
cls, d, e, i, n, node, s, size, str, u
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

func

public FunDef func
Function description.

Constructor Detail

Fun

public Fun()
Method Detail

comp

public final Expr comp(XQContext ctx)
                throws XQException
Description copied from class: Expr
Optimizes and compiles the expression tree.

Specified by:
comp in class Expr
Parameters:
ctx - query context
Returns:
optimized Expression
Throws:
XQException - evaluation exception

comp

public Expr comp(XQContext ctx,
                 Expr[] arg)
          throws XQException
Compiles the function.

Parameters:
ctx - xquery context
arg - evaluated arguments
Returns:
evaluated item
Throws:
XQException - evaluation exception

eval

public final Item eval(XQContext ctx)
                throws XQException
Description copied from class: Expr
Evaluates the expression and returns the resulting item.

Specified by:
eval in class Expr
Parameters:
ctx - query context
Returns:
resulting item
Throws:
XQException - evaluation exception

eval

public abstract Item eval(XQContext ctx,
                          Item[] arg)
                   throws XQException
Evaluates the function.

Parameters:
ctx - xquery context
arg - evaluated arguments
Returns:
evaluated item
Throws:
XQException - evaluation exception

info

public final java.lang.String info()
Description copied from class: Expr
Returns a string description of the expression. Contrary to the Expr.toString() method, the current expressions aren't included in the output.

Specified by:
info in class Expr
Returns:
result of check

toString

public final java.lang.String toString()
Specified by:
toString in class Expr