Home | Trees | Index | Help |
---|
Package rdflib :: Package backends :: Module IOMemory :: Class IOMemory |
|
object
--+ |Backend
--+ | IOMemory
An integer-key-optimized-context-aware-in-memory backend.
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 backends consume more memory size than non context backends.Method Summary | |
---|---|
__init__(self,
default_context)
| |
__len__(self,
context)
| |
Add a triple to the store. | |
Add context w/o adding statement. | |
bind(self,
prefix,
namespace)
| |
contexts(self,
triple)
| |
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)
| |
remove_context(self,
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 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) |
Method Details |
---|
add(self, triple, context=None)Add a triple to the store. |
addContext(self, context)Add context w/o adding statement. Dan you can remove this if you want |
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. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 | http://epydoc.sf.net |