Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Alexandra I. Cristea RDF.

Similar presentations


Presentation on theme: "Dr. Alexandra I. Cristea RDF."— Presentation transcript:

1 Dr. Alexandra I. Cristea http://www.dcs.warwick.ac.uk/~acristea/ RDF

2 2 RDF Definition The Resource Description Framework (RDF) is a W3C standard for describing resources on the Web. RDF is a framework for describing Web resources, –e.g., title, author, modification date, content, and copyright information of a Web page.

3 3 What (else) is RDF? RDF provides a model for data, and a syntax so that independent parties can exchange and use it RDF is designed to be read and understood by computers RDF is not designed for being displayed to people RDF (can be) written in XML RDF is a part of the W3C's Semantic Web Activity RDF is a W3C Recommendation (so a standard!) http://www.w3.org/RDF/

4 4 RDF Usage Examples Describing properties for shopping items, such as price and availability Describing time schedules for web events Describing information about web pages, such as content, author, created and modified date Describing content and rating for web pictures Describing content for search engines Describing electronic libraries

5 5 RDF is Designed to be Read by Computers RDF was designed to provide a common way to describe information so it can be read and understood by computer applications. RDF descriptions are not designed to be displayed on the web.

6 6 RDF can be Written in XML RDF documents can be written in XML. XML language : RDF/XML. information exchange between –different types of computers –types of operating systems and –application languages.

7 7 RDF and "The Semantic Web" The RDF language is a part of the W3C's Semantic Web Activity. W3C's "Semantic Web Vision" is a future where: –Web information has exact meaning –Web information can be understood and processed by computers –Computers can integrate information from the web

8 8 RDF Statements RDF is built of Statement s known as the –subject, –predicate and –object (of a Statement).

9 9 RDF Statements Subject Predicate Object

10 10 Examples Let's look at some example statements to get a better understanding: –Statement: "The author of http://www.w3schools.com/RDF is Jan Egil Refsnes". –Statement: "The homepage of http://www.w3schools.com/RDF is http://www.w3schools.com".

11 11 Examples – cont. Statement: "The author of http://www.w3schools.com/RDF is Jan Egil Refsnes". –The subject of the statement above is: http://www.w3schools.com/RDF –The predicate is: author –The object is: Jan Egil Refsnes Statement: "The homepage of http://www.w3schools.com/RDF is http://www.w3schools.com". –The subject of the statement above is: http://www.w3schools.com/RDF –The predicate is: homepage –The object is: http://www.w3schools.com

12 12 RDF Statements Subject Predicate author http://www.w3schools.com/RDF Object Jan Egil Refsnes

13 13 RDF Resource, Property, and Property Value RDF identifies things using Web identifiers (URIs), and describes resources with properties and property values. A Resource is anything that can have a URI, –such as "http://www.w3schools.com/RDF" A Property is a Resource that has a name, –such as "author" or "homepage" A Property value is the value of a Property, –such as "Jan Egil Refsnes" or "http://www.w3schools.com" (note that a property value can be another resource)

14 14 RDF Statements Subject Predicate author http://www.w3schools.com/RDF Resource Property Can be another resource !! Object Jan Egil Refsnes Property Value

15 15 Example

16 16 RDF original purpose & the metadata originally created in 1999 as a standard on top of XML, for encoding metadata –literally, data about data. –e.g., who authored a web page, what date a blog entry was published, etc., –secondary info

17 17 So, RDF.. Different world view Triples (instead of pairs) More natural? This is the concept … how to implement it?

18 18 RDF/XML

19 19 Example RDF/XML http://www.w3schools.com Resource Property Jan Egil Refsnes Property value

20 20 RDF/XML Is not the only solution, but the recommended one No one-to-one mapping –RDF doesn’t have ordering –XML does! –Serialization of a graph! –So is this the price to pay? Others: Notation 3 http://www.w3.org/DesignIssues/Notation3.html, Turtle http://www.dajobe.org/2004/01/turtle/ http://www.w3.org/DesignIssues/Notation3.htmlhttp://www.dajobe.org/2004/01/turtle/

21 21 RDF namespace

22 22 Other namespaces

23 23 RDF Online Validator W3C's RDF Validation Service is useful when learning RDF. Here you can experiment with RDF files.W3C's RDF Validation Service The online RDF Validator parses your RDF document, checks your syntax, and generates tabular and graphical views of your RDF document. Sample result: the triple(s): http://www.w3schools.com/rdf/RDFvalidationresult.htm http://www.w3schools.com/rdf/RDFvalidationresult.htm

24 24 The Element is the root element of an RDF document. It defines the XML document to be an RDF document. It also contains a reference to the RDF namespace... Description goes here

25 25 The Element The element identifies a resource with the about attribute. The element contains elements that describe the resource. Bob Dylan USA Columbia 10.90 1985

26 26 A Resource and its Description …...

27 27 Another example TitleArtistCountryCompanyPriceYear Empire BurlesqueBob DylanUSAColumbia10.901985 Hide your heartBonnie TylerUKCBS Records9.901988...

28 28 Bob Dylan USA Columbia 10.90 1985 Bonnie Tyler UK CBS Records 9.90 1988... RDF Declaration

29 29 Properties as Attributes The property elements can also be defined as attributes (instead of elements): Can you identify the triples here? (resource, property, value)

30 30 Properties as Resources The property elements can also be defined as resources:...

31 31 Compare: properties as elements Bob Dylan attributes resources

32 32 RDF Containers RDF containers are used to describe groups of things. e.g, to list the authors of a book or to list the members in a band. The following RDF elements are used to describe such groups:,, and.

33 33 RDF Bag The element is used to describe a list of values that is intended to be unordered. The element may contain duplicate values. John Paul George Ringo

34 34 Student example

35 35 RDF Bag

36 36 The Element The element is used to describe a list of values that is intended to be ordered (For example, in alphabetical order). The element may contain duplicate values. George John Paul Ringo

37 37 The Element The element is used to describe a list of alternative values (the user can select only one of the values). CD Record Tape

38 38 RDF Alt

39 39 The rdf:parseType="Collection" Attribute container cannot be closed. other members are allowed. RDF collections are used to describe group that contains ONLY the specified members. A collection is described by the attribute rdf:parseType="Collection".

40 40 Collection attribute example

41 41 Collection: a graphical representation

42 42 RDF topics (so far) Triple structure –Resources, properties, property values RDF/ XML –RDF namespace –RDF element –RDF description element –RDF resources –Properties as: elements, attributes, resources –Containers: Bag, Sequence, Alternatives –RDF validators (e.g., this one)this one

43 43 RDF Reification Statements about statements –E.g., record info about when statements were made, who made them, etc. ("provenance" information).

44 44 Example example.com could record the fact that: John Smith made the original statement about the tent's weight By: –original statement URIref (exproducts:triple12345), describing it w. reification, then –adding an additional statement that exproducts:triple12345 was written by John Smith (w. URIref for John Smith)

45 45 Example figure: reification original statement John

46 46 RDF Schema and Application Classes RDF describes resources with classes, properties, and values RDF needs to define application- specific classes and properties –with extensions to RDF One such extension is RDF Schema

47 47 RDF Schema (RDFS) does not provide actual application- specific classes and properties. … but framework to describe them Classes ~ OO programming languages. Resources: –instances of classes, or –subclasses of classes.

48 48 RDFS Example The following example demonstrates some of the RDFS facilities: In the example above, the resource "horse" is a subclass of the class "animal".

49 49 Example of class structure

50 50 Multiple inheritance!

51 51 Example Abbreviated Since an RDFS class is an RDF resource we can abbreviate it using rdfs:Class instead of rdf:Description, and drop the rdf:type information

52 52 Original Class declaration <rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base= "http://www.animals.fake/animals#">

53 53 Example Class Abbreviated <rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base= "http://www.animals.fake/animals#">

54 54 Original and abbreviated class So we replace: with

55 55 Classes rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:XMLLiteral rdf:Propertyrdfs:Resourcerdfs:Classrdfs:Literalrdfs:Datatyperdf:XMLLiteralrdf:Property

56 56 Properties rdfs:range rdfs:domain rdf:type rdfs:subClassOf rdfs:subPropertyOf rdfs:label rdfs:commentrdfs:rangerdfs:domainrdf:typerdfs:subClassOfrdfs:subPropertyOfrdfs:labelrdfs:comment

57 57 RDF Conclusion We have learned: –RDF definition –Usage scenarios, basics –Existence of RDFS –Comparison w. XML


Download ppt "Dr. Alexandra I. Cristea RDF."

Similar presentations


Ads by Google