Re: Inheriting property restrictions

Hi Ben,

The quick answer is that rdfs:subClassOf is a transitive relationship.

To see how that applies to your case, it means that WebCar is a
subclass of Car, the Colors restriction, and the HTMLColors
description.  So both the restrictions must be applied.

As to the meaning of this... it depends on whether Colors and
HTMLColors are mutually exclusive sets.  If not, then there's no
issue.  If they are (as I infer here), then it is not possible to
create a statement which uses the PaintColor property on a WebCar
(incidentally, the convention is that properties start with a lower
case letter).  It's perfectly legal to be unable to create a statement
like this, unless you've declared a minimum cardinality for PaintColor
that is greater than 0.

On your second question, it is fine to add more restrictions to the
use of a predicate in a subclass, so it should not generate a warning
in the general case.

OTOH, if it can be determined that the set of values is an empty set
(for instance, several owl:allValuesFrom restrictions with an empty
intersection) then it might be useful to generate a warning.  However,
determining this will be extremely hard or impossible except in simple
cases, so I wouldn't think it is something you can do most of the
time.

Regards,
Paul

On 9/6/06, ben syverson <w3@likn.org> wrote:
>
> Hi everyone,
>
> I have a two-part question that the OWL specs don't seem to address.
>
> 1. Does a subClass inherit its parents' property restrictions? I
> assume it does, but what if the subclass declares a restriction of
> its own for the same property? Which restriction should be paid
> attention to?
>
> For example, say I have a class "Car" which restricts the property
> "PaintColor" to the class "Colors":
> <owl:Class rdf:ID="Car">
>         <rdfs:subClassOf>
>                 <owl:Restriction>
>                         <owl:onProperty rdf:resource="#PaintColor" />
>                         <owl:allValuesFrom rdf:resource="#Colors" />
>                 </owl:Restriction>
>         </rdfs:subClassOf>
> </owl:Class>
>
> But then a subclass of "Car" is added, named "WebCar," and it
> restricts the same property (PaintColor) to "HTMLColors," which is a
> totally different class than "Colors."
> <owl:Class rdf:ID="WebCar">
>         <rdfs:subClassOf rdf:resource="#Car" />
>         <rdfs:subClassOf>
>                 <owl:Restriction>
>                         <owl:onProperty rdf:resource="#PaintColor" />
>                         <owl:allValuesFrom rdf:resource="#HTMLColors" />
>                 </owl:Restriction>
>         </rdfs:subClassOf>
> </owl:Class>
>
> I'm not even sure if that's the correct way to express what I'm
> saying in RDF/XML, but you get the picture.
>
> Which restriction on PaintColor should be heeded?
>
> 2. If you were building a tool that output OWL, would it make sense
> to prevent the user from creating the restriction that "WebCar's
> PaintColor must be from HTMLColors," if we knew that a parent of
> WebCar already had a restriction on PaintColor?
>
> Thanks in advance!
>
> - ben syverson
> likn.org
>
>
>

Received on Wednesday, 6 September 2006 22:10:18 UTC