Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.query.util
Class Functions

    java.lang.Object
      org.basex.query.ExprInfo
          org.basex.query.util.Functions

    public final class Functions

extends ExprInfo

Global expression context.

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

Constructor Summary
`Functions()`

Method Summary
`int` | `add(Func fun)` Adds a local function.
`void` | `check()` Checks if all functions have been correctly initialized.
`void` | `comp(QueryContext ctx)` Compiles the functions.
`void` | `funError(QNm name)` Finds similar function names and throws an error message.
`Func` | `get(int id)` Returns the function with the specified id.
`Expr` | `get(QNm name, Expr[] args)` Returns the specified function.
`void` | `plan(Serializer ser)` Recursively sends the abstract syntax of this expression to the specified serializer.
`java.lang.String` | `toString()`

Methods inherited from class org.basex.query.ExprInfo
`color, info, name`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Functions

    public Functions()

Method Detail

### get

    public Func get(int id)

  Returns the function with the specified id.

  Parameters:
    `id` - function id
  Returns:
    function

### get

    public Expr get(QNm name,
                    Expr[] args)
             throws QueryException

  Returns the specified function.

  Parameters:
    `name` - name of the function
    `args` - optional arguments
  Returns:
    function instance
  Throws:
    `QueryException` - query exception

### add

    public int add(Func fun)
            throws QueryException

  Adds a local function.

  Parameters:
    `fun` - function instance
  Returns:
    function id
  Throws:
    `QueryException` - query exception

### comp

    public void comp(QueryContext ctx)
              throws QueryException

  Compiles the functions.

  Parameters:
    `ctx` - query context
  Throws:
    `QueryException` - query exception

### check

    public void check()
               throws QueryException

  Checks if all functions have been correctly initialized.

  Throws:
    `QueryException` - query exception

### funError

    public void funError(QNm name)
                  throws QueryException

  Finds similar function names and throws an error message.

  Parameters:
    `name` - function name
  Throws:
    `QueryException` - query exception

### plan

    public void plan(Serializer ser)
              throws java.io.IOException

  Description copied from class: `ExprInfo`
  Recursively sends the abstract syntax of this expression to the specified serializer.

  Specified by:
    `plan` in class `ExprInfo`
  Parameters:
    `ser` - serializer
  Throws:
    `java.io.IOException` - I/O exception

### toString

    public java.lang.String toString()

  Specified by:
    `toString` in class `ExprInfo`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD