So far, so good - now I can programmatically create a ChangeSet, Apply it, query the TripleStore I applied it to and retrieve it, and Serialize it (as RDF/XML or NTriples using the supplied RdfWriter implementations in Spiral).
The statements in the ChangeSet are lazy loaded so that you can view the descriptive details without hitting to TripleStore too hard.
Likewise, the descriptive details are lazy loaded so you can pass around ChangeSets (or lists of them) with only the URI set.
ChangeSet should contain a Revert or Undo method - this should generate a new ChangeSet by traversing back through the chain of Preceding ChangeSets (i.e. work forwards from ‘then’ to ‘now’). Each ChangeSet in the chain should be inverted (its Removals and Additions switched) and these StatementCollections should be aggregated to create one final ChangeSet. The final action of Revert is to call Apply on this new ChangeSet. This way we can revert the Revert action in one step, the Revert operation becomes a single action.
To implement this story I will need to create the chaining mechanism, and add the chain traversal functionality.
License
This work is published under a Creative Commons Attribution-Share Alike 2.5 License.
