The Simpsons - An example Ontology for tutorial purposes#

The Simpsons is a polpular comic televisions series. A comprehensive overview (in german) is Simpsonspedia.

General Domain Model#

We first define some classes framing the example domain.

Classes #

si.Human
si:Human
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.label
rdfs:label
"Mensch"@de
,
"Human"@en
.
si.Animal
si:Animal
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.label
rdfs:label
"Tier"@de
,
"Animal"@en
.
si.GenderType
si:GenderType
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.label
rdfs:label
"Geschlecht"@de
,
"Gender"@en
.
si.male
si:male
rdf.type
rdf:type
si.GenderType
si:GenderType
;
rdfs.label
rdfs:label
"männlich"@de
,
"male"@en
.
si.female
si:female
rdf.type
rdf:type
si.GenderType
si:GenderType
;
rdfs.label
rdfs:label
"weiblich"@de
,
"female"@en
.
si.Building
si:Building
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.label
rdfs:label
"Gebäude"@de
,
"Building"@en
.
si.Location
si:Location
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.label
rdfs:label
"Ort"@de
,
"Location"@en
.
si.Powerplant
si:Powerplant
rdf.type
rdf:type
rdfs.Class
rdfs:Class
;
rdfs.subClassOf
rdfs:subClassOf
si.Building
si:Building
;
rdfs.label
rdfs:label
"Kraftwerk"@de
,
"Power plant"@en
.
Some (alternative ways) to express negations.

[]
rdf.type
rdf:type
owl.AllDisjointClasses
owl:AllDisjointClasses
;
owl.members
owl:members
(
si.Human
si:Human
si.Building
si:Building
si.GenderType
si:GenderType
)
.
si.GenderType
si:GenderType
owl.disjointWith
owl:disjointWith
si.Human
si:Human
.

Properties#

si.livesIn
si:livesIn
rdf.type
rdf:type
rdf.Property
rdf:Property
.
si.relatedWith
si:relatedWith
rdf.type
rdf:type
owl.ReflexiveProperty
owl:ReflexiveProperty
.
si.parent
si:parent
rdf.type
rdf:type
owl.AsymmetricProperty
owl:AsymmetricProperty
;
rdfs.subPropertyOf
rdfs:subPropertyOf
si.relatedWith
si:relatedWith
.
si.spouse
si:spouse
rdf.type
rdf:type
rdf.Property
rdf:Property
.
si.husband
si:husband
rdfs.subPropertyOf
rdfs:subPropertyOf
si.spouse
si:spouse
.
si.spouse
si:spouse
owl.propertyDisjointWith
owl:propertyDisjointWith
si.parent
si:parent
.
si.child
si:child
rdf.type
rdf:type
rdf.Property
rdf:Property
;
rdfs.subPropertyOf
rdfs:subPropertyOf
si.relatedWith
si:relatedWith
;
owl.inverseOf
owl:inverseOf
si.parent
si:parent
.
si.mother
si:mother
rdf.type
rdf:type
rdf.Property
rdf:Property
;
rdfs.subPropertyOf
rdfs:subPropertyOf
si.parent
si:parent
.
si.father
si:father
rdf.type
rdf:type
rdf.Property
rdf:Property
;
rdfs.subPropertyOf
rdfs:subPropertyOf
si.parent
si:parent
.
si.grandparent
si:grandparent
rdf.type
rdf:type
rdf.Property
rdf:Property
;
owl.propertyChainAxiom
owl:propertyChainAxiom
(
si.parent
si:parent
si.parent
si:parent
)
.
si.grandfather
si:grandfather
rdf.type
rdf:type
rdf.Property
rdf:Property
;
owl.propertyChainAxiom
owl:propertyChainAxiom
(
si.parent
si:parent
si.father
si:father
)
.
si.sibling
si:sibling
rdf.type
rdf:type
owl.SymmetricProperty
owl:SymmetricProperty
;
rdf.type
rdf:type
owl.TransitiveProperty
owl:TransitiveProperty
;
rdfs.subPropertyOf
rdfs:subPropertyOf
si.relatedWith
si:relatedWith
.
si.gender
si:gender
rdf.type
rdf:type
rdf.Property
rdf:Property
;
rdfs.domain
rdfs:domain
si.GenderType
si:GenderType
.
si.age
si:age
rdf.type
rdf:type
rdf.Property
rdf:Property
.
si.owns
si:owns
rdf.type
rdf:type
rdf.Property
rdf:Property
;
owl.minCardinality
owl:minCardinality
"1"
.
si.amount
si:amount
rdf.type
rdf:type
rdf.Property
rdf:Property
.
si.ownType
si:ownType
rdf.type
rdf:type
rdf.Property
rdf:Property
.

NegativeObjectPropertyAssertion#

Bart never wants to be a female.

[]
rdf.type
rdf:type
owl.NegativePropertyAssertion
owl:NegativePropertyAssertion
;
owl.sourceIndividual
owl:sourceIndividual
si.bart
si:bart
;
owl.assertionProperty
owl:assertionProperty
si.gender
si:gender
;
owl.targetIndividual
owl:targetIndividual
si.female
si:female
.

Illustrative Instances#

We now insert some characters and things of the Simpsons world.

si.springfield
si:springfield
rdf.type
rdf:type
si.Location
si:Location
;
rdfs.label
rdfs:label
"Springfield"
.
si.homer
si:homer
rdfs.label
rdfs:label
"Homer Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.age
si:age
"36"
;
si.gender
si:gender
si.male
si:male
;
si.father
si:father
si.abraham
si:abraham
;
si.livesIn
si:livesIn
si.springfield
si:springfield
.
si.marge
si:marge
rdfs.label
rdfs:label
"Marge Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.age
si:age
"34"
;
si.gender
si:gender
si.female
si:female
;
si.livesIn
si:livesIn
si.springfield
si:springfield
.
si.bart
si:bart
rdfs.label
rdfs:label
"Bart Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.age
si:age
"10"
;
si.gender
si:gender
si.male
si:male
;
si.sibling
si:sibling
si.lisa
si:lisa
;
si.mother
si:mother
si.marge
si:marge
;
si.father
si:father
si.homer
si:homer
;
si.livesIn
si:livesIn
si.springfield
si:springfield
.
si.lisa
si:lisa
rdfs.label
rdfs:label
"Lisa Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.age
si:age
"8"
;
si.gender
si:gender
si.female
si:female
;
si.mother
si:mother
si.marge
si:marge
;
si.father
si:father
si.homer
si:homer
;
si.livesIn
si:livesIn
si.springfield
si:springfield
.
si.maggie
si:maggie
rdfs.label
rdfs:label
"Maggie Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.age
si:age
"1"
;
si.sibling
si:sibling
si.lisa
si:lisa
;
si.gender
si:gender
si.female
si:female
;
si.mother
si:mother
si.marge
si:marge
;
si.father
si:father
si.homer
si:homer
;
si.livesIn
si:livesIn
si.springfield
si:springfield
.
si.abraham
si:abraham
rdfs.label
rdfs:label
"Abraham Simpson"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.mother
si:mother
si.yuma
si:yuma
;
si.gender
si:gender
si.male
si:male
.
si.yuma
si:yuma
rdfs.label
rdfs:label
"Yuma Hickman"
;
rdf.type
rdf:type
si.Human
si:Human
;
si.gender
si:gender
si.female
si:female
.
si.burns_dog
si:burns_dog
rdf.type
rdf:type
si.Animal
si:Animal
;
rdfs.label
rdfs:label
"Mr. Burns' dog"
.
si.burns_powerplant
si:burns_powerplant
rdf.type
rdf:type
si.Powerplant
si:Powerplant
;
rdfs.label
rdfs:label
"Mr. Burns' nuclear power plant"
.
We can also introduce blank nodes to represent the belongings of Mr. Burns.

si.burns
si:burns
rdf.type
rdf:type
si.Human
si:Human
;
rdfs.label
rdfs:label
"Charles Montgomery Burns"
;
si.gender
si:gender
si.male
si:male
;
si.owns
si:owns
_:own1
,
_:own2
.
_:own1
si.amount
si:amount
"3"
;
si.ownType
si:ownType
si.burns_dog
si:burns_dog
.
_:own2
si.amount
si:amount
"1"
;
si.ownType
si:ownType
si.burns_powerplant
si:burns_powerplant
.

Sample Queries#

Ok, we can test/query the ontology by inserting some SPARQL statements.

Simple start#

Show me all instances of Human and also show their labels.

No ontology found! The package '' is not used to compile an ontology. Internal error while rendering section: null

Barts Grand-Pa#

Use property paths in SPARQL.

No ontology found! The package '' is not used to compile an ontology. Internal error while rendering section: null
Now using a defined PropertyChain

No ontology found! The package '' is not used to compile an ontology. Internal error while rendering section: null

Optional belongings#

We also can add optional patterns into the query. Show all humans and their (optional) belongings.

No ontology found! The package '' is not used to compile an ontology. Internal error while rendering section: null

UNION: All names of humans and animals#

No ontology found! The package '' is not used to compile an ontology. Internal error while rendering section: null

Administrative Definitions of the Simpsons Ontology#

This wiki article belongs to the simpsons package.

simpsons
We define the ontology using all articles of the simpsons package.

simpsons
Let's us the namespace si for the resources.

si http://www.example.org/