Skip to content

Given a Graph, can it be used as default graph for a Dataset? #319

@uholzer

Description

@uholzer

Imagine, you are given a Graph, maybe created with Graph() or maybe backed by some arbitrary store. Maybe, for some reason you need a Dataset and you want your Graph to be the default graph of this Dataset. The Dataset should not and will not need to contain any other graphs.

Is there a straightforward way to achieve this without copying all triples? As far as I know, Dataset needs a context_aware and graph_aware store, so it is not possible to just create a Dataset backed by the same store. Graham Klyne is interested in this because he wants to provide a SPARQL endpoint for a given rdflib.Graph, but my implementation of a SPARQL endpoint requires a Dataset. I don't really like to implement support for plain graphs, so I wonder whether there is a simple solution.

Also, I wonder whether it would be useful to have a true union of several graphs backed by different stores.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions