RE: rdfs:class and rdfs:resource

> Hello all,
>
> I have been working in the RDF schema specification and I have trouble
> with the concepts of:
> rdfs:Class and rdfs:Resource
> rdfs:Resource is the most general class and rdfs:class is the concept
> of class.
> Thus,I donīt understand the meaning of that rdfs:Resource is an
> instance of rdfs:class and that every class is a rdfs:subClassOf
> rdfs:Resource.
> I hope someone can give an help on this.
> Kindly regards,
> Teresa

It's a bit circular. It's one of those things that can seem confusing at
first, and then after a moment of Satori it becomes so obvious that it's
hard to explain. I'll have a stab at it anyway.

Everything is a resource. We say "resource" rather than "thing" or "entity"
because this is the web, and "resource" is the web term.

A hypothetical resource is #jonsCar (particularly hypothetical since I don't
drive).

Classes define types of resource. A hypothetical class is #Car.

To say that #jonsCar is a #Car we use:

<#jonsCar> <rdf:type> <#Car> .

or in RDF/XML:

<Car rdf:ID="jonsCar" />

Now not only does RDF allow us to say things about #jonsCar, but it also
allows us to say things about #Car. In particular we would benefit from
doing so in schemata.

And just as #jonsCar is a type of #Car, so #Car is a type of rdfs:Class. We
can express this as:

<#Car> <rdf:type> <rdfs:Class> .

or in RDF/XML:

<rdfs:Class rdf:ID="Car" /> .

rdfs:Class is itself of type rdfs:Class:

<rdfs:Class> <rdf:type> <rdfs:Class> .

And we can also have a class to which everything belongs; rdfs:Resource.

<#jonsCar> <rdf:type> <rdfs:Resource> .
<#Car> <rdf:type> <rdfs:Resource> .
<rdfs:Class> <rdf:type> <rdfs:Resource> .
<#anythingAtAll> <rdf:type> <rdfs:Resource> .

Now because rdfs:Resource is the object of these rdf:type statements it is
clearly a Class, hence <rdfs:Resource> <rdf:type> <rdfs:Class>.

And because everything is an instance of rdfs:Resource, then all classes are
subclasses of rdfs:Resource (#jonsCar cannot be a #Car unless it is also a
thing, and everything is an rdfs:Resource).

In practice you will likely use rdfs:Class more than rdfs:Resource, simply
because it's more often worth stating that something is a class.

Received on Wednesday, 7 May 2003 12:24:17 UTC