|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.core.Context
public final class Context
This class serves as a central database context. It references the currently opened database. Moreover, it provides references to the currently used, marked and copied node sets.
Field Summary | |
---|---|
Nodes |
copied
Copied nodes. |
Nodes |
current
Node context. |
Data |
data
Data reference. |
int |
focused
Focused node. |
Nodes |
marked
Marked nodes. |
DataPool |
pool
Database pool. |
Prop |
prop
Database properties. |
IO |
query
Current query file. |
Sessions |
sessions
Client connections. |
User |
user
User reference. |
Users |
users
Users. |
Constructor Summary | |
---|---|
Context()
Constructor. |
|
Context(Context ctx)
Constructor. |
Method Summary | |
---|---|
void |
add(ServerProcess s)
Adds the specified session. |
void |
close()
Closes the database context. |
void |
closeDB()
Removes the current database context. |
void |
delete(ServerProcess s)
Removes the specified session. |
int[] |
doc()
Returns all document nodes. |
void |
openDB(Data d)
Sets the specified data instance as current database. |
boolean |
perm(int p,
MetaData md)
Checks if the current user has the specified permission. |
void |
pin(Data d)
Adds the specified data reference to the pool. |
Data |
pin(String name)
Pins the specified database. |
boolean |
pinned(String db)
Checks if the specified database is pinned. |
boolean |
root()
Returns true if the current node set contains all documents. |
boolean |
unpin(Data d)
Unpins a data reference. |
void |
update()
Updates references to the document nodes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Sessions sessions
public final DataPool pool
public final Users users
public final Prop prop
public User user
public IO query
public Data data
public Nodes current
public Nodes marked
public Nodes copied
public int focused
Constructor Detail |
---|
public Context()
public Context(Context ctx)
user
reference must be set after calling this.
ctx
- parent contextMethod Detail |
---|
public void close()
public boolean root()
public int[] doc()
public void openDB(Data d)
d
- data referencepublic void closeDB()
public void update()
public void pin(Data d)
d
- data referencepublic Data pin(String name)
name
- name of database
public boolean unpin(Data d)
d
- data reference
public boolean pinned(String db)
db
- name of database
public void add(ServerProcess s)
s
- session to be addedpublic void delete(ServerProcess s)
s
- session to be removedpublic boolean perm(int p, MetaData md)
p
- requested permissionmd
- optional meta data reference
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |