Search Mailing List Archives
[protege-owl] How to retrieve current class or objectannotation properties
EXiao at imc.com
Wed Oct 22 07:48:27 PDT 2008
That is quite helpful to know.
From: protege-owl-bounces at lists.stanford.edu
[mailto:protege-owl-bounces at lists.stanford.edu] On Behalf Of Thomas Russ
Sent: Tuesday, October 21, 2008 9:09 PM
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] How to retrieve current class or
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.
protege-owl mailing list
protege-owl at lists.stanford.edu
Instructions for unsubscribing:
More information about the protege-owl