Presentation is loading. Please wait.

Presentation is loading. Please wait.

Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter.

Similar presentations


Presentation on theme: "Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter."— Presentation transcript:

1 of 41 lecture 4: rdf – basics and language

2 of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter ‘122

3 of 41 RDF basic ideas – resources  “things” we can/want to talk about  for example – authors, books, publishers, places, people, hotels, rooms, search queries …  anything that has an identity  every resource has a URI ece 720, winter ‘123

4 of 41 RDF basic ideas – resources URI (Uniform Resource Identifier)  a character string that identifies an abstract or physical resource on the Web  it can be a URL (Uniform Resource Locator) or some other kind of unique identifier ece 720, winter ‘124

5 of 41 RDF basic ideas – properties  special kind of resources  they describe relations between resources  for example, written by, age, title, …  also identify by URIs (and in practice by URLs) ece 720, winter ‘125

6 of 41 RDF basic ideas – statements  assert the properties of resources  it is a triple: object-attribute-value  in other words: resource-property-value values can either be resources or literals ece 720, winter ‘126

7 of 41 ece 720, winter ‘127 RDF basic ideas – statements – three views  a triple  a piece of a graph  a piece of XML code thus an RDF document can be viewed as:  a set of triples  a graph (semantic net)  an XML document

8 of 41 RDF basic ideas – statement 1 st view John Smith is the owner of the Web page http://www.ualberta.ca/~js (http://www.ualberta.ca/~js, http://www.mydomain.org/site-owner, #JohnSmith) ece 720, winter ‘128

9 of 41 RDF basic ideas – statement 1 st view (http://www.ualberta.ca/~js, http://www.mydomain.org/site-owner, #JohnSmith) (x, P, y) – logical formula P(x, y) also (S, P, O) – Subject-Property-Object ece 720, winter ‘129

10 of 41 RDF basic ideas – general comment RDF offers only binary predicates (properties) ece 720, winter ‘1210

11 of 41 RDF basic ideas – statement 2 nd view a directed graph with labeled nodes and arcs  from the resource (the subject of the statement)  to the value (the object of the statement) in AI community it is known as a semantic net ece 720, winter ‘1211 www.ualberta.ca/~js#JohnSmith site-owner

12 of 41 RDF basic ideas – statement 2 nd view (http://www.ualberta.ca/~js, http://www.mydomain.org/site-owner, #JohnSmith) (#JohnSmith, http://www.mydomain.org/phone, “7801234567”) (#JohnSmith, http://www.mydomain.org/uses, http://www.ualberta.ca/~mk/file.cgi) (http://www.ualberta.ca/~mk/file.cgi, http://www.mydomain.org/site-owner, “Mike Knot”) ece 720, winter ‘1212

13 of 41 RDF basic ideas – statement 2 nd view ece 720, winter ‘1213 www.ualberta.ca/~js#JohnSmith site-owner Andrew Rock www.ualberta.ca/~m k/file.cgi site-owner 7801234567 uses phone

14 of 41 RDF basic ideas – statement 3 rd view <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mydomain="http://www.mydomain.org/my-rdf-ns"> ece 720, winter ‘1214

15 of 41 RDF basic ideas – reification it is possible to make statements about statements Mike believes that John Smith is the creator of the web page http://www.ualberta.ca/~js the solution: to assign a unique identifier to each statement, which can be used to refer to the statement ece 720, winter ‘1215

16 of 41 RDF basic ideas – data types “7801234567” – integer or string? explicit information is needed to indicate that the literal is intended to represent a number, and which number the literal is supposed to represent – information about data type ece 720, winter ‘1216

17 of 41 RDF critical view only binary relations (to express: X is the referee in a chess game between Y and Z – we need three triples: ref, player1, player2) properties a especial kind of resources statements about statements XML-based syntax of RDF not human-friendly ece 720, winter ‘1217

18 of 41 RDF XML-based syntax XML notation for RDF statements ece 720, winter ‘1218

19 of 41 RDF running example (http://www.cat.ca/docs#R20301, http://www.mydomain.org/creator, http://www.cat.ca/author#R051156) (http://www.cat.ca/docs#R20301, http://www.mydomain.org/title, “Karin Homepage”) (http://www.cat.ca/docs#R20301, http://www.mydomain.org/date, “2012-12-12”) ece 720, winter ‘1219

20 of 41 RDF running example - graph ece 720, winter ‘1220 http://www.cat.ca/do cs#R20301 http://www.mydomain.org/date 2012-12-12Karin Homepage http://www.cat.ca/au thor#R051156 http://www.mydomain.org/title http://www.mydomain.org/creator

21 of 41 RDF running example 1 2 <rdf:RDF 3 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 4 xmlns:md="http://www.mydomain.org/my-rdf-ns"> 5 <rdf:Description 6rdf:about="http://www.cat.ca/docs#R20301"> 7 <md:creater 8rdf:resource=“http://www.cat.ca/author#R051156“/> 9 ece 720, winter ‘1221

22 of 41 RDF running example 10 <rdf:Description 11 rdf:about="http://www.cat.ca/docs#R20301"> 12 Karin Homepage 13 14 <rdf:Description 15rdf:about="http://www.cat.ca/docs#R20301"> 16 2012-12-12 17 18 ece 720, winter ‘1222

23 of 41 RDF XML-based syntax line 3 and line 4: introduction of the rdf and md vocabularies so we can use abbreviated names line 5: rdf:Description – indication of the beginning of a new RDF statement line 6: rdf:about – indication of the subject of the RDF statement, its value is URI ece 720, winter ‘1223

24 of 41 RDF XML-based syntax line 7: md:creator – it is a name from a given vocabulary (here: mydomain), it is a property of the RDF statement line 8: rdf:resource – indication of the object of the RDF statement, its value is URI line 9: indicates that the definition of the RDF statement is completed ece 720, winter ‘1224

25 of 41 RDF XML-based syntax other lines – similar meaning line 12: md:title – it is a name from a given vocabulary (here: mydomain), it is a property of the RDF statement; this line contains the value “Karin Homepage” which the object ece 720, winter ‘1225

26 of 41 RDF XML-based syntax: first modification usage of relative URIs as a values of rdf:about or rdf:resource done with xml:base ece 720, winter ‘1226

27 of 41 RDF running example – after 1 st modification 1 2 <rdf:RDF 3 xml:base=http://www.cat.ca/docs” 4 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 5 xmlns:md="http://www.mydomain.org/my-rdf-ns"> 6 7 <md:creater 8rdf:resource=“http://www.cat.ca/author#R051156“/> 9 ece 720, winter ‘1227

28 of 41 RDF running example – after 1 st modification 10 11 Karin Homepage 12 13 14 2012-12-12 15 16 ece 720, winter ‘1228

29 of 41 RDF XML-based syntax: second modification rdf:ID that can be used as attribute of rdf:Description instead of rdf:about plus property elements can be nested within an rdf:Descirption element indicating that the properties apply to the same resource ece 720, winter ‘1229

30 of 41 RDF running example – after 2 nd modification 1 2 <rdf:RDF xml:base=http://www.cat.ca/docs” 3 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 4 xmlns:md="http://www.mydomain.org/my-rdf-ns"> 5 6 <md:creater 7rdf:resource=“http://www.cat.ca/author#R051156“/> 8 Karin Homepage 9 2012-12-12 10 11 ece 720, winter ‘1230

31 of 41 RDF XML-based syntax: third modification rdf:type the statement (S, rdf:type, O) indicates that resource O represents a category or a class of resources, of which resource S is an instance such resources are called typed node elements ece 720, winter ‘1231

32 of 41 RDF running example – after 3 rd modification 1 2 <rdf:RDF xml:base=http://www.cat.ca/docs” 3 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 4 xmlns:md=http://www.mydomain.org/my-rdf-ns> 5 6 7 <md:creater 8rdf:resource=“http://www.cat.ca/author#R051156“/> 9 Karin Homepage 10 2012-12-12 11 12 ece 720, winter ‘1232

33 of 41 RDF running example – after 3 rd modification line 6: rdf:type – indication that Karin’s homepage is a personal document, which is represented as the name http://www.cat.com/schema/PersonalDoc (vocabulary is in www.cat.com/schema) ece 720, winter ‘1233

34 of 41 RDF XML-based syntax: forth modification rdf:type can be removed and the rdf:Description can be replaced by an element whose name is the name corresponding to the value of the removed rdf:type property ece 720, winter ‘1234

35 of 41 RDF running example – after 4 th modification 1 2 <rdf:RDF xml:base=http://www.cat.ca/docs” 3 xmlns:cs=http://www.cat.ca/schema” 4 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 5 xmlns:md=http://www.mydomain.org/my-rdf-ns> 6 7 <md:creater 8rdf:resource=“http://www.cat.ca/author#R051156“/> 9 Karin Homepage 10 2012-12-12 11 12 ece 720, winter ‘1235

36 of 41 RDF XML-based syntax: fifth modification rdf:datatype is an attribute of a property element and assumes as value an XML Schema datatype ece 720, winter ‘1236

37 of 41 RDF running example – after 5 th modification 1 2 <rdf:RDF xml:base=http://www.cat.ca/docs” 3 xmlns:cs=http://www.cat.ca/schema” 4 xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#” 5 xmlns:md=http://www.mydomain.org/my-rdf-ns> 6 7 <md:creater 8rdf:resource=“http://www.cat.ca/author#R051156“/> 9 Karin Homepage 10 <md:date 11 rdf:datatype=“http://www.w3.org/2001/XMLSchema#date”> 12 2012-12-12 13 14 15 ece 720, winter ‘1237

38 of 41 RDF XML-based syntax: reification to address needs of representing information about RDF statements themselves a description of a statement using RDF built-in vocabulary is called a reification of the statements ece 720, winter ‘1238

39 of 41 RDF XML-based syntax: reification rdf:Statement is a type, and there are the properties rdf:subject, rdf:predicate, and rdf:object ece 720, winter ‘1239

40 of 41 RDF XML-based syntax: reification example DocR20301 was created by AuthorR051156 (http://www.cat.ca/docs#R20301, http://www.mydomain.org/creator, http://www.cat.ca/author#R051156) Sam says that DocR20301 was created by AuthorR051156 ??? ece 720, winter ‘1240

41 of 41 RDF XML-based syntax: reification example <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:my="http://www.mydomain.org/schema/"> http://www.cat.ca/author#R051156 <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" /> Sam ece 720, winter ‘1241


Download ppt "Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter."

Similar presentations


Ads by Google