Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quratulain Rajput Faculty of Computer Science, IBA Spring2013

Similar presentations


Presentation on theme: "Quratulain Rajput Faculty of Computer Science, IBA Spring2013"— Presentation transcript:

1 Quratulain Rajput Faculty of Computer Science, IBA Spring2013
Semantic Web Quratulain Rajput Faculty of Computer Science, IBA Spring2013

2 RDF To represent web as:
“ the web of real world object rather than only web of documents.” Quratulain Rajput

3 RDF Construction of URI Scheme:[//authority]path[?query][#fragment]
[Note: path and fragment are optional.] Quratulain Rajput

4 RDF <rdf:Description rdf:about=“ <hasAge>40</hasAge> </rdf:Description> <rdf:Description rdf:about=“ <writeBook> <rdf:Description rdf:about=“ book.org/”> </writeBook> Quratulain Rajput

5 XML namespaces and RDF Draw for the following description.
Quratulain Rajput

6 RDF Representation Draw Graphs, are these represent same meaning?
Quratulain Rajput

7 IRI IRI (International Resource Identifier) is extended URI by allowing non-Latin (Chinese, Urdu, Arabic) characters. Quratulain Rajput

8 Shorter URI xmlns can only used with xml tags and with attribute but not as value of attribute (e.g allowed with rdf:about, rdf:resource). Use of Xml:base with rdf:about <xml version=“1.0“ encoding=“utf-8“> <rdf:RDF xmlns:rdf=" xmlns:data=“ xml:base=“ <rdf:Description rdf:about=“#Quratulain“ data:teaches=“Semantic Web“> <data:writesWiki rdf:resource=“ </rdf:Description> </rdf:RDF> Quratulain Rajput

9 Shorter URI Use of xml:base with rdf:ID (used only once)
<xml version=“1.0“ encoding=“utf-8“> <rdf:RDF xmlns:rdf=" xmlns:data=“ xml:base=“ <rdf:Description rdf:ID=“Quratulain“ data:teaches=“Semantic Web“> <data:writesWiki rdf:resource=“ </rdf:Description> </rdf:RDF> Quratulain Rajput

10 Rdf:Datatypes RDF describe data values by means of literals.
E.G string, number etc. Each datatype is uniquely identified by a URI. RDF use the xml-schema for datatype description. <xml version=“1.0“ encoding=“utf-8“> <rdf:RDF xmlns:rdf=" xmlns:course=“ > <rdf:Description rdf:about=“ <course:Name rdf:datatype=“ Semantic Web </course:Name> <course:credit rdf:datatype= “ 3 </course:credit> </rdf:Description></rdf:RDF> Quratulain Rajput

11 <xml version=“1.0“ encoding=“utf-8“>
<rdf:RDF xmlns:rdf=" xmlns:course=“ > <rdf:Description rdf:about=“ <course:Name rdf:datatype=“ Semantic Web </course:Name> <course:credit rdf:datatype= “ 3 </course:credit> </rdf:Description></rdf:RDF> Semantic Web 4 Quratulain Rajput

12 Multiple values Relation
Problem: which height belong to which member. Solution: A node with no unique name is called blank node. It use to aggregate facts in form of list. Asif saad 6.5ft 6 ft Quratulain Rajput

13 Blank Node Blank node cannot be addressed globally with URI. 6 ft saad
6.5ft Asif Quratulain Rajput Quratulain Rajput 13

14 Blank Node <rdf:Description
rdf:about=“ <te:hasMember rdf:parseType=“Resource“/> <te:hasName>Asif</te:hasName> <te:hasHeight>6.5</te:hasHeight> </te:hasMember> </rdf:Description> Quratulain Rajput

15 Blank node with name Blank node can be assign name if needed.
<rdf:Description rdf:about=“ <te:hasMember rdf:nodeID=“M1”/> </rdf:Description> <rdf:Description rdf:nodeID=“M1”> <te:hasName>Asif</te:hasName> <te:hasHeight>6.5</te:hasHeight> </te:hasMember> Quratulain Rajput

16 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

17 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

18 Example for a Bag <uni:lecturer rdf: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

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

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

21 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:rest and rdf:nil Quratulain

22 Reification In RDF it is possible to make statement about statement such as Ahmed belief that Hassan is the creator of the web page How would you do this?try. RDF allow this using reification mechanism. Quratulain

23 Reification Any statement can be an object
graphs can be nested - reification claims pers05 ISBN... Author-of NYT <rdf:Description rdf:about=“#NYT”> <claims> <rdf:Description rdf:about=“#pers05”> <authorOf>ISBN...</authorOf> </rdf:Description> </claims> RDF approved bu FvH  This is reification. Complete triple treated as a object or value. In this case a value. Quratulain

24 Reification RDF turns a statement into resource.
<rdf:Description rdf:about=“#NYT”> <claims> <rdf:Description rdf:about=“#pers05”> <authorOf>ISBN...</authorOf> </rdf:Description> </claims> RDF turns a statement into resource. <rdf:Statement rdf:about=“Statementaboutpers05”> <rdf:subject rdf:resource=“#pers05”/> <rdf:predicate rdf:resource=“#authorOf”/> <rdf:object>ISBN</rdf:object> </rdf:Statement> <rdf:Description rdf:about=“#NYT”> <claims> <rdf:Description rdf:resource=“#Statementaboutpers05”/> </claims> </rdf:Description> Quratulain


Download ppt "Quratulain Rajput Faculty of Computer Science, IBA Spring2013"

Similar presentations


Ads by Google