Upcoming SlideShare
×

# Tutorial for RDF Graphs

2,000 views
1,861 views

Published on

Tutorials for RDF Graphs

Published in: Education
6 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
2,000
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
6
Embeds 0
No embeds

No notes for slide

### Tutorial for RDF Graphs

1. 1. Chapter: 2 (Tutorial) 1 RDF Graphs: Give the RDF/XML, Notation 3, triples for the following sentences and also draw the RDF graph. 1. The lecture is attended by Kishoj, Pradeep, Mohan and Dipendra. RDF/XML: <rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex = "http://example.org/" > <rdf:Description rdf:about="http://example.org/lecture"> <ex:isAttendedBy> <rdf:Bag> <rdf:li rdf:resource = "http://example.org/Kishoj"/> <rdf:li rdf:resource = "http://example.org/Pradeep"/> <rdf:li rdf:resource = "http://example.org/Mohan"/> <rdf:li rdf:resource = "http://example.org/Dipendra"/> </rdf:Bag> </ex:isAttendedBy> </rdf:Description> </rdf:RDF> Notation 3: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix ex: <http://example.org/>. ex:lecture ex:isAttendedBy _:bnode1. _:bnode1 rdf:type rdf:Bag; rdf:_1 ex:Kishoj; rdf:_2 ex:Pradeep; rdf:_3 ex:Mohan; rdf:_4 ex:Dipendra. Triples: _:bnode1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf- syntax-ns#Bag>. _:bnode1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> <http://example.org/Kishoj>. _:bnode1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> <http://example.org/Pradeep>. _:bnode1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> <http://example.org/Mohan>. _:bnode1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> <http://example.org/Dipendra>. <http://example.org/lecture> <http://example.org/isAttendedBy> _:bnode1.
2. 2. Chapter: 2 (Tutorial) 2 2. [RDF-Concept] is studied by Kishoj and Pradeep in order. RDF/XML: <rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex = "http://example.org/" > <rdf:Description rdf:about="http://www.w3.org/TR/rdf-concepts/"> <ex:studiedBy> <rdf:Seq> <rdf:li rdf:resource = "http://example.org/Kishoj"/> <rdf:li rdf:resource = "http://example.org/Pradeep"/> </rdf:Seq> </ex:studiedBy> </rdf:Description> </rdf:RDF> Notation 3: @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix ex: <http://example.org/>. <http://www.w3.org/TR/rdf-concepts/> ex:studiedBy _:bnode1. _:bnode1 rdf:type rdf:Seq; rdf:_1 ex:Kishoj; rdf:_2 ex:Pradeep. Triples: _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf- syntax-ns#Seq>. _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> <http://example.org/Kishoj>. _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> <http://example.org/Pradeep>. <http://www.w3.org/TR/rdf-concepts/> <http://example.org/studiedBy> _:b1.