Presentation is loading. Please wait.

Presentation is loading. Please wait.

Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.

Similar presentations


Presentation on theme: "Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim."— Presentation transcript:

1 Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim

2 Outline  Containers  Collections  Reification 2

3 Containers  RDF Containers –Specifically for handling multiple resources, or for handling multiple literals (properties) –If you want to refer to the collection of items as a singular unit, you would use the Container –E.g., A book created by several authors, a list of students in a course  RDF Container vocabulary –Bags –Sequences –Alternative and some associated properties 3

4 Containers Bag  rdf:Bag –Contains unordered lists of resources or literals –Duplicate data allowed –E.g., inventory of photographs 4 <rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:pstcn=http://burningbird.net/postcon/elements/1.0/> If the container contained literals instead of resources as items : Barite Photo

5 Containers Sequence  rdf:Seq –Contains ordered list of resources or literals  Ordering of the elements is indicated by the ordering of the rdf:_n –Duplicate resources or literals are allowed –E.g., web pages within a menu on the main web page 5 <rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:pstcn=http://burningbird.net/postcon/elements/1.0/>

6 Containers Alternative  rdf:Alt –Provides alternatives for a specific value –Must be at least one item to act as the default value for the resource  The first item being the default if no other is specified  Other than rdf:_1, the order of the remaining elements is not significant.  The user can select only one of the values 6 CD Record Tape

7 Containers Containers as Typed Nodes  Can also specify the numbered elements directly or mix elements 7 <rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:pstcn=http://burningbird.net/postcon/elements/1.0/>

8 Containers Containers Today  rdf:li –used and still documented within the RDF specifications  The numbered properties rdf:_1, rdf:_2, etc. are generated from the li elements in forming the corresponding graph –Its use is discouraged within RDF/XML documents 8 <rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:pstcn=http://burningbird.net/postcon/elements/1.0/>  Valid use of containers

9 Outline  Containers  Collections  Reification 9

10 Collections (1/2)  rdf:parseType=“Collection” –A finite grouping of items, with a given terminator –A collection is a list (rdf:List)  Each node on the list has an associated predicate of type (List) as well as the first value in the list, given by the predicate rdf:first  A relationship between the nodes with rdf:rest  Terminated with a node, whose value is rdf:nil 10 <rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:pstcn=http://burningbird.net/postcon/elements/1.0/>

11 Collections (2/2) 11 http://dynamicearth.com/earthstars/contest.htm http://www.w3.org/1999/02/22-rdf-syntax#nil http://www.w3.org/1999/02/22-rdf-syntax-ns#List http://burningbird.net/articles.htm http://www.w3.org/1999/02/22-rdf-syntax-ns#List http://burningbird.net/dynatech.htm http://www.w3.org/1999/02/22-rdf-syntax-ns#List http://burningbird.net/interact.htm rdf:type rdf:first pstcn:menu rdf:rest

12 Outline  Containers  Collections  Reification 12

13 Reification  Reification –A statement is modeled as a resource referenced by another statement “Jonathon says those cherries are sweet.” “Jonathon says…,” + “Those cherries are sweet.” 13 Jonathon says Those cherries sweet are

14 Reification Reified Statements (1/3)  The bases of reification in RDF –Model the original statement so that it can be referenced as the subject of the newer statement 14 Tutorials and source code about creating hierarchical menus in DHTML  It is missing one thing: an assertion about who is making the recommendation To. Alice I recommend you an useful link. http://www.webreference.com/dhtml/hiermenus is a source containing tutorials and source code about creating hierarchical menus in DHTML. ……

15 Reification Reified Statements (2/3)  An example 15 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/" xml:base="http://burningbird.net/"> Tutorials and source code about creating hierarchical menus in DHTML

16 Reification Reified Statements (3/3)  Subject: contains the identifier for the resource referenced within the statement  Predicate: contains the property that forms the original context of the resource (the property)  Object: contains the value of the property that forms the original context of the resource (the value)  Type: contains the type of the resource 16 http://burningbird.net /person/001 Tutorials and source code about creating hierarchical menus in DHTML http://burningbird.net /#s1 http://www.webreference.com/ dhtml/heirmenus http://burningbird.net/ schema/Contains http://burningbird.net/ schema/Contains http://www.w3.org/1999/02/ 22-rdf-syntax-ns#List http://burningbird.net/postcon/ elements/1.0/recommends http://www.w3.org/1999/ 02/22-rdf-syntax-ns#subject http://www.w3.org/1999/ 02/22-rdf-syntax-ns#predicate http://www.w3.org/1999/ 02/22-rdf-syntax-ns#object http://www.w3.org/1999/ 02/22-rdf-syntax-ns#type

17 Reification The Necessity of Reification and Metastatements (1/2)  Why is reification necessary? –One could model the example in serialized RDF syntax and not lose the information about who recommends the resource  “Shelley Powers recommends…,” is not the actual web resource  Web resource is actually an ancillary component of the recommendation 17 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Tuturials and source code about creating hierarchichal menus in DHTML Shelley Powers

18 Reification The Necessity of Reification and Metastatements (2/2)  By being able to model the statement about the web resource –you can treat it as a property of another statement –You can be able to distinguish without confusion and without ambiguity what “fact” you’re describing in an RDF statement  The importance of the distinction between the thing described and the object making the description is both the key and the confusion of reification 18 recommend The thing described The object making the description

19 Reification A Shorthand Reification Syntax (1/5)  A shorthand technique is particularly helpful in circumstances other than just wanting a cleaner syntax 19 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Tutorials and source code about creating hierarchical menus in DHTML

20 Reification A Shorthand Reification Syntax (2/5)  Recommend what – the web site or the author? –Shelley Power recommends http://www.webreference.com/dhtml/ahiermenus, as a source of tutorials and source code for hierarchical menus created in DHTML –Shelley Power recommends http://www.webreference.com/dhtml/ahiermenus, which is written by Peter Belesis 20 Shelley Power recommends http://www.webreference.com/dhtml/ahiermenus, written by Peter Belesis, as a source of tutorials and source code for hierarchical menus created in DHTML

21 Reification A Shorthand Reification Syntax (3/5) 21 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Tutorials and source code about creating hierarchical menus in DHTML Peter Belesis Shelley Powers Tutorials and source code about creating hierarchical menus in DHTML Peter Belesis

22 Reification A Shorthand Reification Syntax (4/5)  An rdf:Bag acts as a container for all statements about a specific resource –rdf:bagID is used to identify the implicit Bag 22 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Tutorials and source code about creating hierarchical menus in DHTML Peter Belesis

23 Reification A Shorthand Reification Syntax (5/5) 23 http://burningbird.net/ person/001 Tutorials and source code about creating hierarchical menus in DHTML http://unknown.org/ #R01 http://www.webreference.com/ dhtml/heirmenus http://burningbird.net/postcon/ elements/1.0/contains http://burningbird.net/postcon/ elements/1.0/recommends http://www.w3.org/1999/ 02/22-rdf-syntax-ns#subject http://www.w3.org/1999/ 02/22-rdf-syntax-ns#predicate http://www.w3.org/1999/ 02/22-rdf-syntax-ns#object http://www.w3.org/1999/ 02/22-rdf-syntax-ns#type genid:ARP10834 http://www.w3.org/1999/ 02/22-rdf-syntzx-ns#Bag http://www.w3.org/1999/ 02/22-rdf-syntax-ns#type http://www.burningbird.net/ postcon/elements/1.0/author Peter Belesis genid:ARP10833 http://www.w3.org/1999/02/ 22-rdf-syntax-ns#Statement Tutorials and source code about creating hierarchical menus in DHTML http://www.w3.org/1999/ 02/22-rdf-syntax-ns#type http://www.w3.org/1999/ 02/22-rdf-syntax-ns#subject http://www.w3.org/1999/ 02/22-rdf-syntax-ns#predicate http://www.w3.org/1999/ 02/22-rdf-syntax-ns#object http://burningbird.net/postcon/ elements/1.0/contains http://burningbird.net/postcon/ elements/1.0/author http://www.w3.org/1999/ 02/22-rdf-syntax-ns#_2 http://www.w3.org/1999/ 02/22-rdf-syntax-ns#_1


Download ppt "Practical RDF Chapter 4. Specialized RDF Relationships: Reification, Containers, and Collections Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim."

Similar presentations


Ads by Google