of 41 lecture 4: rdf – basics and language
of 41 RDF basic ideas the fundamental concepts of RDF resources properties statements ece 720, winter ‘122
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
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
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
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
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
of 41 RDF basic ideas – statement 1 st view John Smith is the owner of the Web page ( #JohnSmith) ece 720, winter ‘128
of 41 RDF basic ideas – statement 1 st view ( #JohnSmith) (x, P, y) – logical formula P(x, y) also (S, P, O) – Subject-Property-Object ece 720, winter ‘129
of 41 RDF basic ideas – general comment RDF offers only binary predicates (properties) ece 720, winter ‘1210
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 ‘ site-owner
of 41 RDF basic ideas – statement 2 nd view ( #JohnSmith) (#JohnSmith, “ ”) (#JohnSmith, ( “Mike Knot”) ece 720, winter ‘1212
of 41 RDF basic ideas – statement 2 nd view ece 720, winter ‘ site-owner Andrew Rock k/file.cgi site-owner uses phone
of 41 RDF basic ideas – statement 3 rd view <rdf:RDF xmlns:rdf=" xmlns:mydomain=" ece 720, winter ‘1214
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 the solution: to assign a unique identifier to each statement, which can be used to refer to the statement ece 720, winter ‘1215
of 41 RDF basic ideas – data types “ ” – 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
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
of 41 RDF XML-based syntax XML notation for RDF statements ece 720, winter ‘1218
of 41 RDF running example ( ( “Karin Homepage”) ( “ ”) ece 720, winter ‘1219
of 41 RDF running example - graph ece 720, winter ‘ cs#R Karin Homepage thor#R
of 41 RDF running example 1 2 <rdf:RDF 3 xmlns:rdf= 4 xmlns:md=" 5 <rdf:Description 6rdf:about=" 7 <md:creater 8rdf:resource=“ 9 ece 720, winter ‘1221
of 41 RDF running example 10 <rdf:Description 11 rdf:about=" 12 Karin Homepage <rdf:Description 15rdf:about=" ece 720, winter ‘1222
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
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
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
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
of 41 RDF running example – after 1 st modification 1 2 <rdf:RDF 3 xml:base= 4 xmlns:rdf= 5 xmlns:md=" 6 7 <md:creater 8rdf:resource=“ 9 ece 720, winter ‘1227
of 41 RDF running example – after 1 st modification Karin Homepage ece 720, winter ‘1228
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
of 41 RDF running example – after 2 nd modification 1 2 <rdf:RDF xml:base= 3 xmlns:rdf= 4 xmlns:md=" 5 6 <md:creater 7rdf:resource=“ 8 Karin Homepage ece 720, winter ‘1230
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
of 41 RDF running example – after 3 rd modification 1 2 <rdf:RDF xml:base= 3 xmlns:rdf= 4 xmlns:md= <md:creater 8rdf:resource=“ 9 Karin Homepage ece 720, winter ‘1232
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 (vocabulary is in ece 720, winter ‘1233
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
of 41 RDF running example – after 4 th modification 1 2 <rdf:RDF xml:base= 3 xmlns:cs= 4 xmlns:rdf= 5 xmlns:md= 6 7 <md:creater 8rdf:resource=“ 9 Karin Homepage ece 720, winter ‘1235
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
of 41 RDF running example – after 5 th modification 1 2 <rdf:RDF xml:base= 3 xmlns:cs= 4 xmlns:rdf= 5 xmlns:md= 6 7 <md:creater 8rdf:resource=“ 9 Karin Homepage 10 <md:date 11 rdf:datatype=“ ece 720, winter ‘1237
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
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
of 41 RDF XML-based syntax: reification example DocR20301 was created by AuthorR ( Sam says that DocR20301 was created by AuthorR ??? ece 720, winter ‘1240
of 41 RDF XML-based syntax: reification example <rdf:RDF xmlns:rdf=" xmlns:my=" <rdf:type resource=" /> Sam ece 720, winter ‘1241