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] Which methods do I use to retrieve information on class property values?

Thomas Russ tar at ISI.EDU
Mon Oct 27 16:11:01 PDT 2008


Unfortunately I only have time right now to sketch a solution without  
showing code, but since it's mission critical to you, I hope it is  
enough.

There are two possibilities for what you mean with your description.

1.  has_Lexicalisation is an AnnotationProperty and associates the  
value directly with the class object.

    In that case, you want to use the standard getPropertyValue on the  
class, and the method that finds matching values, perhaps  
OWLModel.getMatchingResources ?

2.  has_Lexicalisation is part of a class definition restriction on  
the class.

     What you need to do is get the appropriate hasValueRestriction  
that is associated with the class object and use getHasValue on it.   
Not quite sure how to get those restrictions.  Maybe  
RDFSClass.getSuperclasses and then filter for type OWLHasValue ?

     For your second question you might find  
OWLModel.getOWLRestrictionsOnProperty useful.


On Oct 27, 2008, at 1:00 PM, Patrick McCrae wrote:

> Hi, List -
>
> I have already posted this question on the OWL Developer List but  
> did not receive any replies so I am hoping to be more lucky on this  
> list. Your help with this query would be much appreciated since it  
> relates to a mission critical aspect of my current project.
>
> In my ontology I have asserted that some classes have the property  
> 'has_Lexicalisation' whose value is an individual of another class  
> 'Lexicalisation'.
>
> Example:    (Class) 'Baker.m'  ---has_Lexicalisation---> (Individual  
> of Class Lexicalisation) 'baker'
>
> I am now wondering which methods in the OWL API I need to use to  
> obtain the following information:
> 	• What value does (Class) 'Baker.m' have for (Property)  
> 'has_Lexicalisation'?
> Expected answer: (Individual) 'baker'
>
> 	• Which class has value (Individual) 'baker' for (Property)  
> 'has_Lexicalisation'?
> Expected answer: (Class) 'Baker.m'
> I would have expected to find the desired methods in the OWLReasoner  
> class ... but somehow I seem not to have found the right ones. This  
> may be related to querying for the subject and object of the  
> relation 'has_Lexicalisation' in the RDF-way of looking at things.
>
> Could anybody please advise?
>
> Thanks in advance and kind regards -
>
> Pat
> _______________________
>
> Patrick McCrae
>
> CINACS Graduate Research Group
> Department of Informatics
> Hamburg University
> Vogt-Kölln-Straße 30
> 22527 Hamburg, Germany
>
> patrick.mccrae at informatik.uni-hamburg.de
> fon: +49 . 40 . 428 83 - 23 60
> fax: +49 . 40 . 42883 - 2515
>
> -- 
> _______________________
>
> Patrick McCrae
>
> CINACS Graduate Research Group
> Department of Informatics
> Hamburg University
> Vogt-Kölln-Straße 30
> 22527 Hamburg, Germany
>
> patrick.mccrae at informatik.uni-hamburg.de
> fon: +49 . 40 . 428 83 - 23 60
> fax: +49 . 40 . 42883 - 2515
> _______________________________________________
> 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