DL Query

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DL Query

sush sush
Folks, 

I have seen various examples on DL Query. But I still cannot find how to:

(1) query a data property of an instance a class? For example how to get the value of the data property "age" and the instance "James" of the class Human. 

(2) query instances of the Object class of a property (and NOT the Subject). For example how to get list of the courses that areTaken by "James". 

Any hint/example would be of great value. 

Thanks. 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query

Matthew Horridge-2
Administrator
Hi,

> I have seen various examples on DL Query. But I still cannot find how to:
>
> (1) query a data property of an instance a class? For example how to get the value of the data property "age" and the instance "James" of the class Human.

You can’t do this with DL queries.  You need to use something like SPARQL(-DL).

> (2) query instances of the Object class of a property (and NOT the Subject). For example how to get list of the courses that areTaken by "James”.

Try this (assuming you have takesCourse as an object property):

inverse (takesCourse) some {James}

This says, give me all instances that have an incoming takesCourse property from the class {James} (i.e. the class just containing the individual James).

Cheers,

Matthew

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: DL Query

Joshua TAYLOR
On Thu, Apr 3, 2014 at 3:40 PM, Matthew Horridge
<[hidden email]> wrote:
>> (2) query instances of the Object class of a property (and NOT the Subject). For example how to get list of the courses that areTaken by "James”.
>
> Try this (assuming you have takesCourse as an object property):
>
> inverse (takesCourse) some {James}
>
> This says, give me all instances that have an incoming takesCourse property from the class {James} (i.e. the class just containing the individual James).


This could also be:

inverse(takesCourse) value James

--
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user