Re: Analyzing SPARQL Queries

2019-10-07 Thread Andy Seaborne
Hi, There is more machinery around the algebra for running visitor patterns over algebra expressions than there is for syntax (ElementVisitor). RecursiveElementVisitor applies an ElementVisitor over an abstract syntax tree. There isn't anything I know of to do the analysis of the pattern.

Re: Analyzing SPARQL Queries

2019-10-07 Thread Claude Warren
Bart, I was referring to the querybuilder source code. On Mon, Oct 7, 2019 at 11:53 AM Bart van Leeuwen wrote: > Claude, > > This sounds useful, are you referring to the actual Jena source code for > your examples? > > Met Vriendelijke Groet / With Kind Regards > Bart van Leeuwen > > >

Re: Analyzing SPARQL Queries

2019-10-07 Thread Martynas Jusevičius
Hi Bart, SPIN would help you to turn the SPARQL query into RDF: https://spinrdf.org/sp.html#sp-TriplePattern Then you could probably add SPIN Rules on top to infer what you need: https://spinrdf.org/spin.html#spin-rules-construct On Mon, Oct 7, 2019 at 3:13 AM Bart van Leeuwen wrote: > Hi, >

Re: Analyzing SPARQL Queries

2019-10-07 Thread Bart van Leeuwen
Claude, This sounds useful, are you referring to the actual Jena source code for your examples? Met Vriendelijke Groet / With Kind Regards Bart van Leeuwen twitter: @semanticfire tel. +31(0)6-53182997 Netage B.V. http://netage.nl Esdoornstraat 3 3461ER Linschoten The Netherlands From:

Re: Analyzing SPARQL Queries

2019-10-07 Thread Claude Warren
Bart, Not sure exactly what you are trying to do or actually looking for but, assuming you have a parsed query and you want to detect the pattern so you can state that ?t is a class you could use the ElementVisitor pattern. See the query builder WhereHandler.build() method as well as the

Re: Analyzing SPARQL Queries

2019-10-07 Thread Bart van Leeuwen
Adrian, I'm looking for code examples specifically Jena, don't see any references here. Met Vriendelijke Groet / With Kind Regards Bart van Leeuwen twitter: @semanticfire tel. +31(0)6-53182997 Netage B.V. http://netage.nl Esdoornstraat 3 3461ER Linschoten The Netherlands From: Adrian