org.basex.query.expr
Interface XQFunction

All Known Implementing Classes:
FItem, FuncItem, Map, StaticFunc

public interface XQFunction

Interface for XQuery functions.

Author:
BaseX Team 2005-12, BSD License, Leo Woerteler

Method Summary
 int arity()
          Number of arguments this function takes.
 QNm fName()
          Name of this function, null means anonymous function.
 FuncType funcType()
          Type of this function.
 Item invItem(QueryContext ctx, InputInfo ii, Value... args)
          Invokes this function with the given arguments.
 Value invValue(QueryContext ctx, InputInfo ii, Value... args)
          Invokes this function with the given arguments.
 

Method Detail

arity

int arity()
Number of arguments this function takes.

Returns:
function arity

fName

QNm fName()
Name of this function, null means anonymous function.

Returns:
name or null

funcType

FuncType funcType()
Type of this function.

Returns:
this function's type

invValue

Value invValue(QueryContext ctx,
               InputInfo ii,
               Value... args)
               throws QueryException
Invokes this function with the given arguments.

Parameters:
ctx - query context
ii - input info
args - arguments
Returns:
resulting iterator
Throws:
QueryException - query exception

invItem

Item invItem(QueryContext ctx,
             InputInfo ii,
             Value... args)
             throws QueryException
Invokes this function with the given arguments.

Parameters:
ctx - query context
ii - input info
args - arguments
Returns:
resulting item
Throws:
QueryException - query exception