W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2003

OWL - restrict subclassing?

From: Heiko Gottschling <gottschl@in.tum.de>
Date: Mon, 8 Dec 2003 13:39:14 +0100
To: www-rdf-interest@w3.org
Message-Id: <200312081339.14703.gottschl@in.tum.de>

In OWL, is there a way of specifying that a class may only have an enumerated 
set of subclasses, e.g. 'Fruit' may only be subclassed by 'Apple' and 
'Banana'?

What I've come up with is this:


<owl:Class rdf:ID="NonAppleBanana">
  <owl:complementOf>
    <owl:Class>
      <owl:unionOf rdf:parseType="Collection">
        <owl:Class rdf:about="#Apple" />
        <owl:Class rdf:about="#Banana" />
      </owl:unionOf>
    </owl:Class>
  </owl:complementOf>
</owl:Class>

<owl:Restriction rdf:about="#NonAppleBanana">
  <owl:onProperty rdf:resource="&rdfs;subClassOf" />
  <owl:allValuesFrom>
    <owl:Class>
      <owl:complementOf rdf:resource="#Fruit" />
    </owl:Class>
  </owl:allValuesFrom>
</owl:Restriction>


Which says that anything which is not an apple or a banana may subclass only 
such things which are not fruit...

The catch here is that the property being restricted is the RDFS 'subClassOf' 
property...

What do you think?

Heiko

PS I am not looking for the 'oneOf' constructor, which restricts the 
individuals belonging to a class rather than its subclasses
Received on Monday, 8 December 2003 07:45:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:03 GMT