user1690293
user1690293

Reputation: 423

Are property path depths actually usable in jena sparql?

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.

Upvotes: 3

Views: 351

Answers (1)

AndyS
AndyS

Reputation: 16630

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.

Upvotes: 5

Related Questions