OWL Syntactic Varieties o oWl builds on rdf and uses rdfs Xml-based syntax Other syntactic forms for OWL have also been defined An alternative more readable Xml-based syntax An abstract syntax, that is much more compact and readable than the XML languages A graphic syntax based on the conventions of UML 21 Chapter 4 A Semantic Web primer
Chapter 4 A Semantic Web Primer 21 OWL Syntactic Varieties ⚫ OWL builds on RDF and uses RDF’s XML-based syntax ⚫ Other syntactic forms for OWL have also been defined: – An alternative, more readable XML-based syntax – An abstract syntax, that is much more compact and readable than the XML languages – A graphic syntax based on the conventions of UML
OWL XML/RDF Syntax: Header <rdf: RDF xmins:owl=http://www.w3.org/2002/07lowl# xminsrdf=http://www.w3.org/1999/02/22-rdf- syntax-ns# xmins:rdfs=http://www.w3.org/2000/01/rdf schemat xminsxsd=http://www.w3.org/2001/ XLMSchemaf> o An OWL ontology may start with a collection of assertions for housekeeping purposes using owl: Ontology element 22 Chapter 4 A Semantic Web primer
Chapter 4 A Semantic Web Primer 22 OWL XML/RDF Syntax: Header <rdf:RDF xmlns:owl ="http://www.w3.org/2002/07/owl#" xmlns:rdf ="http://www.w3.org/1999/02/22-rdfsyntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdfschema#" xmlns:xsd ="http://www.w3.org/2001/ XLMSchema#"> ⚫ An OWL ontology may start with a collection of assertions for housekeeping purposes using owl:Ontology element
oWl: Ontology <owl: Ontology rdf: about <rdfs: comment An exam ple oWL ontology </rdfs: comment ≤owl: priorversion rdfresource=http://www.mydomain.org/uni-ns-oldp> <owl: imports rdfresource=http://www.mydomain.org/persons"i> <rdfs: labelUniversity Ontology </rdfs: label> <lowl: Ontology> owl: imports is a transitive property 23 Chapter 4 A Semantic Web primer
Chapter 4 A Semantic Web Primer 23 owl:Ontology <owl:Ontology rdf:about=""> <rdfs:comment>An example OWL ontology </rdfs:comment> <owl:priorVersion rdf:resource="http://www.mydomain.org/uni-ns-old"/> <owl:imports rdf:resource="http://www.mydomain.org/persons"/> <rdfs:label>University Ontology</rdfs:label> </owl:Ontology> ⚫ owl:imports is a transitive property
Classes e Classes are defined using owl: class owl: Class is a subclass of rdfs: class Disjointness is defined using owl: disjointwith <owl: Class rdfrabout=#associate Professor> <owl: disjointWith rdf: resource= #professor I> ≤owl: disjointWith df resource= assistant Professor <owl: Class> 24 Chapter 4 A Semantic Web primer
Chapter 4 A Semantic Web Primer 24 Classes ⚫ Classes are defined using owl:Class – owl:Class is a subclass of rdfs:Class ⚫ Disjointness is defined using owl:disjointWith <owl:Class rdf:about="#associateProfessor"> <owl:disjointWith rdf:resource="#professor"/> <owl:disjointWith rdf:resource="#assistantProfessor"/> </owl:Class>
Classes(2) o owl:equivalentclass defines equivalence of classes <owl: Class rdf: ID="faculty"> <owl: equivalentclass rdf: resource= iacademicstaffMember> </owl: class> o owl: Thing is the most general class, which contains everything owl: Nothing is the empty class 25 Chapter 4 A Semantic Web primer
Chapter 4 A Semantic Web Primer 25 Classes (2) ⚫ owl:equivalentClass defines equivalence of classes <owl:Class rdf:ID="faculty"> <owl:equivalentClass rdf:resource= "#academicStaffMember"/> </owl:Class> ⚫ owl:Thing is the most general class, which contains everything ⚫ owl:Nothing is the empty class