W3C home > Mailing lists > Public > semantic-web@w3.org > September 2006

Re: Individuals with more than one rdf:type

From: Paul Gearon <gearon@ieee.org>
Date: Tue, 19 Sep 2006 16:31:17 -0500
Message-ID: <a25ac1f0609191431j5720676dycc5d5235561775ae@mail.gmail.com>
To: "ben syverson" <w3@likn.org>
Cc: semantic-web@w3.org

On 9/19/06, ben syverson <w3@likn.org> wrote:
>
> Is there anything wrong with creating individuals with multiple
> rdf:type declarations? Ontologies with such individuals seem to
> validate fine...

Having multiple types is both expected and desirable.  This is
demonstrated in the following (I'll stick to triples for my syntax):

  <ns:x> <rdf:type> <ns:ClassA>
  <ns:ClassA> <rdfs:subClassOf> <ns:ClassB>

By RDFS semantics (not even OWL) this means that <ns:x> must also have
a type of <ns:ClassB>.  Similarly, rdfs:range and rdfs:domain apply
new types to instances all the time.

The only time you cannot have multiple types is if the types are
completely disjoint, or some other similar restriction (we're talking
OWL now).

> <rdf:Description rdf:about="#MacBookPro">
>         <rdf:type rdf:resource="#Laptop" />
>         <rdf:type rdf:resource="#MacintoshComputer" />
>         <rdf:type rdf:resource="#i386Computer" />
> </rdf:Description>
>
> Can I be assured that "MacBookPro" will inherit all the properties of
> its three parent classes?

MacBookPro is an instance of these classes, not a subclass.  So no, it
won't "inherit" their properties.  However, all of those properties
are valid for use on MacBookPro.

More precisely, any property with a domain of the parent classes
(Laptop, MacintoshComputer, i386Computer) will not add a new type to
the MacBookPro object if that property is used on it.  Note that other
properties can still be used.  If have a property of <ns:hasCamera>
and a class of <ns:CameraEnabledDevice>:

  <ns:hasCamera>  <rdfs:domain> <ns:CameraEnabledDevice>

Then I could use this on MacBookPro:

  <ns:MacBookPro> <ns:hasCamera> <ns:BuiltInISight>

which adds ns:CameraEnabledDevice to the list of types for MacBookPro.

Regards,
Paul
Received on Tuesday, 19 September 2006 21:31:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:53 UTC