org.basex.core
Class Context

java.lang.Object
  extended by 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-07, ISC License, Christian Gruen

Method Summary
 boolean close()
          Closes the database instance.
 Nodes copied()
          Returns the copied context set.
 void copy(Nodes copy)
          Sets the current node set 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.
static Context get()
          Returns unique class instance.
 Nodes marked()
          Returns the marked context set.
 void marked(Nodes mark)
          Sets the marked context set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public boolean close()
Closes the database instance.

Returns:
true if operation was successful

copied

public Nodes copied()
Returns the copied context set.

Returns:
copied context set

copy

public void copy(Nodes copy)
Sets the current node set copy.

Parameters:
copy - current node set copy.

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

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

get

public static Context get()
Returns unique class instance.

Returns:
class instance

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