| Home | Trees | Index | Help |
|---|
| Package rdflib :: Package store :: Module IOMemory :: Class IOMemory |
|
object--+ |Store--+ | IOMemory
An integer-key-optimized-context-aware-in-memory store.
Uses nested dictionaries to store triples and context. Each triple is stored in six such indices as follows cspo[c][s][p][o] = 1 and cpos[c][p][o][s] = 1 and cosp[c][o][s][p] = 1 as well as spo[s][p][o] = [c] and pos[p][o][s] = [c] and pos[o][s][p] = [c]
Context information is used to track the 'source' of the triple data for merging, unmerging, remerging purposes. context aware store stores consume more memory size than non context stores.| Method Summary | |
|---|---|
identifier: URIRef of the Store. | |
Number of statements in the store. | |
Add a triple to the store. | |
Add context w/o adding statement. | |
bind(self,
prefix,
namespace)
| |
Generator over all contexts in the graph. | |
createForward(self)
| |
createIndex(self)
| |
createPrefixMap(self)
| |
createReverse(self)
| |
defaultContext(self)
| |
Resolve an identifier triple into integers. | |
Resolve an integer triple into identifers. | |
namespace(self,
prefix)
| |
namespaces(self)
| |
prefix(self,
namespace)
| |
remove(self,
triple,
context)
| |
A generator over all the triples matching | |
uniqueObjects(self,
context)
| |
uniquePredicates(self,
context)
| |
uniqueSubjects(self,
context)
| |
Remove context from the list of contexts in a nested index. | |
_setNestedIndex(self,
index,
*keys)
| |
| Inherited from Store | |
Adds each item in the list of statements to a specific context. | |
This closes the database connection. | |
| |
| |
This destroys the instance of the store identified by the configuration string. | |
Allows the store to perform any needed garbage collection | |
Opens the store specified by the configuration string. | |
| |
A variant of triples that can take a list of terms instead of a single term in any slot. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Property Summary | |
|---|---|
| Inherited from Store | |
node_pickler | |
| Class Variable Summary | |
|---|---|
bool |
context_aware = True
|
bool |
formula_aware = True
|
| Inherited from Store | |
bool |
transaction_aware = False
|
| Method Details |
|---|
__init__(self,
configuration=None,
identifier=None)
identifier: URIRef of the Store. Defaults to CWD configuration:
string containing infomation open can use to connect to datastore.
|
__len__(self,
context=None)
Number of statements in the store. This should only account for
non-quoted (asserted) statements if the context is not specified,
otherwise it should return the number of statements in the formula or
context given.
|
add(self, triple, context, quoted=False)Add a triple to the store.
|
addContext(self, context)Add context w/o adding statement. Dan you can remove this if you want |
contexts(self, triple=None)Generator over all contexts in the graph. If triple is specified, a generator over all contexts the triple is in.
|
identifierToInt(self, (s, p, o))Resolve an identifier triple into integers. |
intToIdentifier(self, (si, pi, oi))Resolve an integer triple into identifers. |
triples(self, triple, context=None)A generator over all the triples matching
|
_removeNestedIndex(self, index, *keys)Remove context from the list of contexts in a nested index. Afterwards, recursively remove nested indexes when they became empty. |
| Class Variable Details |
|---|
context_aware
|
formula_aware
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Wed Apr 4 16:05:45 2007 | http://epydoc.sf.net |