Re: AnnotationProperty vs ObjectProperty (Re: RDFS schema files)

On Tue, Jul 17, 2012 at 9:47 AM, Vladimir Alexiev <vladimir@sirma.bg> wrote:
> In this export a lot of the properties are declared AnnotationProperty instead of ObjectProperty.

Yes, I did not tidy up, I just did a plain reexport of how Protege
(and thus the OWL API) understood the current RDFS definitions.

> oa:hasSelector rdf:type owl:AnnotationProperty ;
>                rdfs:label "hasSelector" ;
>                rdfs:comment "The relationship between a oa:SpecificResource and a oa:Selector." ;
>                rdfs:isDefinedBy <http://www.w3.org/ns/openannotation/core/> ;
>                rdfs:domain oa:SpecificResource .
>
> oa:hasSelector rdf:type owl:ObjectProperty ;
>                rdfs:label "hasSelector" ;
>                rdfs:comment "The relationship between a oa:SpecificResource and a oa:Selector." ;
>                rdfs:isDefinedBy <http://www.w3.org/ns/openannotation/core/> ;
>                rdfs:range oa:Selector .
>
> Which is the right way?

It should be an ObjectProperty in this case.

I think Protege has gone for an AnnotationProperty as the domain of an
untyped "property" can be any kind of property (due to OWL2 punning),
and it can't be certain which one it is. The range goes to a class, so
it is happy to call that an Object Property. I guess the reason you
here see oa:hasSelector as both kind of properties rather than
settling on an object property, is because of OWL Punning [1], which
allows both to co-exist with the same name. The simple solution to
avoid this is to type every property as object, data type or
annotation property.


It is generally considered good style to not use such punning except
where really needed.

In general these days you don't need to make annotation properties
except where you generally want to use it for annotating
ontologies/classes/properties themselves; and a few other cases where
you don't want any OWL reasoning to be affected by the use of those
properties; or if you are describing vague legacy vocabularies like
Dublin Core where dc:creator can be both an object and literal. (with
punning you can then define both an object property and annotation
property).


[1] http://www.w3.org/TR/owl2-new-features/#F12:_Punning

-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester

Received on Monday, 23 July 2012 09:49:44 UTC