Download presentation
Presentation is loading. Please wait.
Published byJoseph Miller Modified over 8 years ago
1
Other RDF Capabilities
2
Exercise: Write the following information into a set of statements (triples) and then draw them into and RDF graph The article on giant squids, titled "Architeuthis Dux," at http://burningbird.net/articles/monsters3.htm, written by Shelley Powers, explores the giant's squid's mythological representation as the legendary Kraken as well as describing current efforts to capture images of a live specimen. In addition, the article also provides descriptions of a giant squid's physical characteristics. It is part of a four-part series, described at http://burningbird.net/articles/monsters.htm and entitled "A Tale of Two Monsters."
3
The article is uniquely identified by its URI, http://burningbird.net/articles/monsters3.htm. The article was written by Shelley Powers—predicate is written by, value is Shelley Powers. The article's title is "Architeuthis Dux"—predicate is title, value is Architeuthis Dux. The article is one of a four-part series—predicate is series member, value is http://burningbird.net/articles/monsters.htm. The series is titled "A Tale of Two Monsters"—series predicate is title, value is A Tale of Two Monsters. The article associates the giant squid with the legendary Kraken—predicate is associates, value is Kraken and giant squid. The article provides physical descriptions of the giant squid—predicate is provides, value is physical description of giant squid.
5
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Shelley Powers Architeuthis Dux Physical description of giant squids Tale of the Legendary Kraken A Tale of Two Monsters
6
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"> Shelley Powers Architeuthis Dux <rdf:Description rdf:about= "http://burningbird.net/articles/monsters.htm"> A Tale of Two Monsters Physical description of giant squids Tale of the Legendary Kraken Another representation Nesting one resource description in another shows the connection between the two more clearly
8
RDF Vocabulary A Resource Description Foundation (RDF) vocabulary is a defined set of predicates that can be used in an application XML representation of RDF
9
1. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:exterms="http://www.example.org/terms/"> 4. 5. August 16, 1999 6. 7. Line 1,, is the XML declaration, which indicates that the following content is XML, and what version of XML it is Line 2 begins an rdf:RDF element. This indicates that the following XML content (starting here and ending with the in line 7) is intended to represent RDF. Line 3 specifies another XML namespace declaration, this time for the prefix exterms: Lines 4-6 provide the RDF/XML for the specific statement
10
1. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:dc="http://purl.org/dc/elements/1.1/" 4. xmlns:exterms="http://www.example.org/terms/"> 5. 6. August 16, 1999 7. 8. 9. en 10. 11. RDF/XML for Two Statements
11
Several Statements About the Same Resource 1. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:dc="http://purl.org/dc/elements/1.1/" 4. xmlns:exterms="http://www.example.org/terms/"> 5. 6. August 16, 1999 7. en 8. 9. 10.
12
a graph saying "the document 'http://www.w3.org/TR/rdf- syntax-grammar' has a title 'RDF/XML Syntax Specification (Revised)' and has an editor, the editor has a name 'Dave Beckett' and a home page 'http://purl.org/net/dajobe/' "
13
1. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:dc="http://purl.org/dc/elements/1.1/" 4. xmlns:exterms="http://example.org/stuff/1.0/"> 5. 6. RDF/XML Syntax Specification (Revised) 7. 8. 9. 10. Dave Beckett 11. 12. 13. RDF/XML Describing a Blank Node
14
RDF/XML Using a Typed Literal 1. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:exterms="http://www.example.org/terms/"> 4. 5. <exterms:creation-date rdf:datatype= "http://www.w3.org/2001/XMLSchema#date">1999-08-16 6. 7.
15
RDF/XML for example.com's Catalog 1. 2. ]> 3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 4. xmlns:exterms="http://www.example.com/terms/"> 5. 6. Overnighter 7. 2 8. 2.4 9. 784 10....other product descriptions... 11. An important difference from previous examples is that, in line 5, the rdf:Description element has an rdf:ID attribute instead of an rdf:about attribute
16
1. 2. ]> 3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 4. xmlns:sportex="http://www.exampleRatings.com/terms/"> 5. 6. Richard Roe 7. 5 8. 9. giving the absolute URIref http://www.example.com/2002/04/products#item10245. line 5 uses an rdf:Description element with an rdf:about attribute whose value is the full URIref of the tent. The use of this URIref allows the tent being referred to in the rating to be precisely identified.
17
1. 2. ]> 3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 4. xmlns:exterms="http://www.example.com/terms/" 5. xml:base="http://www.example.com/2002/04/products"> 6. 7. 8. Overnighter 9. 2 10. 2.4 11. 784 12....other product descriptions... 13. the rdf:type property in line 7 indicates that the resource being described is an instance of the class identified by the URIref http://www.example.com/terms/Tent
19
RDF graph describing Joe Smith <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns="http://www.example.org/~joe/contact.rdf#"> <foaf:Person rdf:about= "http://www.example.org/~joe/contact.rdf#joesmith"> <foaf:homepage rdf:resource="http://www.example.org/~joe/"/> Smith Joe The RDF language namespace prefix is usually rdf:
20
RDF vocabulary
21
RDF vocabulary includes… 1.rdf:type - it is a predicate used to state that a resource is an instance of a class 2.rdf:XMLLiteral - the class of typed literals (i.e., of XML literal values) 3.rdf:Property - the class of properties (i.e. binary relations that are used as predicates in triples) 4.rdf:Alt, rdf:Bag, rdf:Seq - containers of alternatives, unordered containers, and ordered containers (see figure with bag for an example) 5.rdf:List - the class of RDF Lists 6.rdf:nil - an instance of rdf:List representing the empty list 7.rdf:Statement, rdf:subject, rdf:predicate, rdf:object - used for reification
22
A Bag (a resource having type rdf:Bag) represents a group of resources or literals, possibly including duplicate members, where there is no significance in the order of the members. For example, a Bag might be used to describe a group of part numbers in which the order of entry or processing of the part numbers does not matter.
23
A Simple Bag Container Description
24
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://example.org/students/vocab#">
25
An Alternative or Alt (a resource having type rdf:Alt) represents a group of resources or literals that are alternatives (typically for a single value of a property). For example, an Alt might be used to describe alternative language translations for the title of a book, or to describe a list of alternative Internet sites at which a resource might be found. An application using a property whose value is an Alt container should be aware that it can choose any one of the members of the group as appropriate.
27
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://example.org/packages/vocab#"> RDF/XML for an Alt Container
28
A Sequence or Seq (a resource having type rdf:Seq) represents a group of resources or literals, possibly including duplicate members, where the order of the members is significant. For example, a Sequence might be used to describe a group that must be maintained in alphabetical order.
29
RDF Collections A limitation of the containers described is that there is no way to close them, i.e., to say "these are all the members of the container“ a container only says that certain identified resources are members; it does not say that other members do not exist. Also, while one graph may describe some of the members, there is no way to exclude the possibility that there is another graph somewhere that describes additional members.
30
RDF Collections RDF provides support for describing groups containing only the specified members, in the form of RDF collections An RDF collection is a group of things represented as a list structure in the RDF graph. This list structure is constructed using a predefined collection vocabulary consisting of the – predefined type rdf:List, – the predefined properties rdf:first and – rdf:rest, and – the predefined resource rdf:nil.
31
The students in course 6.001 are Amy, Mohamed, and Johann
32
RDF Collections
33
RDF Reification RDF reification allows to disassemble a statement (triple) to its parts and to use the whole statement or parts of the statement as a part of other triples The whole triple can then be treated as a resource which allows to make assertions about the statement :john :has :cat [ a rdf:Statement; rdf:subject :john; rdf:predicate :has; rdf:object :cat ] the result is resource that can for example participate as a subject in another triple
34
A Statement, Its Reification
35
]> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:exterms="http://www.example.com/terms/" xml:base="http://www.example.com/2002/04/products"> 2.4 2.4 RDF/XML for the Reification Example
36
Assignment Write a note on triplification of Wikipedia data in the form of dbpedia
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.