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

## org.basex.query.xquery
Class XQContext

    java.lang.Object
      org.basex.core.Progress
          org.basex.query.QueryContext
              org.basex.query.xquery.XQContext

    public final class XQContext

extends QueryContext

XQuery Context.

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

Field Summary
`byte[]` | `baseURI` Static Base URI.
`byte[]` | `collation` Default collation.
`Dat` | `date` Current Date.
`Dtm` | `dtm` Current DateTime.
`byte[]` | `ftitem` Current fulltext item.
`FTOptions` | `ftopt` Current fulltext options.
`FTSelect` | `ftselect` Current fulltext selections.
`Functions` | `fun` Functions.
`Item` | `item` Current context.
`Namespaces` | `ns` Namespaces.
`URI` | `nsElem` Default element namespace.
`URI` | `nsFunc` Default function namespace.
`int` | `pos` Current context position.
`int` | `size` Current context size.
`Tim` | `time` Current Time.
`Variables` | `vars` Variables.

Constructor Summary
`XQContext()`

Method Summary
`void` | `addColl(FDoc coll)` Adds a collection.
`NodeBuilder` | `coll(byte[] coll)` Returns the specified collection.
`void` | `compile(Nodes nodes)` Optimizes the expression.
`DNode` | `doc(byte[] db)` Adds a database instance or returns an existing one.
`Item` | `eval(Expr expr)` Evaluates the specified expression.
`Result` | `eval(Nodes nodes)` Evaluates the expression with the specified context set.
`Iter` | `iter(Expr expr)` Evaluates the specified expression and returns an iterator.

Methods inherited from class org.basex.query.QueryContext
`compInfo, det, evalInfo, head, info, prog`

Methods inherited from class org.basex.core.Progress
`detail, header, progress, progress, stop, stopped`

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

Field Detail

### baseURI

    public byte[] baseURI

  Static Base URI.

### collation

    public byte[] collation

  Default collation.

### date

    public Dat date

  Current Date.

### dtm

    public Dtm dtm

  Current DateTime.

### ftitem

    public byte[] ftitem

  Current fulltext item.

### ftopt

    public FTOptions ftopt

  Current fulltext options.

### ftselect

    public FTSelect ftselect

  Current fulltext selections.

### fun

    public Functions fun

  Functions.

### item

    public Item item

  Current context.

### ns

    public Namespaces ns

  Namespaces.

### nsElem

    public URI nsElem

  Default element namespace.

### nsFunc

    public URI nsFunc

  Default function namespace.

### pos

    public int pos

  Current context position.

### size

    public int size

  Current context size.

### time

    public Tim time

  Current Time.

### vars

    public Variables vars

  Variables.

Constructor Detail

### XQContext

    public XQContext()

Method Detail

### addColl

    public void addColl(FDoc coll)
                 throws XQException

  Adds a collection.

  Parameters:
    `coll` - collection to be added
  Throws:
    `XQException` - evaluation exception

### coll

    public NodeBuilder coll(byte[] coll)
                     throws XQException

  Returns the specified collection.

  Parameters:
    `coll` - name of the collection to be returned.
  Returns:
    collection
  Throws:
    `XQException` - evaluation exception

### compile

    public void compile(Nodes nodes)
                 throws XQException

  Description copied from class: `QueryContext`
  Optimizes the expression.

  Specified by:
    `compile` in class `QueryContext`
  Parameters:
    `nodes` - node context
  Throws:
    `XQException`

### doc

    public DNode doc(byte[] db)
              throws XQException

  Adds a database instance or returns an existing one.

  Parameters:
    `db` - database name or file path
  Returns:
    database instance
  Throws:
    `XQException` - evaluation exception

### eval

    public Item eval(Expr expr)
              throws XQException

  Evaluates the specified expression.

  Parameters:
    `expr` - expression to be evaluated
  Returns:
    resulting item
  Throws:
    `XQException` - evaluation exception

### eval

    public Result eval(Nodes nodes)
                throws XQException

  Description copied from class: `QueryContext`
  Evaluates the expression with the specified context set.

  Specified by:
    `eval` in class `QueryContext`
  Parameters:
    `nodes` - initial context set
  Returns:
    resulting value
  Throws:
    `XQException`

### iter

    public Iter iter(Expr expr)
              throws XQException

  Evaluates the specified expression and returns an iterator.

  Parameters:
    `expr` - expression to be evaluated
  Returns:
    iterator
  Throws:
    `XQException` - evaluation exception

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