0% found this document useful (0 votes)
127 views

OpenHPI KnoEng 02 Part1 8

The document is a lecture on semantic web technologies that discusses URIs (Uniform Resource Identifiers). It explains that URIs provide a uniform schema for uniquely identifying resources on the web, where resources can be physical or abstract objects. URIs are already used to identify things like web pages, books, locations, and concepts. The lecture focuses on how URIs name and identify different types of resources on the semantic web.

Uploaded by

Aurora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views

OpenHPI KnoEng 02 Part1 8

The document is a lecture on semantic web technologies that discusses URIs (Uniform Resource Identifiers). It explains that URIs provide a uniform schema for uniquely identifying resources on the web, where resources can be physical or abstract objects. URIs are already used to identify things like web pages, books, locations, and concepts. The lecture focuses on how URIs name and identify different types of resources on the semantic web.

Uploaded by

Aurora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 232

Knowledge Engineering

with Semantic Web Technologies


Lecture 2: Semantic Web Technologies - Part 1
01: How to Name Things? - URIs

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Semantic Web Technologies
Part 1

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

01 How to Name Things? - URIs


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
What is this?
5

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

Johannes Osterhoff::
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
La trahison des pommes (2011)
What`s the difference?
7

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Semiotic Triangle
8

Concept

symbolizes refers to

Symbol Object
stands for
„apple“
Ogden, Richards: Semiotic Triangle, 1923
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Semiotic Triangle
8

shared concept

Concept

symbolizes refers to

Symbol Object
stands for
„apple“
Ogden, Richards: Semiotic Triangle, 1923
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Semiotic Triangle
9

shared concept

Concept

symbolizes refers to

Symbol Object
stands for
„apple“
Ogden, Richards: Semiotic Triangle, 1923
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Semiotic Triangle
9

shared concept is a
substitute for

Concept

symbolizes refers to

Symbol Object
stands for
„apple“
Ogden, Richards: Semiotic Triangle, 1923
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Names in the Web...
10

Uniform □ different types of resource


identifiers all constructed
according to a uniform
schema

Resource □ whatever may be identified


via URI

Identifier □ to distinguish one resource


from another

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ A Uniform Resource Identifier (URI) defines a simple and extensible schema for
worldwide unique identification of abstract or physical resources (RFC 3986).

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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)

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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.

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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.,

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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),

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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),
□ Books and publications (ISBN, ISSN),

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
11

■ 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),
□ Books and publications (ISBN, ISSN),
□ Digital Object Identifier (DOI)

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, http://commons.wikimedia.org/wiki/File:Eiffel_tower_from_trocadero.jpg
Hasso-Plattner-Institut, Universität Potsdam
Resource

12

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, http://commons.wikimedia.org/wiki/File:Eiffel_tower_from_trocadero.jpg
Hasso-Plattner-Institut, Universität Potsdam
URI Resource
http://www.tour-eiffel.fr/index.html
12

identifies

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, http://commons.wikimedia.org/wiki/File:Eiffel_tower_from_trocadero.jpg
Hasso-Plattner-Institut, Universität Potsdam
URI Resource
http://www.tour-eiffel.fr/index.html
12

identifies

represents
Representation (stands for)
Metadata:
Content-type: text/html
Data:
<!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>

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, http://commons.wikimedia.org/wiki/File:Eiffel_tower_from_trocadero.jpg
Hasso-Plattner-Institut, Universität Potsdam
Representation and
Presentation
13
Metadata:
Content-type: text/html
Data: defines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html> Presentation
<head>
<title>Le site officiel de la Tour Eiffel</title>
...
</html>

Representation

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
HTTP Request / Response
14

Browser sends
HTTP Request

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


Host: www.tour-eiffel.fr
Accept: text/html

User clicks

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
HTTP Request / Response
15

Browser sends HTTP Request Web Server


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

Browser interprets representation


and displays presentation Web Server sends HTTP Response
HTTP/1.1 200 OK
Content-Length: 3134 Web Server of
Content-Type: text/html; charset=utf-8
www.tour-eiffel.fr
<!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>

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Designator and Designatum

16

Designator

Designatum

The web page describes


(designates) the Eiffel Tower

The Eiffel Tower is described


(designated) by the web page

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
2. Semantic Web Basisarchitektur
2.1 Uniform Resource Identifier - URI

17 Bezeichner und Bezeichnetes

René Magritte:
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
La trahison des images (1928)
18
□ 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.

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI, Resource and
Metadata Resource:
Eiffel Tower
19 URI
http://www.tour-eiffel.fr/index.html

identifies

Representation
Metadata: describes
Content-type: text/html
Data: represents (designates)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Resource:
<html> (stands for) Information Eiffel Tower
<head>
<title>Le site officiel de la Tour Eiffel</title> about Metadata
... the Eiffel Tower
</html>

(stands for)

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

02 How to Name Things? - URIs Pt.2


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies - Part 1
02: How to Name Things? - URIs - Pt.2

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3

02 How to Name Things? - URIs Pt.2


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Use URIs to name things on the Web

4
Resource: Eiffel Tower

URI
http://www.tour-eiffel.fr/index.html

identifies

(stands for)

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
5 ■ URI combines

Address
□ 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

Name
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Uniform Resource Identifier
5 ■ URI combines

Address
□ 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)

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
6
■ 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.:

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


■ userinfo: e.g. username:password

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


■ userinfo: e.g. username:password
■ host: Domain-Name, IPv4/IPv6 Address

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


■ userinfo: e.g. username:password
■ host: Domain-Name, IPv4/IPv6 Address
■ port: e.g. :80 for standard http port

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


■ userinfo: e.g. username:password
■ host: Domain-Name, IPv4/IPv6 Address
■ port: e.g. :80 for standard http port
■ path: path in file system of WWW server

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
URI - Generic Syntax
7

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

■ schema: e.g. http, ftp, mailto,...


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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
8
What if a URI for a resource does not exist?

■ Define a URI by yourself:


□ avoid overlaps ! use your own website
□ enable documentation at the same place ! Content Negotiation

■ Use separate URIs for the resource (Designatum) and its documentation
(Designator) via
□ Content Negotiation or
□ URI references (i.e. via "#" fragment identifier)

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower

URI represents the Designatum

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower
1
URI represents the Designatum
HTTP GET request
Accept Header: text/html

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower
1
URI represents the Designatum
HTTP GET request
Accept Header: text/html

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower
1
URI represents the Designatum
HTTP GET request
Accept Header: text/html

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower
1
URI represents the Designatum
HTTP GET request
Accept Header: text/html

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator


3
HTTP GET request
Accept Header: text/html
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

9
Let‘s try an example:
■ I want to have information about the Eiffel Tower from DBpedia

http://dbpedia.org/resource/Eiffel_Tower
1
URI represents the Designatum
HTTP GET request
Accept Header: text/html

HTTP/1.1 303 See Other 2 4

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator


3
HTTP GET request
Accept Header: text/html HTML Document
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower

URI represents the Designatum

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower
1
HTTP GET request URI represents the Designatum
Accept Header: application/rdf+xml

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower
1
HTTP GET request URI represents the Designatum
Accept Header: application/rdf+xml

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower
1
HTTP GET request URI represents the Designatum
Accept Header: application/rdf+xml

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower
1
HTTP GET request URI represents the Designatum
Accept Header: application/rdf+xml

HTTP/1.1 303 See Other 2

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator


3
HTTP GET request
Accept Header: application/rdf+xml
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Content Negotiation

Let‘s try an example:


10

■ I want to have machine readable information about the Eiffel Tower from
DBpedia
http://dbpedia.org/resource/Eiffel_Tower
1
HTTP GET request URI represents the Designatum
Accept Header: application/rdf+xml

HTTP/1.1 303 See Other 2 4

http://dbpedia.org/page/Eiffel_Tower

URI represents the Designator


3
HTTP GET request
RDF Document
Accept Header: application/rdf+xml
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Fragment Identifier

11 Let‘s try another example:


#me
■ I want to have machine readable information myself

e.g.: http://hpi.uni-potsdam.de/harald_foaf.rdf

Designator
FOAF Document
with information
about me

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

Designatum

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Next
sect
ion

12

03 How to Represent Simple Facts - RDF


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
03: How to Represent Simple Facts - RDF

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Intr
3

odu
ctio
n

03 How to Represent Simple Facts - RDF


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
2. Semantic Web Technologies
Part 1

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent
„Harald Sack has the phone number ++49 (331) 5509-927“ in XML?

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent
„Harald Sack has the phone number ++49 (331) 5509-927“ in XML?

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent
„Harald Sack has the phone number ++49 (331) 5509-927“ in XML?

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

<person name=“Harald Sack“>


<phonenr>49 (331) 5509-927</phonenr>
</person>

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent
„Harald Sack has the phone number ++49 (331) 5509-927“ in XML?

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

<person name=“Harald Sack“>


<phonenr>49 (331) 5509-927</phonenr>
</person>

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent
„Harald Sack has the phone number ++49 (331) 5509-927“ in XML?

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

<person name=“Harald Sack“>


<phonenr>49 (331) 5509-927</phonenr>
</person>

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

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


Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... with XML?

■ Successful communication requires translation from one XML serialization


(Schema A) to another XML serialization (Schema B)

<phonenr>
<owner>Harald Sack</owner>
<number>++49 (331) 5509-927</number>
</phonenr>
XSLT Transformation
XML Schema A <xsl:stylesheet version="1.0”
xmlns:xsl="http://....Transform"
<xsl:template match="/">
....
</xsl:template>
</xsl:stylesheet>

XML Schema B
<person name=“Harald Sack“>
<phonenr>49 (331) 5509-927</phonenr>
</person>

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“

Harald Sack

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“

Harald Sack
has the phone number

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“

Harald Sack
has the phone number
++49 (331) 5509-927

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
■ Intuitive knowledge representation with directed graphs

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Representation
... a simple example

■ How do I represent:
„Harald Sack has the phone number ++49 (331) 5509-927“
■ Intuitive knowledge representation with directed graphs

Harald Sack ++49 (331) 5509-927


has phone number

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

D F
R
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
10
Description
Framework

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
11
Description
Framework

Description
■ = Descriptions of resources
■ ...via representing properties and relationships among resources
■ ...relationships can be represented as graphs

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
12
Description
Framework

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
13
Description
Framework

Harald Sack

has phone number

++49 (331) 5509-927

■ Knowledge in RDF is expressed as a list of statements


■ all RDF statements follow the same simple schema

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
14
Description
Framework

Harald Sack Subject

has phone number Property

++49 (331) 5509-927Object


Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
15
Description
Framework

Harald Sack Subject URI

has phone number Property URI

++49 (331) 5509-927Object URI/Literal

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
16
Description
Framework

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

URI URI URI / Literal

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
17
Description
Framework
Constituents of the RDF-Graph
• URI:
• to reference resources uniquely

http://harald.sack.de/foaf.rdf#harald http://harald.blogspot.com/

Subject Object
http://xmlns.com/foaf/0.1/weblog
Property

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
18
Description
Framework
Constituents of the RDF-Graph
• Literals:
• describe data values that do not have a separate existence
• strings, interpretation via datatype

http://harald.sack.de/foaf.rdf#harald ++49-331-5509-927
S O

http://xmlns.com/foaf/0.1/phone
P

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
19
Description
Framework
Constituents of the RDF-Graph
• 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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
http://www.w3.org/TR/2013/WD-rdf11-concepts-20130115/#xsd-datatypes

20

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
http://www.w3.org/TR/2013/WD-rdf11-concepts-20130115/#xsd-datatypes

20

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
21
Description
Framework
Constituents of the RDF-Graph
• Blank Nodes:
• denote existence of an individual with specific attributes, but without
providing an identification or reference

http://dbpedia.org/ontology/Person

O
S
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
P
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
22
Description
Framework
RDF Representations

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
22
Description
Framework
RDF Representations
• Node-Edge-Node Triple

Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-927

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
23 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-927

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

• N-Triples Notation
• URIs/IRIs in angle brackets
• Literals in quotation marks
• Triple ends with a period

<http://harald.sack.de/foaf.rdf#harald> <http://xmlns.com/foaf/0.1/phone> “+
+49-331-5509-927“ .
<http://harald.sack.de/foaf.rdf#harald> <http://xmlns.com/foaf/0.1/weblog>
<http://harald.blogspot.com/> .
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
24 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-927

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

• Turtle (Terse RDF Tripel Language) Notation


• extension of N-Triples

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf>

<#harald> foaf:phone “++49-331-5509-927“ .


<#harald> foaf:weblog <http://harald.blogspot.com/> .

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
25

RDF Representations
• RDF/XML Notation

<xml version=“1.0“ encoding=“utf-8“>


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“
xmlns:foaf=“http://xmlns.com/foaf/0.1/“ >
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:phone>++49-331-5509-927</foaf:phone>
</rdf:Description>
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:weblog>
<rdf:Description rdf:about=“http://haraldblogspot.com/“></rdf:Description>
</foaf:weblog>
</rdf:Description>
</rdf:RDF>
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
25

RDF Representations S

• RDF/XML Notation

<xml version=“1.0“ encoding=“utf-8“>


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“
xmlns:foaf=“http://xmlns.com/foaf/0.1/“ >
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:phone>++49-331-5509-927</foaf:phone>
</rdf:Description>
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:weblog>
<rdf:Description rdf:about=“http://haraldblogspot.com/“></rdf:Description>
</foaf:weblog>
</rdf:Description>
</rdf:RDF>
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
25

RDF Representations S P

• RDF/XML Notation

<xml version=“1.0“ encoding=“utf-8“>


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“
xmlns:foaf=“http://xmlns.com/foaf/0.1/“ >
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:phone>++49-331-5509-927</foaf:phone>
</rdf:Description>
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:weblog>
<rdf:Description rdf:about=“http://haraldblogspot.com/“></rdf:Description>
</foaf:weblog>
</rdf:Description>
</rdf:RDF>
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
25

RDF Representations S P O

• RDF/XML Notation

<xml version=“1.0“ encoding=“utf-8“>


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#“
xmlns:foaf=“http://xmlns.com/foaf/0.1/“ >
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:phone>++49-331-5509-927</foaf:phone>
</rdf:Description>
<rdf:Description rdf:about=“http://harald.sack.de/foaf.rdf#harald“>
<foaf:weblog>
<rdf:Description rdf:about=“http://haraldblogspot.com/“></rdf:Description>
</foaf:weblog>
</rdf:Description>
</rdf:RDF>
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
26

RDF Representations
• JSON-LD Notation (RDF 1.1)

{
"http://harald.sack.de/foaf.rdf#harald" : {
"http://xmlns.com/foaf/0.1/phone" : [ { "value" : "++49-331-5509-927",
"type" : "literal" } ]
}
{
"http://xmlns.com/foaf/0.1/weblog" : [ { "value" : "http://harald.blogspot.com/",
"type" : "uri" } ]
}
}

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
26

RDF Representations S P O

• JSON-LD Notation (RDF 1.1)

{
"http://harald.sack.de/foaf.rdf#harald" : {
"http://xmlns.com/foaf/0.1/phone" : [ { "value" : "++49-331-5509-927",
"type" : "literal" } ]
}
{
"http://xmlns.com/foaf/0.1/weblog" : [ { "value" : "http://harald.blogspot.com/",
"type" : "uri" } ]
}
}

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
27 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-927

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

• Turtle (Terse RDF Tripel Language) Notation

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf>.

<#harald> foaf:phone "++49-331-5509-927" .


<#harald> foaf:weblog <http://harald.blogspot.com/>.

http://www.easyrdf.org/converter
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Sim
28
ple
Fac
ts i
n R
DF

04 How to Represent Simple Facts - RDF Pt.2


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
04: How to Represent Simple Facts - RDF - Part 2

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3

Sim
ple
Fac
wit ts i
h T n R
URT DF
LE

04 How to Represent Simple Facts - RDF Pt.2


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
4 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

• Turtle (Terse RDF Tripel Language) Notation


• ...starting from N-Triples

<http://harald.sack.de/foaf.rdf#harald> <http://xmlns.com/foaf/0.1/phone> “+
+49-331-5509-527“ .
<http://harald.sack.de/foaf.rdf#harald> <http://xmlns.com/foaf/0.1/weblog> <http://
semweb2014.blogspot.com/> .

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


Resource
Description
Framework
5 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
5 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@prefixe directive associates prefix-label with IRI

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
5 Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@prefixe directive associates prefix-label with IRI

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

usage of prefix label

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


Resource
Description
Framework
6
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
6
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@base directive provides IRI to complement all relative IRIs

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
6
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@base directive provides IRI to complement all relative IRIs

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

example for relative IRI in RDF

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


Resource
Description
Framework
7
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

file http://harald.sack.de/foaf.rdf
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
7
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

file http://harald.sack.de/foaf.rdf
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

if there is no @base directive, relative URIs/IRIs will be


complemented by the document‘s own URI/IRI
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
7
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

file http://harald.sack.de/foaf.rdf
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:phone “++49-331-5509-527“ .


<#harald> foaf:weblog <http://semweb2014.blogspot.com/> .

if there is no @base directive, relative URIs/IRIs will be


complemented by the document‘s own URI/IRI
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
8
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

@prefix foaf: <http://xmlns.com/foaf/0.1/> .


@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ ;


foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
8
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

semicolon indicates that subsequent


triples have the same subject
(predicate list)
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ ;


foaf:weblog <http://semweb2014.blogspot.com/> .

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


Resource
Description
Framework
8
Literal

http://xmlns.com/foaf/0.1/phone ++49-331-5509-527

http://harald.sack.de/foaf.rdf#harald
Resource
Resource
http://xmlns.com/foaf/0.1/weblog http://harald.blogspot.com/

semicolon indicates that subsequent


triples have the same subject
(predicate list)
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://harald.sack.de/foaf.rdf> .

<#harald> foaf:phone “++49-331-5509-527“ ;


foaf:weblog <http://semweb2014.blogspot.com/> .

subject of subsequent triples can be left out


Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
9
foaf:weblog http://semweb2014.blogspot.com/

http://harald.sack.de/foaf.rdf#harald foaf:weblog

Resource http://semweb2013.blogspot.com/
foaf:weblog

http://semweb2012.blogspot.com/

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:weblog <http://semweb2014.blogspot.com/> ,


<http://semweb2013.blogspot.com/> ,
<http://semweb2012.blogspot.com/> .
file http://harald.sack.de/foaf.rdf

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


Resource
Description
Framework
9
foaf:weblog http://semweb2014.blogspot.com/

http://harald.sack.de/foaf.rdf#harald foaf:weblog

Resource http://semweb2013.blogspot.com/
foaf:weblog

http://semweb2012.blogspot.com/

comma indicates that subsequent triples


have same subject and property (object list)

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:weblog <http://semweb2014.blogspot.com/> ,


<http://semweb2013.blogspot.com/> ,
<http://semweb2012.blogspot.com/> .
file http://harald.sack.de/foaf.rdf

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


Resource
Description
Framework
9
foaf:weblog http://semweb2014.blogspot.com/

http://harald.sack.de/foaf.rdf#harald foaf:weblog

Resource http://semweb2013.blogspot.com/
foaf:weblog

http://semweb2012.blogspot.com/

comma indicates that subsequent triples


have same subject and property (object list)

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<#harald> foaf:weblog <http://semweb2014.blogspot.com/> ,


<http://semweb2013.blogspot.com/> ,
<http://semweb2012.blogspot.com/> .
file http://harald.sack.de/foaf.rdf

subject and property of subsequent triples are the same


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

http://hpi-web.de/Lecture#name
Knowledge
Engineering

http://hpi-web.de/Spring14#KE

4
http://hpi-web.de/Lecture#hours

• Typed Literals

@prefix lec: <http://hpi-web.de/Lecture#> .

<http://hpi.web.de/Spring14#KE>
lec:name “Knowledge Engineering“^^<http://www.w3c.org/2001/XMLSchema#string> ;
lec:hours “4“^^<http://www.w3c.org/2001/XMLSchema#integer> .

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


Resource
Description
Framework
10

http://hpi-web.de/Lecture#name
Knowledge
Engineering

http://hpi-web.de/Spring14#KE

4
http://hpi-web.de/Lecture#hours

• Typed Literals

@prefix lec: <http://hpi-web.de/Lecture#> .

<http://hpi.web.de/Spring14#KE>
@prefix lv: <http://hpi-web.de/Lecture#> .
lec:name “Knowledge Engineering“^^<http://www.w3c.org/2001/XMLSchema#string> ;
lec:hours “4“^^<http://www.w3c.org/2001/XMLSchema#integer> .
<http://hpi.web.de/Spring14#KE> lec:name “Semantic Web Technologies“ ;
lec:hours 4 .

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


Resource
Description
Framework
11

Multi Valued Relations and Blank Nodes


• Example:
• A lecture takes place twice a week in two different rooms
• How to model this in RDF?

http://hpi-web.de/Lecture#name Knowledge
Engineering

http://hpi-web.de/Spring14#KE

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


Resource
Description
Framework
11

Multi Valued Relations and Blank Nodes


• Example:
• A lecture takes place twice a week in two different rooms
• How to model this in RDF?

http://hpi-web.de/Lecture#name Knowledge
Engineering

http://hpi-web.de/Spring14#KE

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

HS3
http://hpi-web.de/Lecture#date

Tue 13.30-15.00

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


Resource
Description
Framework
11

Multi Valued Relations and Blank Nodes


• Example:
• A lecture takes place twice a week in two different rooms
• How to model this in RDF?

http://hpi-web.de/Lecture#name Knowledge
Engineering

http://hpi-web.de/Spring14#KE

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

HS3
http://hpi-web.de/Lecture#date http://hpi-web.de/Lecture#room

Tue 13.30-15.00 H-E.52

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

Wed 13.30-15.00
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
11

Multi Valued Relations and Blank Nodes


• Example:
• A lecture takes place twice a week in two different rooms
• How to model this in RDF?

http://hpi-web.de/Lecture#name Knowledge
Engineering

http://hpi-web.de/Spring14#KE

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

HS3
http://hpi-web.de/Lecture#date http://hpi-web.de/Lecture#room

Tue 13.30-15.00 H-E.52

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

Wed 13.30-15.00 Problem: unique association


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

Multi Valued Relations and Blank Nodes


• Example:
• A lecture takes place twice a week in two different rooms
• How to model this in RDF?
Knowledge
hpi-lv:name
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

HS3
hpi-lv:takesPlace
hpi-lv:date
hpi-lv:room
Tue 13.30-15.00
H-E.52
hpi-lv:date

Wed 13.30-15.00 @prefix hpi-lv: <http://hpi-web.de/Lecture#>


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

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)

Knowledge
hpi-lv:name
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

HS3

hpi-lv:date

@prefix hpi-lv: <http://hpi-web.de/Lecture#> Tue 13.30-15.00


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

Anonymous Blank Nodes

hpi-lv:room

HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

[ ] hpi-lv:date “Tue 13.30-15.00“;


hpi-lv:room “HS3“ .

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


Resource
Description
Framework
14

Anonymous Blank Nodes

hpi-lv:room

HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

[ ] hpi-lv:date “Tue 13.30-15.00“;


hpi-lv:room “HS3“ .

anonymous blank node

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


Resource
Description
Framework
15

Anonymous Blank Nodes hpi-lv:name


Knowledge
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#>.

<http://hpi-web.de/Spring14#KE> hpi-lv:name "Knowledge Engineering";


hpi-lv:takesPlace [
hpi-lv:date "Tue 13.30-15.00";
hpi-lv:room "HS3" ] .

http://www.easyrdf.org/converter
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
15

Anonymous Blank Nodes hpi-lv:name


Knowledge
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#>.

<http://hpi-web.de/Spring14#KE> hpi-lv:name "Knowledge Engineering";


hpi-lv:takesPlace [
hpi-lv:date "Tue 13.30-15.00";
hpi-lv:room "HS3" ] .

http://www.easyrdf.org/converter nested anonymous blank node


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

Dereferencable Blank Nodes Knowledge


hpi-lv:name
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

ID1 HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#>.

<http://hpi-web.de/Spring14#KE> hpi-lv:name "Knowledge Engineering";


hpi-lv:takesPlace _:ID1 .

_:ID1 hpi-lv:date "Tue 13.30-15.00";


hpi-lv:room "HS3" .

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


http://www.easyrdf.org/converter
Resource
Description
Framework
16

Dereferencable Blank Nodes Knowledge


hpi-lv:name
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

ID1 HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#>.

<http://hpi-web.de/Spring14#KE> hpi-lv:name "Knowledge Engineering";


hpi-lv:takesPlace _:ID1 .

_:ID1 hpi-lv:date "Tue 13.30-15.00";


hpi-lv:room "HS3" . dereferencable blank node

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


http://www.easyrdf.org/converter
Resource
Description
Framework
16

Dereferencable Blank Nodes Knowledge


hpi-lv:name
Engineering

http://hpi-web.de/Spring14#KE
hpi-lv:takesPlace
hpi-lv:room

ID1 HS3

hpi-lv:date

Tue 13.30-15.00

@prefix hpi-lv: <http://hpi-web.de/Lecture#>.

<http://hpi-web.de/Spring14#KE> hpi-lv:name "Knowledge Engineering";


hpi-lv:takesPlace _:ID1 .

_:ID1 hpi-lv:date "Tue 13.30-15.00";


hpi-lv:room "HS3" . dereferencable blank node

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


http://www.easyrdf.org/converter
17

List
s in R
DF

05 How to Represent Facts? - RDF (3)


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
05: How to Represent Simple Facts - RDF - Part 3

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3

List
s in R
DF

05 How to Represent Facts? - RDF (3)


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
4
Framework

More Syntactic
Sugar....
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
5

Lists
• General Data structure to enumerate any resources 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

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


Resource
Description
Framework
6

RDF Container
http://hpi-web.de/Spring14#KE
rdf:_1
http://hpi-web.de/BurgerAnton

hpi-lv:hasParticipants
rdf:_2
http://hpi-web.de/MuellerFranz

rdf:_3
http://hpi-web.de/SchmidtJoseph

rdf:type rdf:_4
http://hpi-web.de/SchulzeEgon

rdf:Seq

@prefix hpi-lv: <http://hpi-web.de/Lecture#> .


@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
7

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:Seq
ordered set of elements,

• rdf:Alt
defines 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


Resource
Description
Framework
8

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/>.

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

http://www.easyrdf.org/converter
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
9
@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

RDF-Collection @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

http://hpi-web.de/Spring14#KE

lv:hasParticipants
rdf:first
http://hpi-web.de/BurgerAnton

rdf:rest rdf:first
http://hpi-web.de/MuellerFranz

rdf:rest rdf:first
http://hpi-web.de/SchmidtJoseph

rdf:rest
rdf:first
http://hpi-web.de/SchulzeEgon

rdf:rest

rdf:nil

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


Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
9
@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

RDF-Collection @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

http://hpi-web.de/Spring14#KE
Head
lv:hasParticipants
rdf:first
http://hpi-web.de/BurgerAnton

rdf:rest rdf:first
http://hpi-web.de/MuellerFranz

rdf:rest rdf:first
http://hpi-web.de/SchmidtJoseph

rdf:rest
rdf:first
http://hpi-web.de/SchulzeEgon

rdf:rest

rdf:nil

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


Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
9
@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

RDF-Collection @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

http://hpi-web.de/Spring14#KE
Head
lv:hasParticipants
rdf:first
http://hpi-web.de/BurgerAnton

rdf:rest rdf:first
http://hpi-web.de/MuellerFranz

rdf:rest rdf:first
http://hpi-web.de/SchmidtJoseph

rdf:rest
rdf:first
http://hpi-web.de/SchulzeEgon

rdf:rest

rdf:nil
Tail
List is splitted recursively in Head (first) and Tail (rest).
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
10
@prefix hpi-lv: <http://hpi-web.de/Lecture#> .

RDF-Collection @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

http://hpi-web.de/Spring14#KE

lv:hasParticipants
rdf:first
http://hpi-web.de/BurgerAnton

rdf:rest rdf:first
http://hpi-web.de/MuellerFranz

rdf:rest rdf:first
http://hpi-web.de/SchmidtJoseph

rdf:rest
rdf:first
http://hpi-web.de/SchulzeEgon

rdf:rest

rdf:nil

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


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

RDF-Collection

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


@prefix lv: <http://hpi-web.de/Lecture#> .
@base <http://hpi-web.de/>.

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

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam http://www.easyrdf.org/converter
Resource
Description
Framework
12

RDF-Collection

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


@prefix lv: <http://hpi-web.de/Lecture#> .
@base <http://hpi-web.de/>.

<Spring14#KE> lv:hasParticipant (<BurgerAnton> <MuellerFranz>


<SchmidtJoseph> <SchulzeEgon>).

Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam http://www.easyrdf.org/converter
13

Rei
fi cat
i on

06 How to Represent Facts? - RDF (4)


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
06: How to Represent Simple Facts - RDF - Part 4

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
3

Rei
fic
RDF a tion
Dat &
a In
teg
rat
ion

06 How to Represent Facts? - RDF (4)


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
4

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
„My dear Watson,
...I suppose that it was the
4 Gardener who has killed
the Butler!“

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
5

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
5

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


exv:Gardener exv:hasKilled exv:Butler .

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
5

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


exv:Gardener exv:hasKilled exv:Butler .

•Part 2: Sherlock Holmes supposes....


exv:SherlockHolmes exv:supposes ???? .

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
6

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

The Gardener has killed the Butler

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
6

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

The Gardener has killed the Butler

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
6

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

The Gardener has killed the Butler


rdf:Statement

rdf:subject rdf:predicate rdf:object


Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
7

RDF-Reification
Sherlock Holmes supposes that the Gardener has killed the Butler

rdf:subject :Gardener
:SherlockHolmes

:supposes :hasKilled
rdf:predicate
:StatementOnGardener :Butler
rdf:object

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


@prefix : <http://example.org/Crimestories#> .

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
8

rdf:subject :Gardener
:SherlockHolmes

:supposes :hasKilled
rdf:predicate
:StatementOnGardener :Butler
rdf:object

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


@prefix : <http://example.org/Crimestories#> .

:SherlockHolmes :supposes :StatementOnGardener .


:StatementOnGardener a rdf:Statement ;
rdf:subject :Gardener ;
rdf:predicate :hasKilled ;
rdf:object :Butler .

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Description
Framework
9

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

• But be careful: Reification causes type conflicts


(classes, individuals, statements)
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Resource
Example
Description
Framework
10

RDF Vocabulary

RDF Container rdf:List rdf:nil rdf:first rdf:rest

RDF Collection rdf:Seq rdf:Bag rdf:Alt rdf:_1 rdf:_2 ...

RDF Reification rdf:Statement rdf:subject rdf:predicate rdf:object

rdf:type rdf:Property rdf:XMLLiteral

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration
11

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration

12

• 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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration

13

• Database export into a set of relations

a:publishername Springer

Heidelberg

a:publisherlocation
a:title
a:publisher WWW

ISBN 0-00-651409-X
a:year
2004
a:author
a:authorname Harald Sack

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

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration

14

Harald Sack

u:name
a:publishername Springer

Heidelberg
u:author
a:publisherlocation
ISBN 0-00-651409-X a:title
a:publisher WWW

ISBN 0-00-651409-X
u:cites a:year
2004
a:author
http://.../paper
a:authorname Harald Sack

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

Very important paper a:authorhomepage

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration

15

Harald Sack

u:name
a:publishername Springer

Heidelberg
u:author
a:publisherlocation
ISBN 0-00-651409-X a:title
a:publisher WWW

ISBN 0-00-651409-X
u:cites a:year
2004
a:author
http://.../paper
a:authorname Harald Sack

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

Very important paper a:authorhomepage

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDF and Data Integration

16

Harald Sack a:publishername Springer


u:name
Heidelberg

a:publisherlocation
u:author
a:publisher WWW
a:title
ISBN 0-00-651409-X
u:cites a:year
2004

http://.../paper
a:authorname
Harald Sack
u:title a:author

http://hpi-web.de/HaraldSack.html
Very important paper
a:authorhomepage

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
07 How to represent more complicated models? - RDFS
Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I

17

SO ... WE NEED A WAY TO


DEFINE RDF SCHEMATA FOR
CLASSES AND RELATIONS ?!

Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
07: How to Represent More Complicated Models - RDFS

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
What about the Meaning?
3

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


What about the Meaning?
3

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


What about the Meaning?
3

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


What about the Meaning?
3

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

exv:isManagedBy

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


What about the Meaning?
3

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

exv:isManagedBy

Where does the intended Meaning come from?


Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
What about the Meaning?
4

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


What about the Meaning?
4

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


What about the Meaning?
4

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

something from the namespace exv:


with the URI Spring14#KE

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


What about the Meaning?
4

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

something from the namespace exv: something from the namespace exv:
with the URI Spring14#KE with the URI HaraldSack

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


What about the Meaning?
4

RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

something from the namespace exv: something from the namespace exv:
with the URI Spring14#KE with the URI HaraldSack

some relationship from namespace exv:


with the URI isManagedBy
between 2 things identified via URIs

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


What about the Meaning?
5

RDF

pfrzls:12345675576132x1 pfrzls:432157x6
pfrzls:ds32x182

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


What about the Meaning?
5

RDF

pfrzls:12345675576132x1 pfrzls:432157x6
pfrzls:ds32x182

Probably we need a little


bit more to make something
out of it....

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


07 How to represent more complicated models? - RDFS
Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I

SO ... WE NEED A WAY TO


DEFINE RDF SCHEMATA FOR
CLASSES AND RELATIONS ?!

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


2. Semantic Web Technologies
Part 1

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


Why RDFSchema...?
8

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


Why RDFSchema...?
8
• An application program can define and use RDF data

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....
• Are all terms known?

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....
• Are all terms known?
• Are all terms correct?

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....
• Are all terms known?
• Are all terms correct?
• Are there (logical) relations among the terms?

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....
• Are all terms known?
• Are all terms correct?
• Are there (logical) relations among the terms?
• We need a language for data definition: RDF Schema

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


Why RDFSchema...?
8
• An application program can define and use RDF data
• ….if the application program knows, which terms and classes to use, as e.g.
• name, title, year, …
• name, blog, phone number…
• author, cites, …

• But.....
• Are all terms known?
• Are all terms correct?
• Are there (logical) relations among the terms?
• We need a language for data definition: RDF Schema
• officially called “RDF Vocabulary Description Language”

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


RDFSchema

• RDFSchema allows:
• Definition of classes
•Class instantiation in RDF via <rdf:type>
• Definition of properties and restrictions
• Definition of hierarchies
•Subclasses and superclasses
•Subproperties and superproperties

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


Vocabulary
10

• Classes
• rdfs:Class
Concept of a class, defines an abstract object and is applied (with rdf:type)
to create instances
• rdf:Property
Base class for properties
• rdfs:Literal
Class for literals
• rdfs:Resource
every entity of an RDF model is instance of this class

• and additionally
rdfs:Datatype, rdf:XMLLiteral, rdfs:Container,
rdfs:ContainerMembershipProperty

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


Example
11
rdfs:Resource
rdfs:subClassOf
rdfs:subClassOf
rdfs:subClassOf

rdfs:Class rdfs:Property
rdfs:Class

rdf:type rdf:type rdf:type


domain
Lecture range
isManagedBy
Staff

RDFS

rdf:type rdf:type
RDF
exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


Vocabulary
12

•Properties
• rdfs:subClassOf
transitive property to define inheritance hierarchies for classes
• rdfs:subPropertyOf
transitive property to define inheritance hierarchies for properties
• rdfs:domain
defines the domain of a property concerning a class
• rdfs:range
defines range of a property concerning a class

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


Example
13
rdfs:Class
rdfs:Property rdfs:Class

rdf:type
rdf:type rdf:type
class
rdfs:domain property class
Course
isManagedBy
rdfs:range Staff
subClassOf subClassOf
subClassOf
class class subClassOf
class class
Seminar Lecture
Prof. SeniorResearcher

RDFS

rdf:type rdf:type
RDF

exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


Language Model

t
t rdfs:Class rdfs:Resource
s

s – subclass relation
t – instance relation

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


Language Model

t
t rdfs:Class rdfs:Resource
s
t s
rdfs:Literal

s – subclass relation
t – instance relation

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


Language Model

t
t rdfs:Class rdfs:Resource
s
t t s s

rdfs:Literal rdf:Property

s – subclass relation
t – instance relation

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


Language Model

t
t rdfs:Class rdfs:Resource
s
t t s s
t
rdfs:Literal rdf:Property rdf:type
t
t
t t rdfs:comment
t

rdfs:range rdfs:domain rdfs:subClassOf

s – subclass relation rdfs:subPropertyOf


t – instance relation

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


RDF(S) Knowledge Base
15
T-Box
Terminologcal Knowledge
Person

subClassOf
rdfs:domain
Course rdfs:range
is managed by
Staff
rdfs:subClassOf rdfs:subClassOf
rdfs:subClassOf
rdfs:subClassOf
Seminar Lecture
Prof. SeniorResearcher

RDFS

A-Box rdf:type RDF


rdf:type
Assertional Knowledge
exv:Spring14#KE exv:HaraldSack
exv:isManagedBy

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


Example
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . Turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix : <http://example.org/>.

:Lecture a rdfs:Class;
rdfs:subClassOf :Course.
:Seminar a rdfs:Class ;
rdfs:subClassOf :Course.

:Person a rdfs:Class .
:Staff a rdfs:Class ;
rdfs:subClassOf :Person .
:SeniorResearcher a rdfs:Class ;
rdfs:subClassOf :Staff .
:Professor a rdfs:Class ;
rdfs:subClassOf :Staff.
:isManagedBy a rdf:Property ;
rdfs:domain :Course ;
rdfs:range :Staff .

<Spring14#KE> a :Lecture .
:HaraldSack a :SeniorResearcher .
<Spring14#KE> :isManagedBy :HaraldSack .
http://www.easyrdf.org/converter
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
RDFS Summary

• RDFSchema defines a data model for the definition of simple


ontologies (knowledge representations).
• Via RDFSchema ontologies RDF statements (facts) can be
expressed

• More than XML:


• (small) ontological agreement about modelling primitives
• Possibility to define own vocabularies

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


08 How much semantics is there in RDF(S)
Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture
Semantic Web Technologies , Dr. 2: Hasso-Plattner-Institut,
Harald Sack, Semantic Web Technologies
Universität PotsdamPart I
Knowledge Engineering
with Semantic Web Technologies
Lecture 2: Semantic Web Technologies
08: How much Semantics is there in RDFS?

Dr. Harald Sack


Hasso-Plattner-Institut for IT Systems Engineering
University of Potsdam
Spring 2014

This file is licensed under the Creative Commons Attribution-NonCommercial 3.0 (CC BY-NC 3.0)
2

Lecture 2: Semantic Web Technologies - Part 1


Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Knowledge Engineering with Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
08 How much Semantics is there in RDF(S)
Open HPI - Course: Knowledge Engineering with Semantic Web Technologies
Lecture 2: Semantic Web Technologies Part I
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
How much knowledge
(semantics) is there in RDF(S)
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdf:type
rdf:type

exv:KnowledgeEngineering
exv:takes Place
exv:hasRoom
exv:hasName
HS3
Knowledge
Engineering exv:hasDate

Tue 13.30-15.00

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


How much knowledge
(semantics) is there in RDF(S)
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdf:type
rdf:type

exv:KnowledgeEngineering
exv:takes Place
exv:hasRoom
exv:hasName
HS3
Knowledge
Engineering exv:hasDate

Tue 13.30-15.00

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


How much knowledge
(semantics) is there in RDF(S)
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdf:type
rdf:type

exv:KnowledgeEngineering
exv:takes Place
exv:hasRoom
exv:hasName
HS3
Knowledge
Engineering exv:hasDate

Tue 13.30-15.00

• The semantics of a term from an RDF(S) ontology is given in


terms of its properties and its values (instances)
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
a n w e
i o n s c
n cl u s ( S ) ?
at C o h R D F
W h e w i t
e d u c
d
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
What conclusions can we
deduce with RDF(S)?
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdfs:domain rdfs:range

exv:KnowledgeEngineering
exv:takes place

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdfs:domain rdfs:range
rdf:type

exv:KnowledgeEngineering
exv:takes place

• Deduction of entity class membership from the domain of


one of its properties

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdfs:domain rdfs:range
rdf:type rdf:type

exv:KnowledgeEngineering
exv:takes place

• Deduction of entity class membership from the range of


one of its properties

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class
exv:Course

rdfs:subClassOf
rdfs:Class rdfs:Class
rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdfs:domain rdfs:range
rdf:type rdf:type

exv:KnowledgeEngineering
exv:takesPlace

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class
exv:Course

rdfs:subClassOf
rdf:type rdfs:Class
rdfs:Class rdfs:Property
exv:Lecture exv:takesPlace exv:Event

rdfs:domain rdfs:range
rdf:type
rdf:type

exv:KnowledgeEngineering
exv:takesPlace

• Deduction of entity superclass membership from


a class hierarchy.

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class rdfs:Class
rdfs:domain rdfs:Property rdfs:range

exv:Person exv:isParent exv:Person

rdfs:subPropertyOf
rdfs:Class rdfs:Class
rdfs:Property

exv:Person exv:isMotherOf exv:Person


rdfs:domain
rdfs:range

rdf:type rdf:type

exv:Alice exv:Bob
exv:isMotherOf

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


What conclusions can we
deduce with RDF(S)?
rdfs:Class
rdfs:Property
exv:Person exv:isParent exv:Person

rdfs:subPropertyOf
rdfs:Property

exv:Person exv:isMotherOf exv:Person


rdfs:Class rdfs:Class
rdf:type
rdf:type

exv:Alice exv:Bob
exv:isMotherOf

exv:Alice exv:Bob
exv:isParentOf

• Deduction of new facts from subproperty relationships


Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
n t fo r
f f ic ie o n?
( S) s u n t a ti
R D F p r e s e
Is g e Re
o w l e d
Kn
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam
n t f o r
u f fic i e n
F ( S) s n t a t i o
Is R D p re s e
g e R e e b ?
o w l e d n t i c W
Kn S e m a
n
Lecture 3.1 iHowt h e
to query RDF(S) ? - SPARQL
Knowledge Engineering with Semantic Web Technologies - Semantic Web Technologies Pt.2
Semantic Web Technologies , Dr. Harald Sack, Hasso-Plattner-Institut, Universität Potsdam

You might also like