Skip to content

conjunctive_graphs

An RDFLib ConjunctiveGraph is an (unnamed) aggregation of all the Named Graphs within a Store. The ConjunctiveGraph.get_context method can be used to get a particular named graph for use, such as to add triples to, or the default graph can be used.

This example shows how to create Named Graphs and work with the conjunction (union) of all the graphs.

Attributes:

LOVE module-attribute

LOVE = Namespace('http://love.com#')

LOVERS module-attribute

LOVERS = Namespace('http://love.com/lovers/')

cjohn module-attribute

cjohn = URIRef('http://love.com/lovers/john')

cmary module-attribute

cmary = URIRef('http://love.com/lovers/mary')

g module-attribute

gjohn module-attribute

gmary module-attribute

john module-attribute

john = URIRef('http://love.com/lovers/john')

mary module-attribute

mary = URIRef('http://love.com/lovers/mary')

store module-attribute

store = Memory()

xx module-attribute

xx = x