Protege-OWL API question

2 messages Options
Embed this post
Permalink
Thiranjith

Protege-OWL API question

Reply Threaded More More options
Print post
Permalink
Hi,

I am working with Protoge-OWL API (3.4), and need to find all the individuals belonging to the domain of a particular property.

For example;
In my model there is a property called 'hasAnimal' whose range is 'Animal' class and domain is 'Person' class. I want to find out all the Person individuals who satisfy the condition where they have an animal called "Zimba" (assume this is the name a particular Animal individual who can belong to many 'Person's).

I know that I can get the property (OWLProperty) and write my own code to find all Person individuals that satisfy the condition. I would like to know whether there is a cleaner way of doing it, since this seems like a common thing to do.

Thanks in advance!

Thira.

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Martin O'Connor

Re: Protege-OWL API question

Reply Threaded More More options
Print post
Permalink
One option is to use SQWRL queries [1] and execute them from your Java
code using its API [2].

The query would be something like:

Person(?p) ^ hasAnimal(?p, Zimba) -> sqwrl:select(?p)

Martin

[1] http://protege.cim3.net/cgi-bin/wiki.pl?SQWRL
[2] http://protege.cim3.net/cgi-bin/wiki.pl?SQWRLQueryAPI

Martin

 Thiranjith wrote:

> Hi,
>
> I am working with Protoge-OWL API (3.4), and need to find all the
> individuals belonging to the domain of a particular property.
>
> For example;
> In my model there is a property called 'hasAnimal' whose range is
> 'Animal' class and domain is 'Person' class. I want to find out all
> the Person individuals who satisfy the condition where they have an
> animal called "Zimba" (assume this is the name a particular Animal
> individual who can belong to many 'Person's).
>
> I know that I can get the property (OWLProperty) and write my own code
> to find all Person individuals that satisfy the condition. I would
> like to know whether there is a cleaner way of doing it, since this
> seems like a common thing to do.
>
> Thanks in advance!
>
> Thira.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>protege-owl mailing list
>[hidden email]
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  
>

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03