Previous Page Table of Contents


Appendix B: OWL sample Food Safety ontology


<?xml version="1.0"?>
<rdf:RDF

xmlns="http://a.com/ontology#"
xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#"

xml:base="http://a.com/ontology">
<owl:Ontology rdf:about="">

<owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/protege"/>

</owl:Ontology>
<owl:Class rdf:ID="Contamination"/>
<owl:Class rdf:ID="FoodContamination">
<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty>

<owl:ObjectProperty rdf:about="#level"/>

</owl:onProperty>
<owl:allValuesFrom>

<owl:Class>

<owl:oneOf rdf:parseType="Collection">
<ContaminationLevel rdf:ID="_3"/>
<ContaminationLevel rdf:ID="_4"/>
<ContaminationLevel rdf:ID="_5"/>

</owl:oneOf>

</owl:Class>

</owl:allValuesFrom>
</owl:Restriction>

</rdfs:subClassOf>
<rdfs:subClassOf rdf:resource="#Contamination"/>
</owl:Class>
<owl:Class rdf:ID="Food"/>
<owl:Class rdf:ID="ContaminationLevel"/>
<owl:Class rdf:ID="Country"/>
<owl:ObjectProperty rdf:ID="level">

<rdfs:domain rdf:resource="#Contamination"/>
<rdfs:range rdf:resource="#ContaminationLevel"/>

</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="fromCountry">

<rdfs:range rdf:resource="#Country"/>
<rdfs:domain rdf:resource="#Food"/>

</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="contaminatedBy">

<rdfs:domain rdf:resource="#Food"/>
<rdfs:range rdf:resource="#FoodContamination"/>

</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="foodSafetyStatus">

<rdfs:domain rdf:resource="#Country"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

</owl:DatatypeProperty>
<ContaminationLevel rdf:ID="_2"/>
<Country rdf:ID="England"/>
<FoodContamination rdf:ID="MediumFoodContamination">

<level rdf:resource="#_3"/>

</FoodContamination>
<ContaminationLevel rdf:ID="_1"/>
<owl:Restriction>

<owl:hasValue rdf:resource="#MediumFoodContamination"/>
<owl:onProperty rdf:resource="#contaminatedBy"/>

</owl:Restriction>
<Food rdf:ID="Hamburger">

<fromCountry rdf:resource="#England"/>
<contaminatedBy rdf:resource="#MediumFoodContamination"/>

</Food>
</rdf:RDF>
<!-- Created with Protege (with OWL Plugin 1.1 beta, Build 104) http://protege.stanford.edu -->


Previous Page Top of Page