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 to retrieve current class or object annotation properties

Thomas Russ tar at ISI.EDU
Tue Oct 21 18:09:02 PDT 2008


On Oct 21, 2008, at 1:06 PM, Xiao, Eric wrote:

> Hi All,
>
> I’d like to know whether we can retrieve the OWL Annotation  
> Properties from its own class or object but not the inherited  
> properties from parents.
>
> Currently, I have:
>
> Collection properties = owlModel.getOWLAnnotationProperties();
>
>
> It returns all the OWL annotation properties including the ones  
> inherited from parents.  But, I have the requirements to display the  
> current class or object OWL properties.

Actually, what this is doing is returning all OWLAnnotationProperties  
in the entire model.  That is because you are asking the owlModel for  
the annotation properties.

You probably want to use something more like  
RDFResource.getPossibleRDFProperties or RDFResource.getRDFProperties,  
applied to the actual class object to get the properties themselves.   
If you want them together with values, then you will also need  
getPropertyValue or getPropertyValues as well, also on the class object.

>
> Is there any other method in the OWLModel to do this?  Or does  
> anyone know whether there is a difference from the RDFProperty  
> between the parent and child in the returned collection?

Annotation properties should only apply to the object itself.  There  
shouldn't be any inheritance along the the class-subclass link.




More information about the protege-owl mailing list