On 13 Jul 2011, at 10:24, Andy Seaborne wrote: > > > On 13/07/11 10:04, Laurent Pellegrino wrote: >> Hi all, >> >> I would like to rewrite a SPARQL query. My idea consists in compiling >> the SPARQL query string to the algebra form. Then, I can edit the >> algebra tree (prune it for example). However, I don't know how to >> translate the algebra into a SPARQL query string. Is it possible to do >> it from the algebra? >> >> Kind Regards, >> >> Laurent > > See > OpAsQuery.asQuery(Op) > > It's not perfect.
We were using this quite extensively in a recent project, and while not perfect we certainly battle tested a decent part of it, including SPARQL 1.1 group and count. Related: [1]. Damian [1] <http://openjena.org/wiki/ARQ/Manipulating_SPARQL_using_ARQ>
