owmeta_core.context_store module

class owmeta_core.context_store.ContextStore(context=None, include_stored=False, imports_graph=None, **kwargs)[source]

Bases: Store

A store specific to a Context

A ContextStore may have triples

Parameters
contextContext

The context to which this store belongs

include_storedbool

If True, the backing store will be queried as well as the staged triples in context

imports_graphStore or Graph

The graph to query for imports relationships between contexts

**kwargs

Passed on to Store

contexts(triple=None)[source]

Generator over all contexts in the graph. If triple is specified, a generator over all contexts the triple is in.

if store is graph_aware, may also return empty contexts

Returns

a generator over Nodes