Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
Semantic web
Semantic web
Chargement dans…3
×

Consultez-les par la suite

1 sur 81 Publicité

Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP

Télécharger pour lire hors ligne

This lecture elaborates on RDF, RDFS, and SOAP starting from a short recap of XML, and the history of the W3C and the development of "open standard recommendations". We also compare RDF triples with DOGMA lexons. We finalise by listing shortcomings of RDFS regarding semantics, and give short overview of the history of OWL as one answer to this. A full elaboration on OWL and description logic is for another lecture.

This lecture elaborates on RDF, RDFS, and SOAP starting from a short recap of XML, and the history of the W3C and the development of "open standard recommendations". We also compare RDF triples with DOGMA lexons. We finalise by listing shortcomings of RDFS regarding semantics, and give short overview of the history of OWL as one answer to this. A full elaboration on OWL and description logic is for another lecture.

Publicité
Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)

Les utilisateurs ont également aimé (20)

Publicité

Similaire à Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP (20)

Publicité

Plus récents (20)

Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP

  1. 1. Open Standards for the Semantic Web XML / RDF(S) / OWL / SOAP © 2004 Pieter De Leenheer
  2. 2. Data About ... <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;> xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about= quot;http://www.starlab.vub.ac.be/ staff/pdeleenheer/teaching/infosys/XML_RDF_RDFS_OWL_SOAP.pdf”> <dc:title>XML / RDF / RDFS / OWL / SOAP</dc:title> <dc:creator>Pieter De Leenheer </dc:creator> <dc:coverage>Informatiesystemen</dc:coverage> <dc:subject> <rdf:Bag> <rdf:li>XML</rdf:li> <rdf:li>RDF</rdf:li> <rdf:li>RDFS</rdf:li> <rdf:li>OWL</rdf:li> <rdf:li>SOAP</rdf:li> </rdf:Bag> </dc:subject> </rdf:Description> </rdf:RDF>
  3. 3. Lecture Outline today • Once upon a time there was XML • W3C Open Standards Compliance • Resource Description Framework (RDF) • RDF versus XML • RDF Schema (RDFS) • RDF triples versus DOGMA lexons • Simple Object Access Protocol • Online RDF services and tools • RDFS Shortcomings: Web Ontology Language
  4. 4. Lecture outline next week • RDFS Semantics • Web Ontology Language • Description Logics
  5. 5. eXtensible Markup Language • XML is a meta- language • XML stands for EXtensible Markup Language • XML is a markup language much like HTML • XML was designed to describe data • XML tags are not predefined. You must define your own tags • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data • XML with a DTD or XML Schema is designed to be self-descriptive
  6. 6. XML Specification <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> </medicine-inventory>
  7. 7. XML Spec: XML declaration <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> The XML version and the </medicine-inventory> character encoding used in the document. In this case the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set.
  8. 8. XML Spec: root element <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> The root element of the document: this Document describes </medicine-inventory> (or is) a medicine inventory
  9. 9. XML Spec: child elements <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> </medicine-inventory> Data of medicine medicine has attribute with value: name = “asperin” A child element: medicine
  10. 10. XML Spec: tags (1) <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> </medicine-inventory> Data of medicine Begin tag of an element End tag of an element
  11. 11. XML Spec: tags (2) <?xml version=“1.0”?> <medicine-inventory> <medicine name=“asperin”> <author>Felix Hoffmann</author> <patent-date>1889/03/06/</patent-date> </medicine> </medicine-inventory> Data of author Begin tag of an element End tag of an element
  12. 12. W3C Consortium • Vendor-independent • three host institutions (MIT/LCS in the USA, ERCIM headquarters in France, and Keio University in Japan). • Standardisation by recommendation • Goals: • Universal Access: To make the Web accessible to all by promoting technologies that take into account the vast differences in culture, languages, education, ability, material resources, access devices, and physical limitations of users on all continents; • Semantic Web: To develop a software environment that permits each user to make the best use of the resources available on the Web; • Web of Trust: To guide the Web's development with careful consideration for the novel legal, commercial, and social issues raised by this technology. • Open source
  13. 13. Standards and Procedures         ■ ■ ■ SOAP CSS XHTML ■ ■ ■ SPARQL CGI XHTML+Voice ■ ■ ■ SMIL DOM XML ■ ■ ■ SRGS GRDDL XML Events ■ ■ ■ SSML HTML XML Information Set ■ ■ ■ VoiceXML OWL XML Schema ■ ■ ■ WCAG P3P XPath ■ ■ ■ WSDL RDF XQuery 1. Working Draft (WD) ■ ■ ■ XACML SVG XSLT 2. Last Call Working Draft ■ ■ XForms SISR 3. Candidate Recommendation             (CR) 4. Proposed Recommendation (PR) 5. W3C Recommendation (REC)
  14. 14. Resource Description Framework • RDF is not a language but a model • RDF is written in XML • RDF is a W3C standard • RDF is for describing resources on the web • RDF is designed to be read by computers • RDF is not designed for being displayed to people • RDF uses URIs to identify web resources • RDF uses property values to describe web resources • RDF uses the terms resources, properties, and values • RDF also uses the terms subject, predicates and objects
  15. 15. RDF: introducing example <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:cd=quot;http://www.recshop.fake/cd#quot;> <rdf:Description rdf:about=quot;http://www.recshop.fake/cd/Empire Burlesquequot;> <cd:artist>Bob Dylan</cd:artist> <cd:country>USA</cd:country> <cd:company>Columbia</cd:company> <cd:price>10.90</cd:price> <cd:year>1985</cd:year> </rdf:Description> <rdf:Description rdf:about=quot;http://www.recshop.fake/cd/Hide your heartquot;> <cd:artist>Bonnie Tyler</cd:artist> <cd:country>UK</cd:country> <cd:company>CBS Records</cd:company> <cd:price>9.90</cd:price> <cd:year>1988</cd:year> </rdf:Description> </rdf:RDF>
  16. 16. RDF building block “STARLab” is the title of the website http://starlab.vub.ac.be • Subject (Resource) - http://starlab.vub.ac.be • Predicate (Property) – title • Object (Literal) – “STARLab”
  17. 17. 2 RDF statements “STARLab” is the title of the website http:// starlab.vub.ac.be, and is created by “Peter Spyns” • Subject (Resource) - http://starlab.vub.ac.be • Predicate (Property) – title • Object (Literal) – “STARLab” • Subject (Resource) - http://starlab.vub.ac.be • Predicate (Property) – creator • Object (Literal) – “Peter Spyns” 17
  18. 18. Nested RDF statements Peter Spyns, whose phone is 4571 is the creator of the website http://starlab.vub.ac.be which has title “STARLab”.
  19. 19. RDF basic serialisation syntax The RDF root element and namespace: <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;> . . . </rdf:RDF>
  20. 20. RDF Description Attributes  about – refers to a URI of an existing resource  ID – signals the creation of a new resource (see later) <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> . . . </rdf:Description> </rdf:RDF>
  21. 21. RDF Property (1)  Property names must be associated with a schema  Qualify property names with namespace prefix  Value – description element or string <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator>Peter Spyns</dc:creator> . . . </rdf:Description> </rdf:RDF>
  22. 22. RDF Property (2)  Property names must be associated with a schema  Qualify property names with namespace prefix  Value – description element or string <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF>
  23. 23. Marking value types <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:alsoContains rdf:parseType=“Literal”> <h1>STARLab Official Homepage</h1> </dc:alsoContains> </rdf:Description> </rdf:RDF> XML formatted value
  24. 24. Marking value types (2) <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:lastUpdate>18</dc:lastUpdate> <dc:creator rdf:parseType=quot;Resourcequot;> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </dc:creator> </rdf:Description> </rdf:RDF> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> 24
  25. 25. Introducing structure in the data Last update of the site was 18 months, days, years ago ???? <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:lastUpdate>18</dc:lastUpdate> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF>
  26. 26. Introducing structure in the data (2) Candidate solution (I) causes a decoding problem: <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:lastUpdate>18 days</dc:lastUpdate> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF>
  27. 27. Introducing structure in the data (3) Candidate solution (II) refines the syntax, but ‘18’ and ‘days’ are not related: <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:lastUpdate>18</dc:lastUpdate> <dc:lastUpdateUnit>days</dc:lastUpdateUnit> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF>
  28. 28. Introducing structure in the data (4) Candidate solution (III) introduces rdf:value field: the processor is signaled that the data itself is in this field  accepted as solution ! <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:lastUpdate rdf:parseType=“Resource”> <rdf:value>18</rdf:value> <dc:lastUpdateUnit>days</dc:lastUpdateUnit> </dc:lastUpdate> ... </rdf:RDF>
  29. 29. RDF Visualisation
  30. 30. RDF vs. XML <E1> <E1> <E2> <E2> <E3> <URIref to E3> ... </E2> <E3> </E1> </E2> </E1> <E3> ... </E3> In RDF, the tree structure can be broken down and distributed: this has advantageous consequences... 30
  31. 31. RDF vs. XML (2) RDF XML • Needs to be cached • Lazy loading, less fully before use memory strain • Comparable to • Comparable to foreign bilocation in keys in relational DBs hierarchical DBs • Data from disparate • Nesting docs can be joined (important Semantic Web asset)
  32. 32. Properties as Resources Breaking the nesting ! <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator rdf:resource=quot;http://starlab.vub.ac.be/staff/pspynsquot; /> </rdf:Description> <rdf:Description rdf:about=quot;http://starlab.vub.ac.be/staff/pspynsquot;> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </rdf:RDF>
  33. 33. Properties as Resources <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator>Peter Spyns</dc:creator> <dc:date>2001-04-10</dc:date> <dc:format>text/html</dc:format> <dc:language>en</dc:language> </rdf:Description> </rdf:RDF> <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot; dc:title=quot;STARLabquot; dc:creator=quot;Peter Spynsquot; dc:date=quot;2001-04-10quot; dc:format=quot;text/htmlquot; dc:language=quot;enquot; /> </rdf:RDF>
  34. 34. Abbreviated RDF <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot; <rdf:Description about=quot;http://starlab.vub.ac.bequot;> <dc:creator> <rdf:Description about=quot;http://starlab.vub.ac.be/staff/pspynsquot;> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot; <rdf:Description about=quot;http://starlab.vub.ac.bequot;> <dc:creator rdf:resource=quot;http://starlab.vub.ac.be/staff/pspynsquot; dc:name=quot;Peter Spynsquot; dc:phone=quot;4571quot;/> </rdf:Description> </rdf:RDF>
  35. 35. Abbreviated RDF (2) <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator> <rdf:Description> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </rdf:Description> </dc:creator> </rdf:Description> </rdf:RDF> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.bequot;> <dc:title>STARLab</dc:title> <dc:creator rdf:parseType=quot;Resourcequot;> <dc:name>Peter Spyns</dc:name> <dc:phone>4571</dc:phone> </dc:creator> </rdf:Description> </rdf:RDF>
  36. 36. Abbreviated RDF (3) http://starlab.vub.ac.be/staff/pdeleenheer is an instance of type Webpage... <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description about=quot;http://starlab.vub.ac.be/staff/pdeleenheerquot;> <rdf:type rdf:resource=quot;http://www.schemas.org/www/Webpagequot;/> <dc:creator>Pieter De Leenheer</dc:creator> <dc:title>Pierre’s Page</dc:title> <dc:date>2002-06-15</dc:date> </rdf:Description> </rdf:RDF> <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot; xmlns:s=quot;http://www.schemas.org/www/quot;> <s:WebPage about=quot;http://starlab.vub.ac.be/staff/pdeleenheerquot;> <dc:creator>Pieter De Leenheer</dc:creator> <dc:title>Pierre’s Page</dc:title> <dc:date>2002-06-15</dc:date> </s:WebPage> </rdf:RDF>
  37. 37. ...and the graph
  38. 38. RDF Containers • Bag - an unordered list of resources or literals • Sequence - an ordered list of resources or literals • Alternative - a list of resources or literals that represent alternatives for the value of a property
  39. 39. rdf:Bag Some user-defined namespace (see later) <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:cd=quot;http://www.recshop.fake/cdquot;> <rdf:Description rdf:about=quot;http://www.recshop.fake/cd/Beatles_For_Salequot;> <cd:artist> <rdf:Bag> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>George</rdf:li> <rdf:li>Ringo</rdf:li> </rdf:Bag> </cd:artist> </rdf:Description> </rdf:RDF>
  40. 40. rdf:Seq <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:cd=quot;http://www.recshop.fake/cdquot;> <rdf:Description rdf:about=quot;http://www.recshop.fake/cd/Beatles_For_Salequot;> <cd:artist> <rdf:Seq> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>George</rdf:li> <rdf:li>Ringo</rdf:li> </rdf:Seq> </cd:artist> </rdf:Description> </rdf:RDF> 40
  41. 41. rdf:Alt <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:cd=quot;http://www.recshop.fake/cdquot;> <rdf:Description rdf:about=quot;http://www.recshop.fake/cd/Beatles_For_Salequot;> <cd:format> <rdf:Alt> <rdf:li>CD</rdf:li> <rdf:li>Record</rdf:li> <rdf:li>Tape</rdf:li> </rdf:Alt> </cd:format> </rdf:Description> </rdf:RDF> 41
  42. 42. RDF Container Semantics Purely intuitive !
  43. 43. rdf:about vs. rdf:ID (1) Two equivalent statements... <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.be/staff/pdeleenheer#contactquot;> <dc:title>Contact Information</dc:title> </rdf:Description> </rdf:RDF> <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot; xml:base=quot;http://starlab.vub.ac.be/staff/pdeleenheerquot; > <rdf:Description rdf:ID=quot;contactquot;> <dc:title>Contact Information</dc:title> </rdf:Description> </rdf:RDF>
  44. 44. rdf:about vs. rdf:ID (2) Another pair of equivalent statements... <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot;> <rdf:Description rdf:about=quot;http://starlab.vub.ac.be/staff/pdeleenheer#contactquot;> <dc:title>Contact Information</dc:title> </rdf:Description> </rdf:RDF> <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:dc=quot;http://purl.org/dc/elements/1.1/quot; xml:base=quot;http://starlab.vub.ac.be/quot; > <rdf:Description rdf:ID=“staff/pdeleenheer#contactquot;> <dc:title>Contact Information</dc:title> </rdf:Description> </rdf:RDF>
  45. 45. Reification • RDF triples are facts, statements • It is true that ... • The author of starlab.vub.ac.be is Peter Spyns • what about statements about statements? • I believe that ... • I heard that ... • RDF provides reification • trust • meta-data • left as self-study
  46. 46. RDF Schema • RDF describes resources with classes, properties, and values • RDFS is an extension to RDF • RDFS provides a framework to describe vocabulary, i.e. application-specific classes and properties • The term “schema” is similar to a DB schema
  47. 47. RDFS Example <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf= quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:rdfs=quot;http://www.w3.org/2000/01/rdf-schema#quot; xml:base= quot;http://www.all-fruits-of-the-world.uto/exoticfruitquot;> <rdf:Description rdf:ID=quot;exotic fruitquot;> <rdf:type rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Description> <rdf:Description rdf:ID=quot;bananaquot;> abbreviate? <rdf:type rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:subClassOf rdf:resource=quot;#exotic fruitquot;/> </rdf:Description> <rdf:Description rdf:ID=quot;sapodillaquot;> <rdf:type rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:subClassOf rdf:resource=quot;#exotic fruitquot;/> </rdf:Description> </rdf:RDF>
  48. 48. RDFS example abbr. <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf= quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:rdfs=quot;http://www.w3.org/2000/01/rdf-schema#quot; xml:base= quot;http://www.all-fruits-of-the-world.uto/exoticfruitquot;> <rdfs:Class rdf:ID=quot;exotic fruitquot; /> <rdfs:Class rdf:ID=quot;bananaquot;> Yes ! cfr. slide 26 <rdfs:subClassOf rdf:resource=quot;#exotic fruitquot;/> </rdfs:Class> <rdfs:Class rdf:ID=quot;sapodillaquot;> <rdfs:subClassOf rdf:resource=quot;#exotic fruitquot;/> </rdfs:Class> </rdf:RDF>
  49. 49. RDF Classes • rdfs:Resource – all resources within RDF are implicitly member of this class • rdfs:Class • rdfs:Literal • rdfs:XMLLiteral • rdfs:Container • rdfs:ContainerMembershipProperty • rdfs:Datatype
  50. 50. RDF core properties • rdfs:subClassOf • rdfs:subPropertyOf • rdfs:isDefinedBy • rdfs:seeAlso • rdfs:comment • rdfs:member • rdf:type • rdfs:label • rdf:predicate • rdf:subject • rdf:first • rdf:object • rdfs:domain • rdf:rest • rdf:value • rdfs:range
  51. 51. rdfs:Class <?xml version=quot;1.0quot;?> <rdf:RDF xmlns:rdf=quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:rdfs=quot;http:// Can be left implicit: www.w3.org/2000/01/rdf-schema#quot;> Resource=root class <rdfs:Class rdf:ID=quot;Personquot;> <rdfs:comment>Person Class</rdfs:comment> <rdfs:subClassOf rdf:resource=quot;http://www.w3.org/1999/02/22- rdf- syntax-ns#Resourcequot;/> </rdfs:Class> <rdfs:Class rdf:ID=quot;Studentquot;> <rdfs:comment>Student Class</rdfs:comment> <rdfs:subClassOf rdf:resource=quot;#Personquot;/> </rdfs:Class> <rdfs:Class rdf:ID=quot;Teacherquot;> <rdfs:comment>Teacher Class</rdfs:comment> <rdfs:subClassOf rdf:resource=quot;#Personquot;/> </rdfs:Class> <rdfs:Class rdf:ID=quot;Coursequot;> <rdfs:comment>Course Class</rdfs:comment> <rdfs:subClassOf rdf:resource=quot;http://www.w3.org/1999/02/22- rdf- syntax-ns#Resourcequot;/> </rdfs:Class>
  52. 52. rdf:Property <rdf:Property rdf:ID=“hasTeacherquot;> <rdfs:comment>Teacher of a course</rdfs:comment> <rdfs:domain rdf:resource=quot;#Coursequot;/> <rdfs:range rdf:resource=quot;#Teacherquot;/> </rdf:Property> <rdf:Property rdf:ID=“hasEnrolledStudentsquot;> <rdfs:comment>List of Students of a course in alphabetical order</rdfs:comment> <rdfs:domain rdf:resource=quot;#Coursequot;/> <rdfs:range rdf:resource=quot;http://www.w3.org/1999/02/22-rdf- syntax- ns#Seqquot;/> </rdf:Property> <rdf:Property rdf:ID=“hasNamequot;> <rdfs:comment>Name of a Person or Course</rdfs:comment> <rdfs:domain rdf:resource=quot;#Personquot;/> <rdfs:domain rdf:resource=quot;#Coursequot;/> <rdfs:range rdf:resource=quot;http://www.w3.org/1999/02/22-rdf- syntax- ns#Literalquot;/> </rdf:Property> </rdf:RDF>
  53. 53. RDF Goodies • No distinction between classes and instances (individuals) <Species,type,Class> <Lion,type,Species> <Leo,type,Lion> • Properties can themselves have properties <hasDaughter,subPropertyOf,hasChild> <hasDaughter,type,familyProperty> • No distinction between language constructors and ontology vocabulary, so constructors can be applied to themselves/each other <type,range,Class> <Property,type,Class> <type,subPropertyOf,subClassOf>
  54. 54. RDF triple versus lexon Lexons are : RDF triples are: • valid in a certain • valid in a certain namespace context • binary relationships • binary relationships between resources between concepts • read in one direction • read in two directions • URIs • natural language terms
  55. 55. Lexon to RDFS <rdfs:Class rdf:ID=quot;Personquot;> <drives rdf:resource=quot;#Carquot;/> </rdfs:Class> <rdfs:Class rdf:ID=“Carquot;> <driven_by rdf:resource=quot;#Personquot;/> </rdfs:Class> <rdf:Property rdf:ID=“drivesquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property> <rdf:Property rdf:ID=“driven_byquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property>
  56. 56. RDFS to Lexon <rdfs:Class rdf:ID=quot;Personquot;> <drives rdf:resource=quot;#Carquot;/> <fancies rdf:resource=quot;#Carquot;/> </rdfs:Class> <rdfs:Class rdf:ID=“Carquot;> <driven_by rdf:resource=quot;#Personquot;/> <driven_by rdf:resource=quot;#Personquot;/> </rdfs:Class> <rdf:Property rdf:ID=“drivesquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property> <rdf:Property rdf:ID=“driven_byquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property> <rdf:Property rdf:ID=“fanciesquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property> <rdf:Property rdf:ID=“fancied_byquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> <rdfs:domain rdf:resource=quot;http://www.w3.org/2000/01/rdf-schema#Classquot;/> </rdf:Property>
  57. 57. RDFS to Lexon Lexons  RDF  Lexons results in loss of information
  58. 58. RDFS to Lexons • From RDF triples <s:WebPage about=quot;http://starlab.vub.ac.be/staff/pdeleenheerquot;> <dc:creator>Pieter De Leenheer</dc:creator> <dc:title>Pierre’s Page</dc:title> <dc:date>2002-06-15</dc:date> </s:WebPage> • From RDFS class and property definitions <rdf:Property rdf:ID=“hasTeacherquot;> <rdfs:comment>Teacher of a course</rdfs:comment> <rdfs:domain rdf:resource=quot;#Coursequot;/> <rdfs:range rdf:resource=quot;#Teacherquot;/> </rdf:Property> • From subclass definitions <rdfs:Class rdf:ID=quot;Studentquot;> <rdfs:comment>Student Class</rdfs:comment> <rdfs:subClassOf rdf:resource=quot;#Personquot;/> </rdfs:Class>
  59. 59. SOAP • SOAP stands for Simple Object Access Protocol • SOAP is a communication protocol • SOAP is for communication between applications • SOAP is a format for sending messages • SOAP is designed to communicate via Internet • SOAP is platform independent • SOAP is language independent • SOAP is based on XML • SOAP is simple and extensible • SOAP allows you to get around firewalls • SOAP will be developed as a W3C standard
  60. 60. SOAP Message Format <?xml version=quot;1.0quot;?> <soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap- envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/ soap-encodingquot;> <soap:Header> ... ... </soap:Header> <soap:Body> ... ... <soap:Fault> ... ... </soap:Fault> </soap:Body> </soap:Envelope>
  61. 61. SOAP Message Format <?xml version=quot;1.0quot;?> <soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap- envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/ soap-encodingquot;> <soap:Header> ... ... </soap:Header> <soap:Body> The xmlns:soap namespace should always ... have the value of http://www.w3.org/ 2001/12/soap-envelope ... and it defines the Envelope as a SOAP <soap:Fault> Envelope ... ... </soap:Fault> </soap:Body> </soap:Envelope>
  62. 62. SOAP Message Format <?xml version=quot;1.0quot;?> <soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap- envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/ soap-encodingquot;> <soap:Header> ... ... </soap:Header> <soap:Body> A SOAP Envelope has no default encoding ... style. It is a client-server agreement. ... <soap:Fault> ... ... </soap:Fault> </soap:Body> </soap:Envelope>
  63. 63. SOAP Message Format <?xml version=quot;1.0quot;?> <soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap- envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/ soap-encodingquot;> <soap:Header> ... ... </soap:Header> <soap:Body> The optional Header contains application ... specific information (like authentication, payment, etc) about the SOAP message. ... <soap:Fault> The attributes defined in the SOAP Header ... defines how a recipient should process the ... SOAP message. </soap:Fault> </soap:Body> </soap:Envelope>
  64. 64. SOAP Message Format <?xml version=quot;1.0quot;?> <soap:Envelope xmlns:soap=quot;http://www.w3.org/2001/12/soap- envelopequot; soap:encodingStyle=quot;http://www.w3.org/2001/12/ soap-encodingquot;> <soap:Header> ... The required SOAP Body element contains ... the actual SOAP message intended for the </soap:Header> ultimate endpoint of the message. <soap:Body> Immediate child elements of the SOAP Body ... element may be namespace-qualified. ... SOAP defines one element inside the Body <soap:Fault> element in the default namespace (quot;http:// ... www.w3.org/2001/12/soap-envelopequot;). This ... is the SOAP Fault element, which is used to </soap:Fault> indicate error messages. </soap:Body> </soap:Envelope>
  65. 65. SOAP Example <SOAP-ENV:Envelope xmlns:SOAP-ENV=“ http://schemas.xmlsoap.org/soap/envelope/quot; xmlns:xsi=quot; http://www.w3.org/1999/XMLSchema-instancequot; xmlns:xsd=quot;http://www.w3.org/1999/XMLSchemaquot;> <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:sayHelloTo xmlns:ns1=quot;Hello” SOAP-ENV:encodingStyle=quot; http://schemas.xmlsoap.org/soap/encoding/quot;> <name xsi:type=quot;xsd:stringquot;>John</name> </ns1:sayHelloTo </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  66. 66. SOAP Example <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/quot; xmlns:xsi=quot;http://www.w3.org/1999/XMLSchema-instancequot; xmlns:xsd=quot;http://www.w3.org/1999/XMLSchemaquot;> <SOAP-ENV:Body> <ns1:sayHelloToResponse xmlns:ns1=quot;Hello“ SOAP-ENV:encodingStyle=“ http://schemas.xmlsoap.org/soap/encoding/quot;> <return xsi:type=quot;xsd:stringquot;>Hello John, How are you doing? </return> </ns1:sayHelloToResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  67. 67. Online Public Services • Validation http://www.w3.org/RDF/Validator • Meta-data generators • Reggie (http://metadata.net/dstc/) • UKOLN Dublin Core dot (http://www.ukoln.ac.uk/metadata/ dcdot/) • Reusable vocabularies • Dublin Core (xmlns:dc=“http://purl.org/dc/elements/1.1/”) • vCard • and many more
  68. 68. Publicly Available Tools • Editors • IsaViz http://www.w3.org/2001/11/IsaViz/ • RDFeditor http://sourceforge.net/projects/rdfeditor/ • Browsers • BrownSauce http://brownsauce.sourceforge.net/ • Stand-alone Parsers • ARP2 http://hpl.hp.com/semweb/arp.htm (also in Jena) • ICS-FORTH http://athena.ics.forth.gr:9090/RDF/ (also in RDF Suite)
  69. 69. RDFS Shortcomings • RDFS too weak to describe resources in sufficient detail – No localised range and domain constraints • Impossible to say that the range of hasChild is person when applied to persons and elephant when applied to elephants – No existence/cardinality constraints • Impossible to say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents – No transitive, inverse or symmetrical properties • Impossible to say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical – etc. • Difficult to provide reasoning support – No “native” reasoners for non-standard semantics – May be possible to reason via first-order axiomatisation
  70. 70. Web Ontology Language Desirable features identified for Web Ontology Language: • Extends existing Web standards – Such as XML, RDF, RDFS • Easy to understand and use – Should be based on familiar KR idioms • Formally specified • Of “adequate” expressive power • Possible to provide automated reasoning support
  71. 71. RDF to OWL • Two languages developed to satisfy above requirements – OIL: developed by group of (largely) European researchers (several from EU OntoKnowledge project) – DAML-ONT: developed by group of (largely) US researchers (in DARPA DAML programme) • Efforts merged to produce DAML+OIL – Development was carried out by “Joint EU/US Committee on Agent Markup Languages” – Extends (“DL subset” of) RDF • DAML+OIL submitted to W3C as basis for standardisation – Web-Ontology (WebOnt) Working Group formed – WebOnt group developed OWL language based on DAML+OIL – OWL language now a W3C Candidate Recommendation
  72. 72. OWL Specs • Three species of OWL – OWL full is union of OWL syntax and RDF – OWL DL restricted to FOL fragment (¼ DAML+OIL) – OWL Lite is “easier to implement” subset of OWL DL • OWL DL based on SHIQ Description Logic – In fact it is equivalent to SHOIN(Dn) DL • OWL DL Benefits from many years of DL research – Well defined semantics – Formal properties well understood (complexity, decidability) – Known reasoning algorithms – Implemented systems (highly optimised)
  73. 73. OWL Constructors • XMLS datatypes as well as classes in – E.g., • Arbitrarily complex nesting of constructors – E.g.,
  74. 74. OWL Example
  75. 75. RDF Syntax for OWL
  76. 76. RDF Syntax for OWL E.g.,
  77. 77. RDF Syntax for OWL E.g., <owl:Class> <owl:intersectionOf rdf:parseType=quot; collectionquot;> <owl:Class rdf:about=quot;#Personquot;/> <owl:Restriction> <owl:onProperty rdf:resource=quot;#hasChildquot;/> <owl:toClass> <owl:unionOf rdf:parseType=quot; collectionquot;> <owl:Class rdf:about=quot;#Doctorquot;/> <owl:Restriction> <owl:onProperty rdf:resource=quot;#hasChildquot;/> <owl:hasClass rdf:resource=quot;#Doctorquot;/> </owl:Restriction> </owl:unionOf> </owl:toClass> </owl:Restriction> </owl:intersectionOf> </owl:Class>
  78. 78. OWL Axioms
  79. 79. OWL Axioms
  80. 80. References 1. Heflin, J. and Allamang. (2008) Semantic Web for the Working Ontologist 2. Hjelm, J. (2001) Creating the Semantic Web with RDF, Wiley. 3. Powers, S. (2003) Practical RDF, O’Reilly. 4. Baader, F. and Nutt, W. (2002) Basic Description Logics. In the Description Logic Handbook, Cambridge University Press, pp. 47-100. 5. http://www.w3.org/TR/owl-guide/ 6. http://www.javaworld.com/javaworld/jw-03-2001/jw-0330- soap.html 7. http://www.w3schools.com
  81. 81. Lecture outline next week • RDFS Semantics • Web Ontology Language • Description Logics

Notes de l'éditeur


















































































×