RDFLib/rdflib — pull request #409 by gromgull (2014-07-11 20:45:39+00:00)
Title: Move Store API to work with identifiers, not graphs

This is a long-time coming fix for #167.

There are two API layers in RDFLib, the Graph level and the Store level. The issue here is the handling of the fourth element of a quad, i.e. the context. Currently both layers use Graph objects to represent this fourth context element, but this leads to lots of trouble (see examples in #167).

This is an attempt to sort this out by having Graphs handled at the Graph API level, and have stores deal with the graph identifiers only. Hopefully, we can make this change transparent to end-users, but plugin developers will probably notice.

A list of changes:

* all store.add/remove methods now raise an Exception if passed a graph.
* the Graph API works on Graph objects and will pack/unpack as required.

This is not yet finished, but a PR helps me get an overview of what is left to fix.