0% found this document useful (0 votes)
3 views33 pages

3 RDF

The document outlines the concepts of Advanced Web Engineering, focusing on the Resource Description Framework (RDF) and its components such as URIs, knowledge representation, and RDF graphs. It explains how resources are uniquely identified and described through properties and relationships, using examples like Sargodha University and its phone number. Additionally, it discusses the use of blank nodes and RDF containers for representing multi-valued relationships and lists.

Uploaded by

Ali Qasim
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)
3 views33 pages

3 RDF

The document outlines the concepts of Advanced Web Engineering, focusing on the Resource Description Framework (RDF) and its components such as URIs, knowledge representation, and RDF graphs. It explains how resources are uniquely identified and described through properties and relationships, using examples like Sargodha University and its phone number. Additionally, it discusses the use of blank nodes and RDF containers for representing multi-valued relationships and lists.

Uploaded by

Ali Qasim
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

Advance Web Engineering

Resource Document Framework

Spring 2022 1
Advance Web Engineering

RDF Stack

Spring 2022 2
Advance Web Engineering

Representation
& Presentation

Spring 2022 3
Advance Web Engineering

HTTP
Request -
Response

Spring 2022 4
Advance Web Engineering

HTTP
Request -
Response

Spring 2022 5
Advance Web Engineering

Designatu
m
Designat
or

Designator &
Designatum The web page describes
(designates) the Eiffel Tower
The Eiffel Tower is
described (designated) by
the web page

Spring 2022 6
Advance Web Engineering

URI,
Resource, &
Metadata

Spring 2022 7
Advance Web Engineering

Uniform Resource Identifier

• URI combines
• Address (Locator)
• Uniform Resource Locator (URL)
• Denotes where a resource can be found on the web by stating its primary access mechanism.
• Might change during lifecycle.

• Identity (Name)
• Uniform Resource Name
• Persistent identifier for a web resource
• Remains unchanged during a lifecycle.

Spring 2022 8
Advance Web Engineering

URIs in the Semantic Web

• 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

Spring 2022 9
Advance Web Engineering

Knowledge Representation
• How to represent
• “Sargodha University has phone number +92-48-9230811”
<phoneNumber>
<organization name=“Sargodha University”>
<owner>Sargodha University</owner>
<phoneNumber>+92-48-9230811</phoneNumber>
<number>+92-48-9230811</number>
</organization>
</phoneNumber>
<organization name=“Sargodha University” phone=“+92-48-9230811” />

Spring 2022 10
Advance Web Engineering

Knowledge Representation

• How to represent
• “Sargodha University has phone number +92-48-9230811”

• Sargodha University
• has phone number
• +92-48-9230811

Spring 2022 11
Advance Web Engineering

Knowledge Representation
• How to represent
• “Sargodha University has phone number +92-48-9230811”
• Intutive knowledge representation through directed graphs.

Sargodha Has phone number Sargodha


University University

Spring 2022 12
Advance Web Engineering

Knowledge Representation

Spring 2022 13
Advance Web Engineering

Knowledge Representation

Spring 2022 14
Advance Web Engineering

Knowledge Representation

Spring 2022 15
Advance Web Engineering

Resource Description Framework

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

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

Spring 2022 16
Advance Web Engineering

Resource Description Framework

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

Spring 2022 17
Advance Web Engineering

Resource Description Framework

• How to represent
• “Sargodha University has phone number +92-48-9230811”

• Sargodha University Subject


• has phone number Property
• +92-48-9230811 Object

Spring 2022 18
Advance Web Engineering

Resource Description Framework

• Knowledge in RDF is expressed as a list of statements


• all RDF statements follow the same simple schema
• 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

Spring 2022 19
Advance Web Engineering

Constituents of RDF Graph

• URI
• to reference resources uniquely
• Literals
• describe data values that do not have a separate existence
• strings, interpretation via data type

[Link]
“+92-48-9230811”
aUniversity

[Link]

Spring 2022 20
Advance Web Engineering

• Typed literals can be expressed via XML


Schema data types

• Namespace for typed literals:


[Link]
• Example:
Literals “Semantics“^^[Link]
1/XMLSchema#string

• Language Tags denote the (natural)


language of the text:
• Example: “Semantik“@de ,
“Semantics“@en

Spring 2022 21
Advance Web Engineering

Blank Nodes

• Denotes existence of an individual with specific


attributes, but without providing an
identification or reference

Spring 2022 22
Advance Web Engineering

RDF: Node-
Edge-Node

Spring 2022 23
Advance Web Engineering

RDF: N3 Notation

Spring 2022 24
Advance Web Engineering

• 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

Spring 2022 25
Advance Web Engineering

Multi Valued Relations and Blank Nodes

• Example:
• Web Engg lecture takes place twice a week in two different rooms
• How to model this in RDF?
[Link] “Web Engineering”
[Link]

Spring 2022 26
Advance Web Engineering

• Example:
• Web Engg lecture takes place twice a week in two different rooms Multi
• How to model this in RDF?
Valued
[Link] “Web Engineering”
[Link]
Relations
[Link]

[Link]
Room 8
and Blank
“Monday 09:30 AM”
Nodes

Spring 2022 27
Advance Web Engineering

• Example: Multi
• Web Engg lecture takes place twice a week in two different rooms
• How to model this in RDF? Valued
Relations
[Link] “Web Engineering”
[Link]
e
[Link]
m Room 8
[Link]
[Link]
[Link]
m
“Monday 09:30 AM”
Room 7
and Blank
Nodes
“Tuesday 09:30 AM”

Spring 2022 28
Advance Web Engineering

• Example:
• Web Engg lecture takes place twice a week in two different rooms Multi
• How to model this in RDF?
su:CS327
su:hasNam
“Web
Engineering” Valued
su:takesPlac e
e
su:takesPlac
su:hasRoom
Room 8
Relations
e
su:hasRoom
Room 7 su:hasDat
e
and Blank
su:hasDat
e “Tuesday 09:30 AM”
“Monday 09:30 AM”
Nodes

Spring 2022 29
Advance Web Engineering

• Blank Nodes (Bnodes) can be introduced to

Blank Nodes represent multi valued relationships


• Blank Nodes can be introduced for resources
that don‘t need a name (auxiliary nodes)

Spring 2022 30
Advance Web Engineering

• General Data structure to enumerate any


resoures or literals
• Only shortcuts, no additional semantic
expressivity

Lists • Distinguish between


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

Spring 2022 31
Advance Web Engineering

RDF Container
rdf:_1 [Link]

[Link]
rdf:_2 [Link]

su:hasParticipant
s rdf:_3
[Link]

rdf:_4
[Link]
rdf:typ
ose
e
rdf:_5
[Link]
rdf:Seq a

Spring 2022 32
Advance Web Engineering

• the root node of the container is assigned a


container-type via rdf:type
• rdf:Bag
• unordered set of elements,
• there is no given order of elements

RDF Container • rdf:Seq


• ordered set of elements,
• rdf:Alt
• defines alternatives of elements
• only one element of the given
alternatives is relevant for the
application

Spring 2022 33

You might also like