Instances vs Classes in RDFS
Asked Answered
P

1

8

The description of the base classes defined by RDFS in the W3C reference document states that some classes are instances of one class and a subclass of another (or in some cases an instance and subclass of the same class). Coming from a more traditional object-oriented background, the concept of classes as instances eludes me and I was wondering if anyone could explain to me the effective difference between a class as an instance and a class as a subclass in RDFS. Thank you!

Pink answered 24/6, 2011 at 18:14 Comment(1)
"Coming from a more traditional object-oriented background, the concept of classes as instances eludes me." Plenty of object-oriented programming languages have classes as instances of other classes. E.g., in Java, java.lang.String.class is an instance of java.lang.Class (and java.lang.Class.class is an instance of java.lang.Class, too). That said, the concept of class in RDF(S) and OWL is rather different from the concept of classes in object oriented programming languages.Superintendent
K
11

An RDFS class is defined as the set of its instances. Consider the class of abstract ideas. Members – instances – of that set include love, honour, duty, pi, evolution, etc. This view of a class is a mathematical concept, so the set of abstract ideas is both an idea and quite abstract, so therefore is itself an instance, or member, of the class abstract ideas. More prosaically, if a class is a set of things, then RDFS classes both denote sets of things, and are themselves instances of the set of all classes, aka rdfs:Class.

I think the practical truth is that it's rare in practical RDFS modelling that you find yourself needing to use the capability of the class being an instance of itself. I would say that it's more a consequence of the mathematical definition of the semantics of RDFS. Similarly, a sub-class of a class is any set which is an improper subset of the set denoted by the super-class, which means that every class is a sub-class of itself. There are good mathematical reasons for making this the case, but it often surprises beginners who look at the sub-classes of a given class as defined by a reasoner, and are confused that the reflexive case is included.

Kelvin answered 25/6, 2011 at 13:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.