Ania David
Ania David

Reputation: 1198

is it correct that a class can be an instance?

In this document https://www.w3.org/TR/rdf-schema/#ch_introduction

it is written:

rdfs:Resource is an instance of rdfs:Class.

enter image description here

however it is also written:

This is the class of everything

enter image description here

is this a typo? can a class be an instance ?

Upvotes: 1

Views: 556

Answers (2)

chris
chris

Reputation: 1817

That's actually an interesting question. I just want to add to your comment in CaptSolo's answer:

but can I define my custom classes as instances of an instance? ( i highly doubt that )

It's not so much a question of whether you "can" do something or not (at least not in this case), but rather whether what you do will make sense. After all the Semantic Web was built on the premise that anyone can say anything about anything. Sometimes there are consequences, which can lead to "logical" inferences about your data.

So this one makes sense:

:foo a rdfs:Class.
:bar a :foo.

while this one doesn't:

:george a foaf:Person.
:foo a :george.

Can you assert both? Technically speaking, yes, I don't think there is a triple store that will stop you from doing so. But the latter is illogical - every RDFS class is defined as the set of its instances, so you are treating a person, "George", as a concept of sorts. If your ontology or data doesn't make sense, then none will use it.

Upvotes: 2

CaptSolo
CaptSolo

Reputation: 1801

All RDFS classes are instances of the rdfs:Class class. Since rdfs:Resource is a class of everything it is also a class and thus an instance of rdfs:Class.

This may make sense if you consider that RDFS is itself defined in RDFS. What other type would you define rdfs:Class to be if not the rdfs:Class itself?

About "can class be an instance?" - when defining an ontology you define classes as instances of rdfs:Class or owl:Class. Technically they already are instances [of these classes].

Upvotes: 2

Related Questions