The most simple way of modelling is to define the class of toys and add some instances to it:
turtle: ex#rubberDuckie rdf:type ex#Toy . turtle: ex#stuffedAnimal rdf:type ex#Toy . ex#telescope : ex#Toy . turtle: ex#telescope rdf:type ex#Toy . |
A somewhat more organised way of tidying up a large amount of toys is to classify it within a taxonomy (technically: class tree) of a domain. In the toy world a taxonomy of toys could look like this:
ex#FireEngine :: ex#Toy . turtle: ex#FireEngine rdfs:subClassOf ex#Toy . ex#erniesFireEngine : ex#FireEngine . turtle: ex#erniesFireEngine rdf:type ex#FireEngine . turtle: ex#Pet rdfs:subClassOf ex#Toy . turtle: ex#horse rdf:type ex#Pet . ex#Instrument :: ex#Toy . turtle: ex#Instrument rdfs:subClassOf ex#Toy . turtle: ex#trumpet rdf:type ex#Instrument . turtle: ex#trombone rdf:type ex#Instrument . |
In fact this might be classification Bert was thinking of most probably. An intuitive (but not given!) assumption is that the subclasses of a classification are disjunct to each other (in math language: form a partition).
A (informal) semantics of the term "subclass" is:
- If an object belongs to the sub class FireEngine, it also belongs to the super class Toy.
- all "direct" instances (math: elements) of the class (math: set) Toy
- all objects which are an instance of a subclass of the class toy (includes transitive subclasses).
A simple query asks for instances (math: elements) of the class (math: the set of) toys:
|
@{
allFireEngines
}
?-
|