Ontology Model Design
Ontology Model Design
Classes: We have defined two classes - Fruit and Citrus. Citrus is a subclass of Fruits.
Properties: We have defined two properties - hasColor and hasTaste, both having domain
Fruit.
Individuals: We have defined two individual fruits - apple and orange. Both have
properties hasColor and hasTaste. The orange fruit is also explicitly asserted as an
instance of Citrus.
This RDF-XML represents a simple ontology about fruits, with classes, properties, and
individual instances modeled accordingly.
Answer:
<rdf:RDF
xmlns:rdf="h p://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="h p://www.w3.org/2000/01/rdf-schema#"
xmlns:ont="h p://example.org/fruits#">
</rdf:RDF>
Classes: Defined classes for Animal, Mammal, and Bird. Mammal and Bird are
subclasses of Animal.
Properties: Defined properties such as hasColor (relating Animal to color) and
hasNumberOfLegs (relating Animal to the number of legs).
Individuals: Defined individual instances such as dog (a Mammal with color brown and 4
legs) and eagle (a Bird with color brown and 2 legs).
This RDF-XML represents a simple ontology about animals, with classes, properties, and
individual instances modeled accordingly.
Answer:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ont="http://example.org/fruits#">
<rdfs:Class rdf:about="http://example.org/fruits#Fruit"/>
<rdfs:Class rdf:about="http://example.org/fruits#Citrus">
<rdfs:subClassOf rdf:resource="http://example.org/fruits#Fruit"/>
tt
tt
tt
</rdfs:Class>
<rdf:Property rdf:about="http://example.org/fruits#hasColor">
<rdfs:domain rdf:resource="http://example.org/fruits#Fruit"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</rdf:Property>
<rdf:Property rdf:about="http://example.org/fruits#hasTaste">
<rdfs:domain rdf:resource="http://example.org/fruits#Fruit"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</rdf:Property>
<ont:Fruit rdf:about="http://example.org/fruits#apple">
<ont:hasColor>red</ont:hasColor>
<ont:hasTaste>sweet</ont:hasTaste>
</ont:Fruit>
<ont:Fruit rdf:about="http://example.org/fruits#orange">
<ont:hasColor>orange</ont:hasColor>
<ont:hasTaste>tangy</ont:hasTaste>
<rdf:type rdf:resource="http://example.org/fruits#Citrus"/>
</ont:Fruit>
</rdf:RDF>
This RDF-XML represents a simple ontology about employees, departments, and their
relationships.
Answer:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ont="http://example.org/ontology#">
<rdfs:Class rdf:about="http://example.org/ontology#Person"/>
<rdfs:Class rdf:about="http://example.org/ontology#Employee">
<rdfs:subClassOf rdf:resource="http://example.org/ontology#Person"/>
</rdfs:Class>
<rdfs:Class rdf:about="http://example.org/ontology#Department"/>
<rdf:Property rdf:about="http://example.org/ontology#worksFor">
<rdfs:domain rdf:resource="http://example.org/ontology#Person"/>
<rdfs:range rdf:resource="http://example.org/ontology#Department"/>
</rdf:Property>
<rdf:Property rdf:about="http://example.org/ontology#hasSalary">
<rdfs:domain rdf:resource="http://example.org/ontology#Employee"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
</rdf:Property>
<!-- Individuals -->
<ont:Person rdf:about="http://example.org/ontology#John"/>
<ont:Employee rdf:about="http://example.org/ontology#Jane">
<ont:worksFor rdf:resource="http://example.org/ontology#HR"/>
<ont:hasSalary>50000</ont:hasSalary>
</ont:Employee>
<ont:Department rdf:about="http://example.org/ontology#HR"/>
</rdf:RDF>
1. https://cw.fel.cvut.cz/old/_media/courses/osw/s2-rdfs-solution.pdf