On 13/03/12 12:07, [email protected] wrote:
Hi Andy

I tried this query :
Query query = QueryFactory.create("SELECT * WHERE { 
\"http://www.mpii.de/yago/resource/Alexandria\"; DISTINCT(path) 
\"http://www.mpii.de/yago/resource/Egypt\"; } ");
But it gives me this error:
Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Encountered " "distinct" 
"DISTINCT "" at line 1, column 64.

I am using ARQ 2.9.0, Core 2.7.0,  TDB 0.9.0
I could not find ARQ 2.9.1

That query has a number of problems:

1/ DISTINCT(..) is only in the development build of ARQ 2.9.1 (location below).

2/ it's a syntax extension, you need "create(..., Syntax.syntaxARQ)" to enable it

3/ You need to put a path expression inside DISTINCT(...) It does not find arbitrary paths, it matches a path you give it. You can't have variables there either. Not sure that YAGO has for properties. A FOAF example is:

 ?s distinct(foaf:knows+) ?t

although for work-in-progress reasons is the same as

 ?s foaf:knows+ ?t

unlike ARQ 2.9.0

See also this email:
http://mail-archives.apache.org/mod_mbox/incubator-jena-users/201203.mbox/%3C4F5A6D38.5070204%40apache.org%3E

ARQ 2.9.1 development build:

https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-arq/2.9.1-incubating-SNAPSHOT/


Thanks a lot

Mena

        Andy

Reply via email to