Linked Data & Semantic Web Technology The Semantic Web Part 5. Resource Description Framework (2) Dr. Myungjin Lee
Linked Data & Semantic Web Technology Typed Node – the resources described as instances of specific types or classes – being classified into different kinds or categories – by providing a predefined property, rdf:type rdf:type a resource that represents a category or class of things an instance of that category or class 2
Linked Data & Semantic Web Technology Abbreviation for Describing Typed Nodes How to describe abbreviation for typed nodes – the rdf:type property and its value are removed – the rdf:Description element is replaced by an element whose name is the QName corresponding to the value of the removed rdf:type property replaced rdf:type 3
Linked Data & Semantic Web Technology How to Describe Groups a need to describe groups of things – such as, a book was created by several authors to list the students in a course Vocabularies for groups – RDF Containers groups containing the members open list – RDF Collections groups containing only the specified members closed list 4
Linked Data & Semantic Web Technology RDF Containers – to describe groups containing the members Terms – Container a resource that contains things – Member the contained things resources (including blank nodes) or literals Three types of RDf Containers – rdf:Bag – rdf:Seq – rdf:Alt 5
Linked Data & Semantic Web Technology RDF Containers Bag – a resource having type rdf:Bag – a group of resources or literals, possibly including duplicate members – no significance in the order of the members Sequence – a resource having type rdf:Seq – a group of resources or literals, possibly including duplicate members – the order of the members is significant Alternative – a resource having type rdf:Alt – a group of resources or literals that are alternatives (typically for a single value of a property) 6
Linked Data & Semantic Web Technology How to Describe a Resource of Containers to give an rdf:type property whose value is one of the predefined resources rdf:Bag, rdf:Seq, or rdf:Alt to describe each member (item) with the container resource: – in RDF Graph using a container membership property rdf:_n, where n is a decimal integer greater than one – in RDF/XML using the rdf:li property 7
Linked Data & Semantic Web Technology Bag Container Description “Course has the students Amy, Mohamed, Johann, Maria, and Phuong” 8 <rdf:RDF xmlns:rdf=" xmlns:s=" <rdf:RDF xmlns:rdf=" xmlns:s="
Linked Data & Semantic Web Technology Alt Container Description “The source code for X11 may be found at ftp.example.org, ftp1.example.org, or ftp2.example.org” 9 <rdf:RDF xmlns:rdf=" xmlns:s=" <rdf:RDF xmlns:rdf=" xmlns:s="
Linked Data & Semantic Web Technology Seq Container Description “Schedules of Monday” 10 <rdf:RDF xmlns:rdf=" xmlns:s=" Meet with CEO at 10am Luncheon at The Eatery Flight at 3pm <rdf:RDF xmlns:rdf=" xmlns:s=" Meet with CEO at 10am Luncheon at The Eatery Flight at 3pm
Linked Data & Semantic Web Technology RDF Collections A limitation of the containers – no way to close resources such as, "these are all the members of the container“ – no way to exclude the possibility that there is another graph somewhere that describes additional members RDF Collections – for describing groups containing only the specified members – a group of things represented as a list structure in the RDF graph 11
Linked Data & Semantic Web Technology How to Describe a RDF Collection to be constructed using a predefined collection vocabulary – the predefined type rdf:List – the predefined properties rdf:first and rdf:rest – and the predefined resource rdf:nil "The students in course are Amy, Mohamed, and Johann" 12
Linked Data & Semantic Web Technology How to Describe RDF/XML for a Collection rdf:parseType attribute – to indicate that the contents of an element are to be interpreted in a special way rdf:parseType="Collection" attribute – a group of nested elements representing the members of the collection 13 <rdf:RDF xmlns:rdf=" xmlns:s=" <rdf:RDF xmlns:rdf=" xmlns:s="
Linked Data & Semantic Web Technology RDF Reification What is RDF Reifications? – to describe other RDF statements using RDF – such as, to record information about when statements were made, who made them, or other similar information 14 Obama says Northern Ireland requires urgent work.
Linked Data & Semantic Web Technology Reification Quad description of a statement, reification – the type rdf:Statement – the properties rdf:subject, rdf:predicate, and rdf:object “Obama says Northern Ireland requires urgent work.” 15 ex:triple12345 rdf:type rdf:Statement. ex:triple12345 rdf:subject ex:NorthernIreland. ex:triple12345 rdf:predicate ex:require. ex:triple12345 rdf:object ex:UrgentWork. ex:triple12345 rdf:type rdf:Statement. ex:triple12345 rdf:subject ex:NorthernIreland. ex:triple12345 rdf:predicate ex:require. ex:triple12345 rdf:object ex:UrgentWork.
Linked Data & Semantic Web Technology RDF/XML for RDF Reification “Obama says Northern Ireland requires urgent work.” 16 <rdf:RDF xmlns:rdf=" xmlns:ex=" <rdf:RDF xmlns:rdf=" xmlns:ex="
Linked Data & Semantic Web Technology Notes for RDF Reification Why we need RDF Reification? – Modeling Data Provenance – Formalizing Statements about Reliability (Trust) – Definition of Metadata about Statements the conventional use of reification – do not imagine that the vocabulary defines some things that are not actually defined 17
Linked Data & Semantic Web Technology Structured Values rdf:value Property – to describe the main value (if there is one) of a structured value How to add an indication of the unit of measure (kilograms) exproduct:item10245 exterms:weight "2.4"^^xsd:decimal. This is the decimal value of weight property using typed literal. exproduct:item10245 exterms:weight _:weight _:weight10245 rdf:value "2.4"^^xsd:decimal. _:weight10245 exterms:units exunits:kilograms. exproduct:item10245 exterms:weight _:weight _:weight10245 rdf:value "2.4"^^xsd:decimal. _:weight10245 exterms:units exunits:kilograms. 18
Linked Data & Semantic Web Technology RDF/XML for Structured Value rdf:parseType=“Resource” attribute – to indicate that the contents of an element are to be interpreted as the description of a new (blank node) resource, without a nested rdf:Description element 19 exproduct:item10245 exterms:weight _:weight _:weight10245 rdf:value "2.4"^^xsd:decimal. _:weight10245 exterms:units exunits:kilograms. exproduct:item10245 exterms:weight _:weight _:weight10245 rdf:value "2.4"^^xsd:decimal. _:weight10245 exterms:units exunits:kilograms. ]> <rdf:RDF xmlns:rdf=" xmlns:exterms=" 2.4 ]> <rdf:RDF xmlns:rdf=" xmlns:exterms=" 2.4
Linked Data & Semantic Web Technology XML Literal rdf:parseType=“Literal” attribute – to indicate that the contents of the element are to be interpreted as an XML fragment 20 <rdf:RDF xmlns:rdf=" xmlns:dc=" xml:base=" The <br /> Element Considered Harmful. <rdf:RDF xmlns:rdf=" xmlns:dc=" xml:base=" The <br /> Element Considered Harmful.
Linked Data & Semantic Web Technology RDF Serialization N-Triples – RDF Test Cases, W3C Recommendation, 10 February 2004 – a line-based, plain text serialization format for storing and transmitting RDF data Notation 3 (N3) – a shorthand non-XML serialization of RDF models, designed with human- readability in mind – much more compact and readable than XML RDF notation Turtle (Terse RDF Triple Language) – W3C Candidate Recommendation, 19 February 2013 – a format for expressing data in the Resource Description Framework (RDF) data model – a subset of Notation3 (N3) language, and a superset of the minimal N-Triples format RDF/XML – W3C Recommendation, 10 February 2004 – an XML syntax for writing down and exchanging RDF graphs 21
Linked Data & Semantic Web Technology 22 "Tony Benn". "Wikipedia". "Tony Benn". "Wikipedia". <rdf:RDF xmlns:rdf=" xmlns:dc=" Tony Benn Wikipedia <rdf:RDF xmlns:rdf=" xmlns:dc=" Tony Benn dc:. dc:title "Tony Benn"; dc:publisher dc:. dc:title "Tony Benn"; dc:publisher ex:. dc:title "RDF/XML Syntax Specification (Revised)" ; ex:editor [ ex:fullname "Dave Beckett", "Dave R. Beckett"; ex:homePage ex:. dc:title "RDF/XML Syntax Specification (Revised)" ; ex:editor [ ex:fullname "Dave Beckett", "Dave R. Beckett"; ex:homePage ]. N-Triple RDF/XML N3 Turtle
Linked Data & Semantic Web Technology References
Linked Data & Semantic Web Technology 24 Dr. Myungjin Lee Twitter : Facebook : SlideShare :