Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] how can I retrieve instance of ontology by Protege-OWL API?

Martin O'Connor martin.oconnor at stanford.edu
Mon Apr 30 09:04:07 PDT 2007



You can use the Protege-OWL API [1] to get instances of the class Person
that have the specified values for the properties you list.

Alternatively, for this type of retrieval you could write a SWRL query
of the form:

Person(?x) ^ hasChild(?x, Tom) ^ hasFriend(?x, Jim) ^ hasNationality(?x,
English) ^ liveIn(?x, China) -> query:select(?x)

and use the SWRLQueryAPI [2] to retrieve the results.

Martin

[1] http://protege.stanford.edu/plugins/owl/api/guide.html
[2] http://protege.cim3.net/cgi-bin/wiki.pl?SWRLQueryAPI

hong wrote:

> Dear All,
>
> I’m trying to write a java application which can perform some function
> like instance retrieval from an ontology. For example, in family
> ontology, I would like to retrieve the instance of person, who has a
> child called Tom, has a friend called Jim, has nationality English and
> lives in China. The DL assertion should be like:
> targetPerson≡Person∩hasChild(Tom)∩hasFriend(Jim)∩hasNationality(English)∩liveIn(China),
> but I am not familiar with Protégé-OWL API, so I don’t know how to
> translate this assertion into program code by Protégé-OWL API. Could
> anyone help me?
>
> Thanks a lot.
>
> Hong
>
>------------------------------------------------------------------------
>
>_______________________________________________
>protege-owl mailing list
>protege-owl at lists.stanford.edu
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  
>




More information about the protege-owl mailing list