Re: OWL - restrict subclassing?

> 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'?

Just what do you have against oranges? Okay, Okay, you're only using it as an 
example, I know...

> 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...

I think that's okay, but why not have:

<owl:Class rdf:ID="Fruit">
    <owl:unionOf rdf:parseType="Collection">
        <owl:Class rdf:resource="#Apple" />
        <owl:Class rdf:resource="#Banana" />
    </owl:unionOf>
</owl:Class>

Then something can only be a Fruit if it is an Apple or if it is a Banana, 
which would include something that was of a type which was a subclass of Apple 
or Banana, that is if you had:

<owl:Class rdf:ID="Golden_Delicious">
    <rdfs:subClassOf rdf:resource="#Apple" />
</owl:Class>

<owl:Class rdf:ID="Dog">
    <owl:DisjointWith rdf:resource="#Apple" />
    <owl:DisjointWith rdf:resource="#Banana" />
</owl:Class>

Then parsing

<Golden_Delicious rdf:ID="#appleToday" />
<Dog rdf:ID="#Rex" />

to have:

<xxx:appleToday> <rdf:type> <xxx:Golden_Delicious> .
<xxx:Rex> <rdf:type> <xxx:Dog> .

then the first triple, combined with the OWL statements, entails:

<xxx:appleToday> <rdf:type> <xxx:Apple> .

which in turn entails:

<xxx:appleToday> <rdf:type> <xxx:Fruit> .

We also know that the following are *not* true:

<xxx:Rex> <rdf:type> <xxx:Apple> .
<xxx:Rex> <rdf:type> <xxx:Banana> .
<xxx:Rex> <rdf:type> <xxx:Fruit> .

--
Jon Hanna                   | Toys and books
<http://www.hackcraft.net/> | for hospitals:
                            | <http://santa.boards.ie/>

Received on Monday, 8 December 2003 08:06:24 UTC