Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are property path depths actually usable in jena sparql?

Tags:

sparql

jena

I've got the following query in Jena.

PREFIX edge: <http://test.com/edge#>
PREFIX property: <http://test.com/property#>
select  distinct ?supertype ?subtype where{
?supertype edge:uses{1,3} ?subtype.
?subtype (edge:extends | edge:implements)+ ?supertype. }

which works fine in sesame, but in jena i get the following error:

Encountered " "{" "{ "" at line 1, column 163. Was expecting one of:

Also I've tried setting it to use sparql 1, 1.1 and the ARQ syntax, but always the same error. Though the same query works in sesame2. So my question is, is the syntax slightly different in Jenas sparql or is it unsupported? (I'm assuming from http://jena.sourceforge.net/ARQ/property_paths.html that it is supported.)

Thankyou.

like image 349
user1690293 Avatar asked Dec 08 '25 21:12

user1690293


1 Answers

Jena is now an Apache project - the website is http://jena.apache.org/. The SF documentation is legacy and there to maintain old links.

{} syntax is not part of SPARQL 1.1 (it got removed)

You can use Syntax.syntaxARQ to get extended syntax which does include {}/

You can use http://www.sparql.org/query-validator.html to check.

like image 127
AndyS Avatar answered Dec 11 '25 18:12

AndyS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!