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.core
Class Context

    java.lang.Object
      org.basex.core.Context

    public final class Context

extends java.lang.Object

This class stores the reference to the currently opened database. Moreover, it provides references to the currently used, marked and copied node sets.

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

Constructor Summary
`Context()` Constructor.

Method Summary
`boolean` | `close()` Closes the database instance.
`Nodes` | `copied()` Returns the copied context set.
`void` | `copy(Nodes copy)` Sets the current node set as copy.
`Nodes` | `current()` Returns the current context set.
`void` | `current(Nodes curr)` Sets the current context set.
`Data` | `data()` Returns data reference.
`void` | `data(Data d)` Sets a new data instance.
`boolean` | `db()` Returns true if a data reference has been set.
`Nodes` | `marked()` Returns the marked context set.
`void` | `marked(Nodes mark)` Sets the marked context set.
`boolean` | `root()` Returns true if all current nodes refer to document nodes.
`void` | `update()` Flushes the context (i.e., updates references).

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

Constructor Detail

### Context

    public Context()

  Constructor.

Method Detail

### db

    public boolean db()

  Returns true if a data reference has been set.

  Returns:
    result of check

### root

    public boolean root()

  Returns true if all current nodes refer to document nodes.

  Returns:
    result of check

### data

    public Data data()

  Returns data reference.

  Returns:
    data reference

### data

    public void data(Data d)

  Sets a new data instance.

  Parameters:
    `d` - data reference

### update

    public void update()

  Flushes the context (i.e., updates references).

### close

    public boolean close()

  Closes the database instance.

  Returns:
    true if operation was successful

### current

    public Nodes current()

  Returns the current context set.

  Returns:
    current context set

### current

    public void current(Nodes curr)

  Sets the current context set.

  Parameters:
    `curr` - current context set

### copied

    public Nodes copied()

  Returns the copied context set.

  Returns:
    copied context set

### copy

    public void copy(Nodes copy)

  Sets the current node set as copy.

  Parameters:
    `copy` - current node set as copy.

### marked

    public Nodes marked()

  Returns the marked context set.

  Returns:
    marked context set

### marked

    public void marked(Nodes mark)

  Sets the marked context set.

  Parameters:
    `mark` - marked context set

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