InformationStore
RDFLib's InformationStore is a TripleStore with support
for contexts.
InformationStore Interface
The InformationStore Interface extends the TripleStore
interface. See the TripleStore
documentation for a description of the TripleStore interface.
InformationStore overrides the following methods from
TripleStore to allow an optional context argument:
- add(triple, context)
- Adds triple, a tuple of the form (subject, predicate, object), to the InformationStore.
- remove(triple, context)
- Removes triple, a tuple of the form (subject, predicate, object), to the InformationStore.
- triples(pattern, context)
- A generator over all the triples in the InformationStore matching pattern. Pattern is a tuple of the form (subject, predicate, object) where each of subject, predicate and object are either specified or None to indicate any value will match.
- contexts(triple=None)
- A generator over all the contexts or if triple is specified a generator over all the contexts triple is in.
- __init__(self, path=None, backend=None)
- load(self, location, format="xml")
- get_context(self, identifier)
- remove_context(self, identifier)