kasei/perlrdf — pull request #40 by kba (2011-12-11 23:53:00+00:00)
Title: SPARQL/Update Serializer

Hey Gregory,

I've written a very simple serializer for SPARQL/Update, that allows specifying both a model for insertion and a model for deletion and outputs SPARQL/U that is compatible with RDF::Endpoint.

The serializer inherits from the NTriples serializer, has an ad-hoc interface and won't work for quads/named graphs as is. I'd be happy to refactor it if you have any hints as to how it *should* be designed. I could also adapt it to the new serializer framework (branch feature-serializer).

The reason I'd like to have such a serializer is that I'm writing a Moose-to-Trine-and-back framework (https://bitbucket.org/kb/p5-moosex-semantic) and I've thought up a RdfObsolescence role that stores obsolete statements (https://bitbucket.org/kb/p5-moosex-semantic/src/tip/lib/MooseX/Semantic/Role/RdfObsolescence.pm, test file: https://bitbucket.org/kb/p5-moosex-semantic/src/tip/t/role_obsolescence.t) and lets MooseX::Semantic-enabled classes send data to SPARQL endpoints that is synchronized with the actual application data.