Understanding Semantic Web Modeling with OWL and Ontologies
Explore the fundamentals of Semantic Web modeling through OWL and ontologies, covering topics like property chain axioms, equality vs. inequality in URIs, sets of distinct individuals, and all values from constraints. Learn how these concepts shape the representation and relationships within linked data structures.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
CSE 428 Semantic Web Topics OWL Jeff Heflin Lehigh University
Ontology Header <!DOCTYPE rdf:RDF [ <!ENTITY owl "http://www.w3.org/2002/07/owl#">]> <rdf:RDF xmlns:owl ="http://www.w3.org/2002/07/owl#" xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <owl:Ontology rdf:about=""> <rdfs:label>My Ontology</rdfs:label> <rdfs:comment>An example ontology</rdfs:comment> <owl:imports rdf:resource= http://www.ont.org/generic /> </owl:Ontology> ... </rdf:RDF>
Property Chain Axioms In Turtle: :hasGrandParent rdf:type owl:ObjectProperty; owl:PropertyChainAxiom ( :hasParent :hasParent ) . In RDF/XML: <rdf:Description rdf:about="hasGrandparent"> <owl:propertyChainAxiom rdf:parseType="Collection"> <owl:ObjectProperty rdf:about="hasParent"/> <owl:ObjectProperty rdf:about="hasParent"/> </owl:propertyChainAxiom> </rdf:Description> 3
Equality/Inequality Two URIs refer to the same individual. <http://www.cse.lehigh.edu/~heflin/> owl:sameAs <http://www.cs.umd.edu/~heflin/> . Two URIs refer to distinct individuals <http://www.cse.lehigh.edu/~heflin/> owl:differentFrom <mailto:heflin@cse.lehigh.edu> .
Sets of Distinct Individuals Turtle: _:x rdf:type owl:AllDifferent; owl:members (:Bob :Sue :Mary) . RDF/XML: <owl:AllDifferent> <owl:members rdf:parseType= Collection > <p:Person rdf:about= #Bob /> <p:Person rdf:about= #Sue /> <p:Person rdf:about= #Mary /> </owl:members> </owl:AllDifferent> The URIs #Bob, #Sue and #Mary all refer to distinct individuals.
All Values From Turtle: :Band a owl:Class; rdfs:subClassOf [rdf:type owl:Restriction; owl:onProperty :hasMember; owl:allValuesFrom :Musician] . RDF/XML: <owl:Class rdf:ID= Band > <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource= #hasMember /> <owl:allValuesFrom rdf:resource= #Musician /> </owl:Restriction> </rdfs:subClassOf> </owl:Class> A Band is a subclass of the set of entities which only have members that are Musicians.
Some Values From Turtle: :Band a owl:Class; rdfs:subClassOf [rdf:type owl:Restriction; owl:onProperty :hasMember; owl:someValuesFrom :Singer] . RDF/XML: <owl:Class rdf:ID= Band > <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource= #hasMember /> <owl:someValuesFrom rdf:resource= #Singer /> </owl:Restriction> </rdfs:subClassOf> </owl:Class> Every Band has at least one member who is a Singer
Has Value Turtle: :Guitarist a owl:Class; rdfs:subClassOf [rdf:type owl:Restriction; owl:onProperty :playsInstrument; owl:hasValue :Guitar] . RDF/XML: <owl:Class rdf:ID= Guitarist > <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource= #playsInstrument /> <owl:hasValue rdf:resource= #Guitar /> </owl:Restriction> </rdfs:subClassOf> </owl:Class> A Guitarist is a subclass of the set of entities which play at least one instrument that is a Guitar.
Minimum Cardinality Turtle: :Parent a owl:Class; owl:equivalentClass [rdf:type owl:Restriction; owl:onProperty :hasChild; owl:minCardinality 1 ^^xsd:integer ] . RDF/XML: <owl:Class rdf:ID= Parent > <owl:equivalentClass> <owl:Restriction> <owl:onProperty rdf:resource="#hasChild" /> <owl:minCardinality rdf:datatype= "&xsd;nonNegativeInteger">1</owl:minCardinality> </owl:Restriction> </owl:equivalentClass> </owl:Class> Parent is exactly the set of entities which have at least one child.
Intersection and Union :Father a owl:Class; owl:intersectionOf (:Parent :Male) . A Father is exactly a Parent who is also Male. :PhysicalThing a owl:Class; owl:unionOf (:OrganicThing :InorganicThing) Every PhysicalThing is Organic or Inorganic (technically, this allows for some things to be both)
Containers :Father owl:intersectionOf rdf:first :Parent rdf:rest rdf:type rdf:first rdf:type :Male rdf:List rdf:rest rdf:type rdf:nil 11
Complement Turtle: :LivingPerson a owl:Class; owl:intersectionOf ( :Person [owl:complementOf :DeadPerson ] ). RDF/XML: <owl:Class rdf:ID= LivingPerson > <owl:intersectionOf rdf:parseType= Collection > <owl:Class rdf:about= #Person /> <owl:Class> <owl:complementOf rdf:resource= #DeadPerson /> </owl:Class> </owl:intersectionOf> </owl:Class> A living person is a person that is not dead.
Enumerated Classes Turtle: :PrimaryColor a owl:Class; owl:oneOf ( :Red :Blue :Yellow). RDF/XML: <owl:Class rdf:ID= PrimaryColor > <owl:oneOf rdf:parseType= Collection > <owl:Thing rdf:about= #Red /> <owl:Thing rdf:about= #Blue /> <owl:Thing rdf:about= #Yellow /> </owl:oneOf> </owl:Class> PrimaryColor has exactly three instances: Red, Blue and Yellow.
Ontology Versioning <owl:Ontology rdf:about= > <owl:priorVersion rdf:resource= www.onts.org/myont1 /> <owl:backwardCompatibleWith rdf:resource= www.onts.org/myont2 /> </owl:Ontology> <owl:DeprecatedClass rdf:ID="Car"> <owl:equivalentClass rdf:resource="#Automobile"/> </owl:DeprecatedClass> <owl:DeprecatedProperty rdf:ID="hasDriver"> <owl:inverseOf rdf:resource="#drives" /> </owl:DeprecatedProperty>
OWL 2: Negative Assertions <owl:NegativePropertyAssertion> <owl:sourceIndividual rdf:resource= #heflin /> <owl:assertionProperty rdf:resource= &foaf;knows /> <owl:targetIndividual rdf:resource= &whouse;obama /> </owl:NegativePropertyAssertion> States the triple #heflin foaf:knows #obama is false