1 / 20

Resource Description Framework (RDF)

Resource Description Framework (RDF). Lecture # 6 Faculty of Computer Science, IBA. value. resource. property. RDF. Fundamental concept of RDF are Resource Properties Statements. RDF:resource.

garima
Download Presentation

Resource Description Framework (RDF)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Resource Description Framework (RDF) Lecture # 6 Faculty of Computer Science, IBA

  2. value resource property RDF • Fundamental concept of RDF are • Resource • Properties • Statements Quratulain

  3. RDF:resource • We can denote that two entities are the same using therdf:resource attribute. For example <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd="http://www.w3.org/2001/XLMSchema#" xmlns:uni="http://www.mydomain.org/uni-ns"> <rdf:Descriptionrdf:about="CSE661"> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtByrdf:resource=“FAC949"/> </rdf:Description> <rdf:Descriptionrdf:about=“FAC949"> <uni:name>Quratulain</uni:name> <uni:title>Assistant Professor</uni:title> </rdf:Description> Quratulain

  4. Nested Descriptions: Example <rdf:Descriptionrdf:about="CSE661"> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtBy> <rdf:Descriptionrdf:ID=“FAC949"> <uni:name>Sana</uni:name> <uni:title>Associate Professor</uni:title> </rdf:Description> </uni:isTaughtBy> </rdf:Description> • Although a descriptions defined within another description, its scope is global. Quratulain

  5. Rdf:type Element <rdf:Descriptionrdf:ID=“CSE661"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> <rdf:Descriptionrdf:ID=“FAC949"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#lecturer"/> <uni:name>Sana</uni:name> <uni:title>Associate Professor</uni:title> </rdf:Description> Quratulain

  6. Abbreviated Syntax • Simplification rules: • Childless property elements within description elements may be replaced by XML attributes • For description elements with a typing element we can use the name specified in the rdf:type element instead of rdf:Description • These rules create syntactic variations of the same RDF statement • They are equivalent according to the RDF data model, although they have different XML syntax Quratulain

  7. Abbreviated Syntax: Example of rule#1 <rdf:Descriptionrdf:ID="CSE661"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> <rdf:Descriptionrdf:ID="CSE661“ uni:courseName=“Semantic Web"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> Quratulain

  8. Abbreviated Syntax: Example of rule#2 <rdf:Descriptionrdf:ID="CSE661"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> <uni:courserdf:ID="CSE661"uni:courseName=“Semantic Web"> <uni:isTaughtByrdf:resource="#FAC949"/> </uni:course> Quratulain

  9. Syntactic variation of same RDF statement <rdf:Descriptionrdf:ID="CSE661"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:courseName>Semantic Web</uni:courseName> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> <rdf:Descriptionrdf:ID="CSE661“ uni:courseName=“Semantic Web"> <rdf:typerdf:resource="http://www.iba.edu.pk/uni-ns#course"/> <uni:isTaughtByrdf:resource="#FAC949"/> </rdf:Description> <uni:courserdf:ID="CSE661"uni:courseName=“Semantic Web"> <uni:isTaughtByrdf:resource="#FAC949"/> </uni:course> Quratulain

  10. Container Elements • Represents a group of resources or literals E.g., we may wish to talk about the courses given by a particular lecturer • The content of container elements are named rdf:_1, rdf:_2, etc. or alternatively rdf:li Quratulain

  11. Three Types of Container Elements • rdf:Bag an unordered container, allowing multiple occurrences • E.g. members of the faculty board, documents in a folder • rdf:Seq an ordered container, which may contain multiple occurrences • E.g. modules of a course, items on an agenda, an alphabetized list of staff members (order is imposed) • rdf:Alt a set of alternatives • E.g. the document home and mirrors, translations of a document in various languages Quratulain

  12. Example for a Bag <uni:lecturerrdf:ID= "FAC949"uni:name=« Atif" uni:title="Professor"> <uni:coursesTaught> <rdf:Bag> <rdf:_1 rdf:resource="#CSE101"/> <rdf:_2 rdf:resource="#CSE206"/> </rdf:Bag> </uni:coursesTaught> </uni:lecturer> Quratulain

  13. Example for Alternative <uni:courserdf:ID=“CSE206" uni:courseName=“Data Structures"> <uni:lecturer> <rdf:Alt> <rdf:lirdf:resource="#FAC949"/> <rdf:lirdf:resource="#FAC318"/> </rdf:Alt> </uni:lecturer> </uni:course> Quratulain

  14. Rdf:ID Attribute for Container Elements <uni:lecturerrdf:ID= "FAC949"uni:name="Asif"> <uni:coursesTaught> <rdf:Bagrdf:ID="DBcourses"> <rdf:_1 rdf:resource="#CSE101"/> <rdf:_2 rdf:resource="#CSE102"/> </rdf:Bag> </uni:coursesTaught> </uni:lecturer> Quratulain

  15. Question Describe it using container? Referee(X,Y,Z) : X is the referee in a chess game between players Y and Z Quratulain

  16. RDF Collections • A limitation of these containers is that there is no way to close them • “these are all the members of the container” • RDF provides support for describing groups containing only the specified members, in the form of RDF collections • list structure in the RDF graph • constructed using a predefined collection vocabulary: rdf:List,rdf:first,rdf:restand rdf:nil Quratulain

  17. RDF Collections • Shorthand syntax: • "Collection" value for the rdf:parseType attribute: <rdf:Descriptionrdf:about="#CSE101"> <uni:isTaughtByrdf:parseType="Collection"> <rdf:Descriptionrdf:about=“#FAC491"/> <rdf:Descriptionrdf:about="#FAC493"/> <rdf:Descriptionrdf:about="#FAC498"/> </uni:isTaughtBy> </rdf:Description> Quratulain

  18. Reification • In RDF it is possible to make statement about statement such as Ahmed belief that hassan is the creator of the web page http://www.xyz.com How would you do this?try. RDF allow this using reification mechanism. Quratulain

  19. <rdf:Description rdf:about=“#NYT”> <claims> <rdf:Description rdf:about=“#pers05”> <authorOf>ISBN...</authorOf> </rdf:Description> </claims> </rdf:Description> Author-of pers05 ISBN... Reification • Any statement can be an object graphs can be nested - reification claims NYT Quratulain

  20. <rdf:Statementrdf:about=“Statementaboutpers05”> <rdf:subjectrdf:resource=“#pers05”/> <rdf:predicaterdf:resource=“#authorOf”/> <rdf:object>ISBN</rdf:object> </rdf:Statement> <rdf:Descriptionrdf:about=“#NYT”> <claims> <rdf:Descriptionrdf:resource=“#Statementaboutpers05”/> </claims> </rdf:Description> Reification <rdf:Descriptionrdf:about=“#NYT”> <claims> <rdf:Descriptionrdf:about=“#pers05”> <authorOf>ISBN...</authorOf> </rdf:Description> </claims> </rdf:Description> • RDF turns a statement into resource. Quratulain

More Related