RDFLib/rdflib — pull request #402 by bcogrel (2014-06-12 21:12:25+00:00)
Title: SPARQLStore graph awareness

Here is a proposal for making `SPARQLStore` and `SPARQLUpdateStore` be `graph_aware` (see issue #399).

Two new methods `add_graph` and `remove_graph` have been added to these classes. They raise a read-only error when simple `SPARQLStore` are used. The `SPARQLUpdateStore` uses the `CREATE` and `DROP` SPARQL commands.

The default graph of the `Dataset` is the default graph of the SPARQL endpoint.

To test it, I have adapted `test_dataset`. However, the SPARQL endpoint configuration it requires is in conflict with `test_sparqlupdatestore`. Indeed the latter wants an union default graph (like `tdb:unionDefaultGraph`) that may cause the default graph to be read-only while the former tests the "non union" and writes into the default graph. Any suggestion? Should we execute these tests manually one by one? Remind that tests are skipped if no endpoint is available.

Please note that commits of #401 have also been included in this patch.