On 02/08/13 08:55, Amin beyranvand wrote:
Hi
I want to write an engine for processing SPARQL queries. i want to use jena to
parse SPARQL queries and convert them to a internal form for my application. i
can parse queries and convert them to query algebra using this code:
Query q=QueryFactory.create("select ?s ?o where {?s ?p ?o }");
Op op = Algebra.compile(q) ;
but i don't know how to use op and what is the uses of op.visit(opVisitor) .
in more detail: i want to convert query to a left deep tree and then process
query operators in a pipelined manner.
See
http://answers.semanticweb.com/questions/23925/parsing-a-sparql-query
You want to hook into the execution - that will pass to you each of the
algebra operations, and you'll get e.g. OpBGP where you can get the
triples easily.