Diogo, When I implemented similar functionality for Granatum I implemented a QueryEngine by extending QueryEngineMain and overriding modifyOp(Op). I was able to make extensive modifications to the query (including inserting service calls). It is not trivial but it is doable. I assume you are trying to do something like FedX or DARQ.
Claude On Thu, Mar 21, 2013 at 1:45 AM, Diogo FC Patrao <[email protected]>wrote: > Hello > > I'm working on a sparql query "expander", that is, it add triples and > filters to a query in order to emulate some inference (say you have A -> B > AND C, and a query SELECT * { ?s rdfs:type A }, it would return SELECT * { > ?s rdfs:type B. ?s rdfs:type C}). > > I'm manipulating sparql queries on the algebra level (using Transformer), > and then I'm returning it as a query, using OpAsQuery. However, not all > algebras can be translated back, specifically, those using SERVICE. > > I found this link [1] and decided to execute the algebra directly. However, > the example code in the link has two issues (for what I want): > > a) it returns a QueryIterator, not a Resultset. > > b) it`s not clear how I specify a remote sparql endpoint. > > c) I feel like I would have to rewrite (or clone) some code > > So I thought that maybe the best thing for me would be to run my > transformation in the middle of the query execution pipeline. > > Is there a way to accomplish that? If not, what you feel as the best way > out (including implementing all stuff missing on OpAsQuery)? > > Thanks in advance! > > > > [1]: > > http://mail-archives.apache.org/mod_mbox/jena-users/201210.mbox/%[email protected]%3E > > -- > diogo patrĂ£o > -- I like: Like Like - The likeliest place on the web<http://like-like.xenei.com> Identity: https://www.identify.nu/[email protected] LinkedIn: http://www.linkedin.com/in/claudewarren
