02 - semantic web technologien - uri and rdf

101
Semantic Web Technologies Lecture Dr. Harald Sack Hasso-Plattner-Institut für IT Systems Engineering University of Potsdam Winter Semester 2012/13 Lecture Blog: http://semweb2013.blogspot.com / This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0 ) Dienstag, 23. Oktober 12

Upload: harald-sack

Post on 01-Nov-2014

1.852 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies

LectureDr. Harald Sack

Hasso-Plattner-Institut für IT Systems EngineeringUniversity of Potsdam

Winter Semester 2012/13

Lecture Blog: http://semweb2013.blogspot.com/This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)

Dienstag, 23. Oktober 12

Page 2: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

2 1. Introduction 2. Semantic Web - Basic Architecture

Languages of the Semantic Web - Part 1

3. Knowledge Representation and LogicsLanguages of the Semantic Web - Part 2

4. Applications in the ,Web of Data‘

Semantic Web Technologies Content

Dienstag, 23. Oktober 12

Page 3: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

3

2. Semantic Web - Basic ArchitectureLanguages of the Semantic Web - Part 1

Dienstag, 23. Oktober 12

Page 4: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

4

Semantic Web Technologies Content

2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1

• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF

• RDF Schema• How Do We Get Semantics into WWW?

• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough

Dienstag, 23. Oktober 12

Page 5: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

5

What is this?

Dienstag, 23. Oktober 12

Page 6: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

6

What`s the difference?

Dienstag, 23. Oktober 12

Page 7: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

7

Semiotic Triangle

Symbol Objectstands for

Ogden, Richards, Semiotic Triangle, 1923

„apple“

symbolizes refers to

Concept

shared concept

Dienstag, 23. Oktober 12

Page 8: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

8

Uniform

Resource

Identifier

□ different types of resource identifiers all constructed according to a uniform schema

□ whatever may be identified via URI

□ to distinguish one resource from another

The Designator in the Web

Dienstag, 23. Oktober 12

Page 9: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

9

Uniform Resource Identifier ■ A Uniform Resource Identifier (URI) defines a simple and extensible schema

for worldwide unique identification of abstract or physical resources (RFC 3986).

■ Resource can be every object with a clear identity (according to the context of the application) □ as e.g., web pages, books, locations, persons, relations among

objects, abstract concepts, etc.■ The concept of URI is already established in various domains, as e.g., □ the Web (URL, PRN, pURL), □ Books and publications (ISBN, ISSN), □ Digital Object Identifier (DOI)

Dienstag, 23. Oktober 12

Page 10: 02 - Semantic Web Technologien - URI and RDF

URI, Resource and Representation

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

10

http://www.tour-eiffel.fr/index.htmlURI

Eiffel Tower

Resource

Metadata: Content-type: text/htmlData:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>

representation

identifies

represents (stands for)

Dienstag, 23. Oktober 12

Page 12: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

12

HTTP Request / Response

User clicks

Browser sendsHTTP Request

GET http://www.tour-eiffel.fr/index.html HTTP/1.1Host: www.tour-eiffel.frAccept: text/html

Dienstag, 23. Oktober 12

Page 13: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

13

Browser sends HTTP RequestGET http://www.tour-eiffel.fr/index.html HTTP/1.1Host: www.tour-eiffel.frAccept: text/html

Web Server ofwww.tour-eiffel.fr

Web Server processes request

Web Server sends HTTP ResponseHTTP/1.1 200 OKContent-Length: 3134Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>

Browser interprets representation and displays presentation

HTTP Request / Response

Dienstag, 23. Oktober 12

Page 14: 02 - Semantic Web Technologien - URI and RDF

Designator and Designatum

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

14

The web page describes (designates) the Eiffel Tower

Designator

Designatum

The Eiffel Tower is described (designated) by the web page

Dienstag, 23. Oktober 12

Page 15: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

15

2. Semantic Web Basisarchitektur2.1 Uniform Resource Identifier - URI

Bezeichner und Bezeichnetes

René Magritte: La trahison des images (1928)

Dienstag, 23. Oktober 12

Page 16: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

16

Dienstag, 23. Oktober 12

Page 17: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Designator and Designatum

17

W3C: Architecture of the World Wide Web, Volume One

□A resource can be described (designated) via Metadata □ Even if the resource itself cannot be delivered from the

web server, probably its representation might be available that describes the resource sufficiently.

The distinguishing characteristic of [information] resources is that all of their essential characteristics can be conveyed in a message.

Dienstag, 23. Oktober 12

Page 18: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

18

Metadata

Dienstag, 23. Oktober 12

Page 19: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Metadaten

19

Metadata

• „Metadata are data that contain information about other data“ and „Metadata are required to fulfill a specific purpose or to achieve a specific result“(informal definition, Wikipedia)

• „Metadata are structures, encoded data that describe the characteristics of information bearing entities for the purpose of identification, retrieval, evaluation and administration of the described entities.“(W. R. Durrell: Data Administration: A practical Guide to Data Administration. McGraw – Hill, 1985)

• „Metadata is machine understandable information about web resources or other things“ (Tim Berners-Lee: Axioms of Web Architecture: Metadata, 1997)

Dienstag, 23. Oktober 12

Page 20: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

20

URI, Ressource and Metadata

http://www.tour-eiffel.fr/index.htmlURI

Information about the Eiffel Tower

Resource:Eiffel Tower Metadata

Metadata: Content-type: text/htmlData:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Le site officiel de la Tour Eiffel</title> ...</html>

Representation

identifies

represents

describes

Resource:Eiffel Tower

(stands for)

(designates)

Dienstag, 23. Oktober 12

Page 21: 02 - Semantic Web Technologien - URI and RDF

Address

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

21

Uniform Resource Identifier

Name

■ URI combines□ Address (Locator)

□ Uniform Resource Locator (URL, RFC 1738)□ denotes, where a resource can be found in the Web by stating its

primary access mechanism□ might change during life cycle

□ Identity (Name)

□ Uniform Resource Name (URN, RFC 2141)□ persistent identifier for a Web resource□ remains unchanged during life cycle

Dienstag, 23. Oktober 12

Page 22: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

22 ■ US-ASCII Encoding■ Percent Encoding for reserved characters, or characters that do not exist in US-ASCII

encoding existieren pct-encoded = "%" HEXDIG HEXDIG

■ Reserved characters with special function reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@“ sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

■ Permitted characters unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

■ Extension to Universal Character Code (Unicode/ISO 10646)□ Internationalized Resource Identifier (IRI, RFC 3987)

e.g.:

URI - Generic Syntax

Dienstag, 23. Oktober 12

Page 23: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

23

URI = schema"://"[userinfo"@"]host[:port][path]["?"query]["#"fragment]

■ schema: e.g. http, ftp, mailto,...■ userinfo: e.g. username:password■ host: e.g. Domain-Name, IPv4/IPv6 Address■ port: e.g. :80 for standard http port■ path: e.g. path in file system of WWW server■ query: e.g. parameters to be passed over to applications■ fragment: e.g. determines a specific fragment of a document

URI - Generic Syntax

Dienstag, 23. Oktober 12

Page 24: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

24 Media Fragment Identifier■ Multimedia Data cover temporal and spatial dimension■ pinpoint acces to multimedia resources via URI Media Fragment Identifier

(W3C Media Fragments URI 1.0, 25. September 2012, W3C Recommendation)■ Example:

■ WWW Client and WWW Server have to take care for handling media fragments correctly, i.e. consequences for http protocol

http://www.example.com/example.ogg#track=‘audio‘http://www.example.com/example.ogg#track=‘audio‘&t=10s,20shttp://www.example.com/example.ogg#track=‘video‘&xywh=160,120,320,240

URI - Generic Syntax

Dienstag, 23. Oktober 12

Page 25: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

25

■ What if a URI for a resource does not exist?■ Define a URI by yourself:□ avoid overlaps

use your own website □ enables documentation at the same place

( Content Negotiation)■ Separate URI for resource (Designatum) and its documentation (Designator)

via URI references (i.e. via "#" fragments) or Content Negotiation

z.B.: http://hpi.uni-potsdam.de/harald_foaf.rdf#me

URIs im Semantic Web

Sauermann, Cyganiak: Cool URIs for the Semantic Web, W3C Interest Group Note 03 December 2008, http://www.w3.org/TR/cooluris/

Dienstag, 23. Oktober 12

Page 26: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

26

Semantic Web Technologies Content

2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1

• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF

• RDF Schema• How Do We Get Semantics into WWW?

• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough

Dienstag, 23. Oktober 12

Page 27: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

27

2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1

Dienstag, 23. Oktober 12

Page 28: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

28

Semantic Web Technologies Content

2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1

• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF

• RDF Schema• How Do We Get Semantics into WWW?

• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough

Dienstag, 23. Oktober 12

Page 29: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

To a computer, then, the web is a flat, boring world devoid of meaning. This is a pity, as in fact documents on the web describe real objects and imaginary concepts, and give particular relationships between them. For example, a document might describe a person. The title document to a house describes a house and also the ownership relation with a person. [...]

Tim Berners-Lee: W3 future directions, Plenary at 1st WWW Conference, 1994, Geneva (Switzerland)

Dienstag, 23. Oktober 12

Page 30: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

■How do I represent:

„Harald Sack has the phone number ++49 (331) 5509-527“

<phonenr> <owner>Harald Sack</owner> <number>++49 (331) 5509-527</number></phonenr>

<person name=“Harald Sack“> <phonenr>49 (331) 5509-527</phonenr></person>

<person name=“Harald Sack“ phone=“49 (331) 5509-527“ />

is there a unique (intuitive) way to model knowledge?

Knowledge Representation... a simple example

Dienstag, 23. Oktober 12

Page 31: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Harald Sack

has the phone number

++49 (331) 5509-527

Knowledge Representation... a simple example

■How do I represent:

„Harald Sack has the phone number ++49 (331) 5509-527“

Dienstag, 23. Oktober 12

Page 32: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Harald Sackhas phone number

++49 (331) 5509-527

Knowledge Representation... a simple example

■How do I represent:

„Harald Sack has the phone number ++49 (331) 5509-527“■ Intuitive knowledge representation with directed graphs

Dienstag, 23. Oktober 12

Page 33: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Knowledge Representation and Communication

Conceptual Domain ModelObjects and Relations

<xsd:schema xmlns:xsd="http://..."><xsd:annotation> Schema A</xsd:...</xsd:schema> XML Schema

is translated into

Senderuses schema A

Receiveruses schema A

XML-based communicationvia schema A

XML-Parser

Deployment

Dienstag, 23. Oktober 12

Page 34: 02 - Semantic Web Technologien - URI and RDF

■Problem: new communication partners will not understand

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Senderuses schema A

Receiveruses schema A

XML-based communicationvia schema A

XML-Parser

???

new communication partneruses Schema B

???

new communication partner uses Schema C

???

Knowledge Representation and Communication

Dienstag, 23. Oktober 12

Page 35: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

■Schemata have to be translated

Reengineering ofconceptual model

Matching

XML DocumentTranslation

Generation (XSLT)

XML DocumentTranslation

Schemata A <-> B

<xsd:schema xmlns:xsd="http://..."><xsd:annotation> A-Schema</xsd:...</xsd:schema>

<xsd:schema xmlns:xsd="http://..."><xsd:annotation> B-Schema</xsd:...</xsd:schema>

Schema A Schema B

<xsl:stylesheet version="1.0”xmlns:xsl="http://....Transform"<xsl:template match="/">....</xsl:template></xsl:stylesheet>

<xsl:stylesheet version="1.0”xmlns:xsl="http://....Transform"<xsl:template match="/">....</xsl:template></xsl:stylesheet>

Knowledge Representation and Communication

Dienstag, 23. Oktober 12

Page 36: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

■Schemata have to be translated■Problems:□Reengineering is expensive and complicated□Reengineering would not be necessary with a conceptual knowledge

representation languagh□Schema translations (XSLT) are expensive and not necessary

use abstract level above XML

Resource Description Framework (RDF)• simple and extensible

Knowledge Representation and Communication

Dienstag, 23. Oktober 12

Page 37: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

Level 1(Objekte)

XMLXMLSchema

Level 3(abgeschlossene

Welten)

OWL

RDFRDFSchema

Level 2(Wissen über

Objekte)

Knowledge Representation and Communication

Dienstag, 23. Oktober 12

Page 38: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

38

RDF

Dienstag, 23. Oktober 12

Page 39: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

39

Resource■ can be everything (in principle)...■must be uniquely identified and be referencable■ ...simply via URI

Resource Description Framework

Dienstag, 23. Oktober 12

Page 40: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

40

Resource Description Framework

Description■ = Descriptions of resources■ ...via representing their relationships among each other■ ...relationships can be represented as graphs

Dienstag, 23. Oktober 12

Page 41: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

41

Resource Description Framework

Framework■ = Combination of web based protocols (URI, HTTP, XML,...)■ based on formal model (semantics)■ defines all allowed relationships among resources

Dienstag, 23. Oktober 12

Page 42: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

42

Resource Description Framework

■Originally developed to define metadata for web resources ■ 1995-1997: proprietary Meta Content Framework (Netscape)■ 1997 RDF as general description language for metadata, W3C Draft■ 1998 first RDF W3C recommendation (http://www.w3c.org/RDF)

■Definition of an XML subset (machine readable) with predefined (fixed) semantics (machine understandable)

■ Simple, universal semantic data model■ RDF enables high interoperability

Dienstag, 23. Oktober 12

Page 43: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

43

Resource Description Framework

Harald Sack

has phone number

++49 (331) 5509-527

Subject

Property

Object

Dienstag, 23. Oktober 12

Page 44: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

44

Resource Description Framework

Harald Sack

has phone number

++49 (331) 5509-527

■ Knowledge in RDF is expressed as a list of statements■ all RDF statements follow the same simple schema

Dienstag, 23. Oktober 12

Page 45: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

45

Resource Description Framework

Harald Sack

has phone number

++49 (331) 5509-527

Subject

Property

Object

Dienstag, 23. Oktober 12

Page 46: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

46

Resource Description Framework

• Resources:Objects that can be addressed via URI

• Properties:Attributes for the description of resources

• Statements (RDF-Triple):Resource + Property + Object / Value

URI URI URI / Literal

Dienstag, 23. Oktober 12

Page 47: 02 - Semantic Web Technologien - URI and RDF

Constituents of the RDF-Graphen• URI:

• to reference resources uniquely

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

47

Resource Description Framework

http://hpi-web.de/HaraldSack http://swt1213.blogspot.com/

http://hpi-web.de/Personal#writesBlog

S

P

O

Dienstag, 23. Oktober 12

Page 48: 02 - Semantic Web Technologien - URI and RDF

Constituents of the RDF-Graphen• Literals:

• describe data values that do not have a separate existence• strings, interpretation via datatype

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

48

Resource Description Framework

http://hpi-web.de/HaraldSack ++49-331-5509-527

http://hpi-web.de/Personal#hasPhoneNumber

S

P

O

Dienstag, 23. Oktober 12

Page 49: 02 - Semantic Web Technologien - URI and RDF

Constituents of the RDF-Graphen• Literals:

• typed literals can be expressed via XML Schema datatypes• Namespace for typed literals: http://www.w3.org/2001/XMLSchema#

• Example: “Semantics“^^<http://www.w3.org/2001/XMLSchema#string>

• Language Tags denote the (natural) language of the text:• Example: “Semantik“@de , “Semantics“@en

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

49

Resource Description Framework

Dienstag, 23. Oktober 12

Page 50: 02 - Semantic Web Technologien - URI and RDF

Constituents of the RDF-Graphen• Blank Nodes:

• Denotes existence of an individual with specific attributes, but without providing an identification or reference

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

50

Resource Description Framework

S

htttp://www.hpi-web.de/personal#person

rfds:typeP

O

Dienstag, 23. Oktober 12

Page 51: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• Node-Edge-Node Triple

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

51

Resource Description Framework

http://hpi-web.de/HaraldSack

http://hpi-web.de/Personal#writesBlog

S

P

O

http://swt1213.blogspot.com/

Dienstag, 23. Oktober 12

Page 52: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• N3 Notation

•Simple listing of triples• { http://hpi-web.de/HaraldSack, http://hpi-web.de/Personal#writesBlog, http://swt1213.blogspot.com/ }

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

52

Resource Description Framework

Dienstag, 23. Oktober 12

Page 53: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• Turtle (Terse RDF Tripel Language)• Extension of N3• URIs in angle brackets• Literals in quotation marks• Triple ends with a period• Whitespaces will be ignored

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

53

Resource Description Framework

<Subject> <Property> <Object> .<Subject> <Property> “Object“ .

Dienstag, 23. Oktober 12

Page 54: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• Turtle (Terse RDF Tripel Language)

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

54

Resource Description Framework

<http://hpi-web.de/HaraldSack> <http://hpi-web.de/Personal#writesBlog> <http://swt1213.blogspot.com/>.

<http://hpi-web.de/HaraldSack> <http://hpi-web.de/Personal#hasPhoneNumber> “++49-331-5509-527“.

Dienstag, 23. Oktober 12

Page 55: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• Turtle (Terse RDF Tripel Language)

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

55

Resource Description Framework

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix dc: <http://purl.org/dc/elements/1.1/> .@prefix ex: <http://example.org/stuff/1.0/> .

<http://www.w3.org/TR/rdf-syntax-grammar> dc:title "RDF/XML Syntax Specification (Revised)"@en ; ex:editor [ ex:fullname "Dave Beckett"^^xsd:string ; ex:homePage <http://purl.org/net/dajobe/> ] .

Dienstag, 23. Oktober 12

Page 56: 02 - Semantic Web Technologien - URI and RDF

RDF Representations• RDF XML-Serialization

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

56

Resource Description Framework

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:hasPhoneNr>++49-331-5509-527</pers:hasPhoneNumber> </rdf:Description>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:writesBlog> <rdf:Description rdf:about=“http://swt1213.blogspot.com/“></rdf:Description> </pers:writesBlog> </rdf:Description></rdf:RDF>

Dienstag, 23. Oktober 12

Page 57: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

57

Resource Description Framework

hasPhoneNumber

http://hpi-web.de/HaraldSack

http://swt1213.blogspot.com/writesBlog

Resource

Literal

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:hasPhoneNumber>++49-331-5509-527</pers:hasPhoneNumber> <rdf:Description>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:writesBlog rdf:resource=“http://swt1213.blogspot.com/“ /> </rdf:Description></rdf:RDF>

Resource

++49-331-5509-527

Dienstag, 23. Oktober 12

Page 58: 02 - Semantic Web Technologien - URI and RDF

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:hasPhoneNumber>++49-331-5509-527</pers:hasPhoneNumber> <rdf:Description>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“> <pers:writesBlog rdf:resource=“http://swt1213.blogspot.com/“ /> </rdf:Description></rdf:RDF>

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

58

Resource Description Framework

http://hpi-web.de/HaraldSack

Resource

Literal

Resource

++49-331-5509-527hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 59: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

59

Resource Description Framework

http://hpi-web.de/HaraldSack

Resource

Literal

Resource

++49-331-5509-527

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“>

<rdf:Description rdf:about=“http://hpi-web.de/HaraldSack“ pers:hasPhoneNumber=“++49-331-5509-527“> <pers:writesBlog rdf:resource=“http://swt1213.blogspot.com/“/> </rdf:Description></rdf:RDF>

hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 60: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

60

Resource Description Framework

http://hpi-web.de/Dozenten#HaraldSack

Resource

Literal

Resource

++49-331-5509-527

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“

xml:base=“http://hpi-web.de/Dozenten“>

<rdf:Description rdf:about=“#HaraldSack“ pers:hasPhoneNumber=“++49-331-5509-527“> <pers:writesBlog rdf:resource=“http://swt1213.blogspot.com/“/> </rdf:Description></rdf:RDF>

hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 61: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

61

Resource Description Framework

http://hpi-web.de/Dozenten#HaraldSack

Resource

Literal

Resource

++49-331-5509-527

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix pers: <http://hpi-web.de/Personal#> .@base <http://hpi-web.de/Dozenten> .

:HaraldSack pers:hasphoneNumber “++49-331-5509-527“ .:HaraldSack pers:writesBlog <http://swt1213.blogspot.com/> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix pers: <http://hpi-web.de/Personal#> .@base <http://hpi-web.de/Dozenten> .

:HaraldSack pers:hasPhoneNumber “++49-331-5509-527“ ; pers:writesBlog <http://swt1213.blogspot.com/> .

Short Cut

hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 62: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

62

Resource Description Framework

http://hpi-web.de/Dozenten#HaraldSack

Resource

Literal

Resource

++49-331-5509-527

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:pers=“http://hpi-web.de/Personal#“ xml:base=“http://hpi-web.de/Dozenten“

<rdf:Description rdf:ID=“HaraldSack“ pers:hasPhoneNumber=“++49-331-5509-527“> <pers:writesBlog rdf:resource=“http://swt1213.blogspot.com/“/> </rdf:Description></rdf:RDF> Datei http://hpi-web.de/Dozenten.rdf

hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 63: 02 - Semantic Web Technologien - URI and RDF

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix pers: <http://hpi-web.de/Personal#> .

:HaraldSack pers:hasPhoneNumber “++49-31-5509-527“ ; pers:writesBlog <http://swt1213.blogspot.com/> .

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

63

Resource Description Framework

http://hpi-web.de/Dozenten#HaraldSack

Resource

Literal

Resource

++49-331-5509-527

Datei http://hpi-web.de/Dozenten.rdf

hasPhoneNumber

http://swt1213.blogspot.com/writesBlog

Dienstag, 23. Oktober 12

Page 64: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

64

Resource Description Framework

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

http://hpi-web.de/Lecture#Name

http://hpi-web.de/Lecture#SWS

4

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:lv=“http://hpi-web.de/Lecture#“ >

<rdf:Description rdf:about=“http://hpi-web.de/ws1213#swt“> <lv:Name rdf:datatype=“http://www.w3c.org/2001/XMLSchema#string“> Semantic Web Technologies </lv:Name> <lv:SWS rdf:datatype= “http://www.w3c.org/2001/XMLSchema#integer“> 4 </lv:SWS> </rdf:Description></rdf:RDF>

Dienstag, 23. Oktober 12

Page 65: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

65

Resource Description Framework

http://hpi-web.de/ws1213#swt

Semantic Web Technologieshttp://hpi-web.de/Lecture#Name

http://hpi-web.de/Lecture#SWS4

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix lv: <http://hpi-web.de/Lecture#> .

<http://hpi.web.de/ws1213#swt> lv:Name “Semantic Web Technologies“^^<http://www.w3c.org/2001/XMLSchema#string> ; lv:SWS “4“^^<http://www.w3c.org/2001/XMLSchema#integer> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix lv: <http://hpi-web.de/Lecture#> .

<http://hpi.web.de/ws1213#swt> lv:Name “Semantic Web Technologies“; lv:SWS 4 . Abgekürzte

Schreibweise

Dienstag, 23. Oktober 12

Page 66: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

66

Resource Description Framework

Multi Valued Relations and Blank Nodes• Example: • A lecture takes place twice a week in two different rooms• How to model this in RDF?

Problem: not unique

Semantic Web Technologies

http://hpi-web.de/Lecture#hasName

http://hpi-web.de/Lecture#hasRoom

http://hpi-web.de/Lecture#hasDate

HS3

Die 13.30-15.00

http://hpi-web.de/Lecture#hasRoom

http://hpi-web.de/Lecture#hasDate

H-1.52

Mi 13.30-15.00

http://hpi-web.de/ws1213#swt

Dienstag, 23. Oktober 12

Page 67: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

67

Resource Description Framework

Multi Valued Relations and Blank Nodes• Example: • A lecture takes place twice a week in two different rooms• How to model this in RDF?

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologieshpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

H-1.52

Mi 13.30-15.00

hpi-lv:hasRoom

hpi-lv:hasDate

hpi-lv:takesPlace

hpi-lv:takesPlace

Dienstag, 23. Oktober 12

Page 68: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

68

Resource Description Framework

Blank Nodes• Blank Nodes (Bnodes) can be introduced to represend multi valued

relationships• Blank Nodes can be introduced for resources that don‘t need a name

(auxiliary nodes)

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

hpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

hpi-lv:takesPlace

Dienstag, 23. Oktober 12

Page 69: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

69

Resource Description Framework

Anonymous Blank Nodes

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

hpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

hpi-lv:takesPlace

<xml version=“1.0“ encoding=“utf-8“><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:hpi-lv=“http://hpi-web.de/Lecture#“ >

<rdf:Description rdf:about=“http://hpi-web.de/ws1213#swt“> <hpi-lv:takesPlace rdf:parseType=“Resource“/> <hpi-lv:hasDate>Die, 13.30-15.00</hpi-lv:hasDate> <hpi-lv:hasRoom>HS3</hpi-lv:hasRoom> </hpi-lv:takesPlace> </rdf:Description>

Dienstag, 23. Oktober 12

Page 70: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

70

Resource Description Framework

Anonymous Blank Nodes

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

hpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

hpi-lv:takesPlace

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

<http://hpi-web.de/ws1213#swt> hpi-lv:takesPlace [ hpi-lv:hasDate “Die 13.30-15.00“; hpi-lv:hasRoom “HS3“ ] .

Dienstag, 23. Oktober 12

Page 71: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

71

Resource Description Framework

Dereferencable Blank Nodes

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

hpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

ID1

hpi-lv:takesPlace

<rdf:Description rdf:about=“http://hpi-web.de/ws1213#swt“> <hpi-lv:takesPlace rdf:nodeID=“ID1“/> <rdf:Description>

<rdf:Description rdf:nodeID=“ID1“> <hpi-lv:hasDate>Die 13.30-15.00</hpi-lv:hasDate> <hi-lv:hasRoom>HS3<hpi-lv:hasRoom> </rdf:Description></rdf:RDF>

Dienstag, 23. Oktober 12

Page 72: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

72

Resource Description Framework

Dereferencable Blank Nodes

hpi-lv:hasRoom

http://hpi-web.de/ws1213#swt

Semantic Web Technologies

hpi-lv:hasName

HS3

Die 13.30-15.00

hpi-lv:hasDate

ID1

hpi-lv:takesPlace

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

<http://hpi-web.de/ws1213#swt> hpi-lv:takesPlace _:ID1 .

_:ID1 hpi-lv:hasDate “Die 13.30-15.00“; hpi-lv:hasRoom “HS3“ .

Dienstag, 23. Oktober 12

Page 73: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

73

Resource Description Framework

Lists• General Data structure to enumerate any resoures or literals• Only shortcuts, no additional semantic expressivity

• Distinguish between• Container

open list, i.e. extension (new entries) possible• Collections

closed list, i.e. no extension possible

Dienstag, 23. Oktober 12

Page 74: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

74

Resource Description Framework

RDF Container

rdf:type

rdf:Seq

hpi-lv:hasParticipants

http://hpi-web.de/SchmidtJoseph

http://hpi-web.de/SchulzeEgon

http://hpi-web.de/MuellerFranz

http://hpi-web.de/BurgerAntonrdf:_1

http://hpi-web.de/ws1213#swt

rdf:_2

rdf:_3

rdf:_4

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

Dienstag, 23. Oktober 12

Page 75: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

75

Resource Description Framework

RDF Container

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<rdf:Description rdf:about=“http://hpi-web.de/ws1213#swt“> <lv:hasParticipants> <rdf:Seq> <rdf:li rdf:resource=“http://hpi-web.de/BurgerAnton“ /> <rdf:li rdf:resource=“http://hpi-web.de/MuellerFranz“ /> <rdf:li rdf:resource=“http://hpi-web.de/SchmidtJoseph“ /> <rdf:li rdf:resource=“http://hpi-web.de/SchulzeEgon“ /> </rdf:Seq> </lv:hasParticipants> </rdf:Description>

Dienstag, 23. Oktober 12

Page 76: 02 - Semantic Web Technologien - URI and RDF

RDF-Container• the root node of the container is

assigned a container-typ via rdf:type• rdf:Bag

unordered set of elements,there is no given order of elements

• rdf:Seqordered set of elements,

• rdf:Altdefines alternatives of elements only one element of the given alternatives is relevant for the application

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

76

Resource Description Framework

Dienstag, 23. Oktober 12

Page 77: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

77

Resource Description Framework

RDF Container

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix lv: <http://hpi-web.de/Lecture#> .@base <http://hpi-web.de/>

:swt lv:hasParticipants [ a rdf:Seq; rdf:_1 <BurgerAnton>; rdf:_2 <MuellerFranz>; rdf:_3 <SchmidtJoseph>; rdf:_4 <SchulzeEgon> . ] .

Dienstag, 23. Oktober 12

Page 78: 02 - Semantic Web Technologien - URI and RDF

RDF-Collection

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

78

Resource Description Framework

rdf:nil

lv:hasParticipants rdf:first

rdf:rest

http://hpi-web.de/SchmidtJoseph

http://hpi-web.de/SchulzeEgon

http://hpi-web.de/MuellerFranz

http://hpi-web.de/BurgerAnton

List is splitted recursively in Head (first) and Tail (rest).

http://hpi-web.de/ws1213#swt

rdf:rest

rdf:rest

rdf:rest

rdf:first

rdf:first

rdf:first

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

Dienstag, 23. Oktober 12

Page 79: 02 - Semantic Web Technologien - URI and RDF

RDF-Collection

<rdf:Description rdf:about=“http://hpi-web.de/ws1213#swt“> <lv:hasParticipant rdf:parseType=“Collection“> <rdf:Description rdf:about=“http://hpi-web.de/BurgerAnton“ /> <rdf:Description rdf:about=“http://hpi-web.de/MuellerFranz“ /> <rdf:Description rdf:about=“http://hpi-web.de/SchmidtJoseph“ /> <rdf:Description rdf:rabout=“http://hpi-web.de/SchulzeEgon“ /> </lv:hasParticipant> </rdf:Description>

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

79

Resource Description Framework

Dienstag, 23. Oktober 12

Page 80: 02 - Semantic Web Technologien - URI and RDF

RDF-Collection

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

80

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix lv: <http://hpi-web.de/Lecture#> .@base <http://hpi-web.de/>

:swt lv:hasParticipant [ rdf:first <BurgerAnton>; rdf:rest [ rdf:first <MuellerFranz>; rdf:rest [ rdf:first <SchmidtJoseph>; rdf:rest [ rdf:first <SchulzeEgon>; rdf:rest rdf:nil .] ] ] ] .

Resource Description Framework

Dienstag, 23. Oktober 12

Page 81: 02 - Semantic Web Technologien - URI and RDF

RDF-Collection

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

81

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix lv: <http://hpi-web.de/Lecture#> .@base <http://hpi-web.de/>

:swt lv:hasParticipant ( <BurgerAnton> <MuellerFranz> <SchmidtJoseph> <SchulzeEgon>) .

Resource Description Framework

Dienstag, 23. Oktober 12

Page 82: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

82

What can we model with RDF?

Dienstag, 23. Oktober 12

Page 83: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

83

Resource Description Framework

„My dear Watson,...I suppose that the Gardenerhas killed the Butler!“

Dienstag, 23. Oktober 12

Page 84: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

84

Resource Description Framework

RDF-Reification• RDF permits interleaving of statements,

i.e. to make statements about statements• Example:

„My dear Watson,...I suppose that the Gardenerhas killed the Butler!“

Dienstag, 23. Oktober 12

Page 85: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

85

Resource Description Framework

RDF-Reification• RDF permits interleaving of statements, i.e. to make statements about

statements• Example:• Sherlock Holmes supposes that the Gardener has killed the Butler

•Part 1: The Gardener has killed the Butler

•Part 2: Sherlock Holmes supposes

exv:Gardener exv:hasKilled exv:Butler .

exv:SherlockHolmes exv:supposes ???? .

Dienstag, 23. Oktober 12

Page 86: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

86

Resource Description Framework

RDF-Reification• rdf:Statement

defines an RDF Statement, consisting of Subject, Predicate and Object• rdf:subject - the described resource

• rdf:predicate - the original property

• rdf:object - the value of the property

<rdf:Description rdf:about=“http://example.org/StatementOnGaertner“> <rdf:subject rdf:resource=“http://example.org/Gardener“ /> <rdf:predicate rdf:resource=“http://example.org/Crime#hasKilled“ /> <rdf:object rdf:resource=“http://example.org/Butler“ /> <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" /></rdf:Description>

Dienstag, 23. Oktober 12

Page 87: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

87

Resource Description Framework

RDF-Reification

<rdf:Description rdf:about=“http://example.org/StatementOnGardener“> <rdf:subject rdf:resource=“http://example.org/Gardener“ /> <rdf:predicate rdf:resource=“http://example.org/Crime#hasKilled“ /> <rdf:object rdf:resource=“http://example.org/Butler“ /> <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" /></rdf:Description>

<rdf:Description rdf:about=“http://example.org/SherlockHolmes“> <exv:supposes rdf:resource=“http://example.org/StatementOnGaertner“ /> </rdf:Description>

SherlockHolmes

exv:supposes

StatementOnGardener

Gardener

exv:hasKilled

Butler

rdf:subject

rdf:predicate

rdf:object

Dienstag, 23. Oktober 12

Page 88: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

88

Resource Description Framework

RDF-Reification

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@exv <http://example.org/Crime#>

<SherlockHolmes> exv:supposes <StatementOnGardener> .<StatementOnGardener> a rdf:Statement ; rdf:subject <Gardener> ; rdf:predicate exv:hasKilled ; rdf:object <Butler> .

SherlockHolmes

exv:supposes

StatementOnGardener

Gardener

exv:hasKilled

Butler

rdf:subject

rdf:predicate

rdf:object

Dienstag, 23. Oktober 12

Page 89: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

89

Resource Description Framework

RDF-Reification• Is Reification really necessary?• Modeling data provenance • Formalizing statements about Reliability (Trust) • Definition of Metadata about Statements (Assertions, Statements)

• for (general) knowledge representation (Ontologie Construction):• Transformation of Relations into Classes

Dienstag, 23. Oktober 12

Page 90: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

90

RDF and Data Integration

Dienstag, 23. Oktober 12

Page 91: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

91

• Simple Example: Bibliography Database

ID Author Title Publisher Year

ISBN 0-00-651409-X HS-123 WWW S-001 2004

ID Name Homepage

HS-123 Harald Sack http://hpi-web.de/HaraldSack.html

ID Publisher Location

S-001 Springer Heidelberg

RDF and Data Integration

Dienstag, 23. Oktober 12

Page 92: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

92

ISBN 0-00-651409-X

WWW

2004

a:title

a:year

Springer

Heidelberg

a:publishername

a:publisherlocation

a:publisher

Harald Sack

http://hpi-web.de/HaraldSack.html

a:authorname

a:authorhomepage

a:author

• Database export into a set of relations

RDF and Data Integration

Dienstag, 23. Oktober 12

Page 93: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

93

ISBN 0-00-651409-X

u:author

Harald Sack

u:name

http://.../paper

u:cites

Very important paper

u:title

RDF and Data Integration

ISBN 0-00-651409-X

WWW

2004

a:title

a:year

Springer

Heidelberg

a:publishername

a:publisherlocation

a:publisher

Harald Sack

http://hpi-web.de/HaraldSack.html

a:authorname

a:authorhomepage

a:author

Dienstag, 23. Oktober 12

Page 94: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

94

ISBN 0-00-651409-X

WWW

2004

Springer

Heidelberg

Harald Sack

http://hpi-web.de/HaraldSack.html

ISBN 0-00-651409-X

u:author

Harald Sack

u:name

http://.../paper

u:cites

Very important paper

u:title

a:title

a:year

a:publishername

a:publisherlocation

a:publisher

a:authorname

a:authorhomepage

a:author

RDF and Data Integration

Dienstag, 23. Oktober 12

Page 95: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

95

WWW

2004

Springer

Heidelberg

Harald Sack

http://hpi-web.de/HaraldSack.html

u:author

Harald Sack

u:name

http://.../paper

u:cites

Very important paper

ISBN 0-00-651409-X

u:title

a:title

a:year

a:publishername

a:publisherlocationa:publisher

a:authorname

a:authorhomepage

a:author

RDF and Data Integration

Dienstag, 23. Oktober 12

Page 96: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

96

RDF - a Resume

RDF Model -- Summary• An RDF Model is a set of RDF statements• Statement := (subject, property, object)• Subject is a resource• Property is a resource• Object is ether a resource or a literal

Dienstag, 23. Oktober 12

Page 97: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

97

Semantic Web Technologies Content

2. Semantic Web Basic ArchitectureThe Languages of the Semantic Web - Part 1

• Uniform Resource Identifier - URI• Recapitulation: XML and XMLSchema• Resource Description Framework - RDF

• RDF Schema• How Do We Get Semantics into WWW?

• µFormats, schema.org, RDFa and GRDDL• Query Language SPARQL• Why RDF(S) is not enough

Dienstag, 23. Oktober 12

Page 98: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

98

SO ... WE NEED A WAY TO DEFINE RDF SCHEMATA FORCLASSES AND RELATIONS ?!

Next lecture

RDFS

Dienstag, 23. Oktober 12

Page 99: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

99

Bibliography

• Ch. Meinel, H. Sack: WWW - Kommunikation, Internetworking, Webtechnologien, Springer, 2004.

• D. R. Hofstadter: Gödel, Escher, Bach - ein endlos geflochtenes Band, Dtv, 1992.

2. Semantic Web Basic Architecture2.1 Uniform Resource Identifier2.2 XML und XMLSchema2.3 Resource Description Framework

Dienstag, 23. Oktober 12

Page 100: 02 - Semantic Web Technologien - URI and RDF

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

100

Bibliography

• P. Hitzler, S. Roschke, Y. Sure: Semantic Web Grundlagen, Springer, 2007.

• P. Hitzler, M. Krötzsch, S. Rudolph:Foundations of Semantic Web Technologies,CRC Press, 2009.

2. Semantic Web Basic Architecture2.1 Uniform Resource Identifier2.2 XML und XMLSchema2.3 Resource Description Framework

Dienstag, 23. Oktober 12