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
Thanks a lot
Mena
----------------------------------------------------
Mena B. Habib
PhD Student
University of Twente
Faculty of Electrical Engineering, Mathematics and Computer Science.
Database Chair
7500AE Enschede, Netherlands
mail: [email protected]
website: http://wwwhome.ctit.utwente.nl/~badiehm/
Phone: +31 53 489 4549
Fax: +31 53 489 2927
Mobile: +31 68 183 2680
-----Original Message-----
From: Andy Seaborne [mailto:[email protected]] On Behalf Of Andy
Seaborne
Sent: Thursday, March 08, 2012 6:36 PM
To: [email protected]
Subject: Re: Loading model into memory
On 08/03/12 17:26, [email protected] wrote:
> It can be useful in this way. But how to run it using Jena library? Is there
> a function i can use to apply such query on a model?
You can make a SPARQL query or call the path evaluator PathEval directly.
You will need ARQ 2.9.1-incubating-SNAPSHOT from the Apache snapshot repository.
Andy
>
> Thanks a lot
>
> Mena
> ________________________________________
> From: Andy Seaborne [[email protected]] on behalf of Andy
> Seaborne [[email protected]]
> Sent: Thursday, March 08, 2012 5:26 PM
> To: [email protected]
> Subject: Re: Loading model into memory
>
> On 08/03/12 16:06, [email protected] wrote:
>> What I want to do is to see how two entities are related .. I am using the
>> shortest path as a measure for relatedness. I don't care about what kind of
>> relations they had. This why I can't specify certain property.
>> I wonder how { :x DISTINCT(path) ?y } works? What is the output expected for
>> this query? Is it the same as getting the shortest path from x to y?
>
> It's not the shortest path - in fact, it does not say what the path is
> at all, only that ?y is connected to :x.
>
> Andy
>
>>
>> Thanks a lot
>>
>> Mena
>>
>> ----------------------------------------------------
>> Mena B. Habib
>> PhD Student