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 Get Inferred Subclasses use Java

Thomas Russ tar at isi.edu
Thu Aug 19 16:58:01 PDT 2010


On Aug 19, 2010, at 2:59 PM, Andre Luis wrote:

>
> Hi Jennifer,
>
> Examples of wiki page helped me get subclasses from classes, using  
> reasoner.
>
> But what I need now is to use the reasoner to fetch subclasses from  
> restrictions (owlSomeRestriction).
>
> For example, from the restriction "hasTopping some tomatoes," find  
> all classes that use this restriction.

If you look at the javadoc information http://protege.stanford.edu/protege/3.4/docs/api/owl/ 
  then you will discover that restrictions are also classes.  So you  
can use the same code to get the inferred subclasses from a  
restriction.  It just isn't and OWLNamedClass.  It will be an OWLClass  
(or in your specific case the subinterface OWLExistentialRestriction).

So, just create one of those restrictions and pass it in to the  
ProtegeReasoner.getSubclasses() method.

>
> I have not found any such example in the wiki page.
>
>
>
> André
>
>
> 2010/8/19 Jennifer Vendetti <vendetti at stanford.edu>
> Hello Andre,
>
> We have a wiki page for developers that details programmatic  
> interaction with reasoners.  The page includes example code for  
> getting inferred subclasses:
>
> http://protegewiki.stanford.edu/wiki/ProtegeReasonerAPI
>
> Jennifer
>
>
>
> On 8/17/2010 9:49 PM, Andre Luis wrote:
>>
>> Example use protege 3.4.4. Reasoner Pellet.
>>
>> Click with right button in asserted conditions (i.e. hasTopping  
>> some TomateTopping on pizzaMargherita) and select "Get Inferred  
>> Subclasse" protege returns all the pizza's class that have this  
>> restriction.
>>
>> How can'I do this using java class?
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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