W3C home > Mailing lists > Public > public-owl-dev@w3.org > April to June 2009

Inverse property on classes

From: Cédric Thiébault <cedric.thiebault@gmail.com>
Date: Wed, 13 May 2009 12:22:09 -0400
Message-ID: <9144d19b0905130922kadfde65u6bf7e37360e39683@mail.gmail.com>
To: public-owl-dev@w3.org

I read in several documentation about RDF/OWL that there is no big
difference between classes and individuals.
Most of the ontologies published on the internet use only classes.

But when I try to use a one to many relationship, it seems to work only with
Here is a very simple example: a pizza has at least one topping and a
topping is for exactly one pizza.

:Pizza rdf:type owl:Class
:Topping rdf:type owl:Class

:hasTopping rdf:type owl:ObjectProperty
       owl:inverseOf :isToppingOf
       rdfs:domain :Pizza
       rdfs:range :Topping

:isToppingOf rdf:type owl:ObjectProperty
       owl:inverseOf :hasTopping
       rdfs:domain :Topping
       rdfs:range :Pizza

:Pizza :hasTopping min 1 :Topping
:Topping :isToppingOf exactly 1 :Pizza

When I create an individual :Pizza_mozzarella and add a property :hasTopping
on :Mozzarella individual, I can work with the inverse property on the
topping and I see that :Mozzarella :isToppingOf :Pizza_mozzarella.
It works great with individual.

But when I try to do the same test with classes:
:Pizza_mozzarella_class :hasTopping some :Mozzarella_class

But I cannot use the inverse property: :Mozzarella_class does not know
anything about :Pizza_mozzarella_class.

Is this normal ?
Are inverse properties usable only on individuals ?

Thanks for your help :-)

Received on Wednesday, 13 May 2009 20:10:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:18 UTC