31
RDF (Resource Description Framework) Why?

RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Embed Size (px)

Citation preview

Page 1: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

RDF (Resource Description Framework)

Why?

Page 2: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

XML

• XML is a metalanguage that allows users to define markup

• XML separates content and structure from formatting

• XML is the de facto standard for the representation and exchange of structured information on the Web

• XML is supported by query languages

Page 3: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• There is no intended meaning associated with nesting of tags in XML

• Suppose we want to express the fact– David Billington is the lecturer of Discrete

Mathematics.

<course name="Discrete Mathematics"><lecturer>David Billington</lecturer></course>

<lecturer name="David Billington"><teaches>Discrete Mathematics</teaches></lecturer>

<teachingOffering><lecturer>David Billington</lecturer><course>Discrete Mathematics</course></teachingOffering>

Page 4: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

XML?

• The first two formalizations include essentially an opposite nesting although they represent the same information

Page 5: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• Resources on the Semantic Web need to be able to relate to each other in a meaningful way

• A file about product prices posted by a vendor and a file with product reviews posted independently by a consumer need to have a way of indicating that they are talking about the same products.

Page 6: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

RDF

• RDF is a basic data model, for web objects (“resources”) and relations between them, provides a simple semantics for this data model, and these data models can be represented in an XML syntax

• Its basic building block is an object-attribute-value triple, called a statement

• The RDF data model does not rely on XML, but RDF has an XML-based syntax

Page 7: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

RDF

• RDF is domain-independent, in that no assumptions about a particular domain of use are made

• It is up to the users to define their own terminology in a schema language called RDF Schema (RDFS)

• RDF Schema provides modeling primitives for organizing Web objects into hierarchies

Page 8: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• RDF Schema has a similar relation to RDF as XML Schema has to XML, but in fact this is not at all the case

• XML Schema constrains the structure of XML documents, while RDF Schema defines the vocabulary used in RDF data models

Page 9: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• In RDFS we can define the vocabulary, specify which properties apply to which kinds of objects and what values they can take, and describe the relationships between objects. For example, we can say

• “Lecturer” is a subclass of “academic staff member”

Page 10: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• It is important to understand that there is an intended meaning associated with “is subclass of”.

• It is not up to the application to interpret this term, its intended meaning must be respected by all RDF processing software

• Let us see an example to illustrate the power of RDF schema

Page 11: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• Consider the following XML elements:<academicStaffMember>Grigoris Antoniou</academicStaffMember><professor>Michael Maher</professor><course name="Discrete Mathematics"><isTaughtBy>David Billington</isTaughtBy></course>

Now suppose we want to collect all academic staff members. A path expression in Xpath might be

//academicStaffMember

The result is only Grigoris AntoniouWhile correct from the XML viewpoint, this answer is semantically unsatisfactory

This kind of information makes use of the semantic model of the particular domain, and cannot be represented in XML

Page 12: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• This kind of information makes use of the semantic model of the particular domain, and cannot be represented in XML or in RDF, but is typical of knowledge written in RDF Schema.

• Thus RDFS makes semantic information machine accessible, in accordance to the Semantic Web vision.

Page 13: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

RDF

What ?

Page 14: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• The foundation is breaking knowledge down into a labeled, directed graph. Each edge in the graph represents a fact, or a relation between two things

• The subject is what's at the start of the edge, the predicate is the type of edge (its label), and the object is what's at the end of the edge

• The direction of the arc is significant: it always points toward the object.

Page 15: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Graph Data Model• A fact represented this way has three parts: a subject, a

predicate (i.e., verb), and an object

• A fact is expressed as a Subject-Predicate-Object triple, also known as a statement

• Subjects, predicates, and objects are given as names for entities, also called resources

• Objects can also be given as text values, called literal values

• Any expression in RDF is a collection of triples, each consisting of a subject, a predicate (property that represents relation) and an object

Page 16: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Resources: Subject• We can think of a resource as an object, a

“thing” we want to talk about– E.g. authors, books, publishers, places, people,

hotels• Every resource has a URI, a Universal Resource

Identifier • A URI can be – a URL (Web address) or – some other kind of unique identifier

Page 17: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Resources: Properties• Properties are a special kind of resources• They describe relations between resources– E.g. “written by”, “age”, “title”, etc.

• Properties are also identified by URIs • Advantages of using URIs:– Α global, worldwide, unique naming scheme– Reduces the homonym problem of distributed

data representation

Page 18: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Statements

• Statements assert the properties of resources• A statement is an object-attribute-value triple– It consists of a resource, a property, and a value

• Values can be resources or literals – Literals are atomic values (strings)

Page 19: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• The assertion of an RDF triple says that some relationship, indicated by the predicate, holds between the things denoted by subject and object of the triple

• The assertion of an RDF graph amounts to asserting all the triples in it, so the meaning of an RDF graph is the conjunction (logical AND) of the statements corresponding to all the triples it contains

Page 20: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Three Views of a Statement

• A triple• A piece of a graph• A piece of XML codeThus an RDF document can be viewed as:• A set of triples• A graph (semantic net)• An XML document

Page 21: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Statements as Triples

(“David Billington”, http://www.mydomain.org/site-owner, http://www.cit.gu.edu.au/~db)

• The triple (x,P,y) can be considered as a logical formula P(x,y)– Binary predicate P relates object x to object y – RDF offers only binary predicates (properties)

Page 22: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• A directed graph with labeled nodes and arcs– from the resource (the subject of the statement) – to the value (the object of the statement)

• Known in AI as a semantic net• The value of a statement may be a resource– Ιt may be linked to other resources

Page 23: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

A Set of Triples as a Semantic Net

Page 24: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

• individuals, e.g., Eric Miller, identified by http://www.w3.org/People/EM/contact#me

• kinds of things, e.g., Person, identified by http://www.w3.org/2000/10/swap/pim/contact#Person

• properties of those things, e.g., mailbox, identified by http://www.w3.org/2000/10/swap/pim/contact#mailbox

• values of those properties, e.g. mailto:[email protected] as the value of the mailbox property (RDF also uses character strings such as "Eric Miller", and values from other datatypes such as integers and dates, as the values of properties)

An RDF Graph Describing Eric Miller

Page 25: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

An RDF Graph Describing Eric Miller

Page 26: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Several Statements About the Same Resource

Page 27: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting
Page 28: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

1. <?xml version="1.0"?>2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"3. xmlns:exterms="http://www.example.org/terms/">

4. <rdf:Description rdf:about="http://www.example.org/index.html">5. <exterms:creation-date>August 16, 1999</exterms:creation-date>6. </rdf:Description>

7. </rdf:RDF>

Describing a Web Page's Creation Date

Page 29: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

<?xml version="1.0"?> <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.org/terms/">

<rdf:Description rdf:about="http://www.example.org/index.html"> <exterms:creation-date>August 16, 1999</exterms:creation-date> </rdf:Description>

<rdf:Description rdf:about="http://www.example.org/index.html"> <dc:language>en</dc:language> </rdf:Description>

<rdf:Description rdf:about="http://www.example.org/index.html"> <dc:creator rdf:resource="http://www.example.org/staffid/85740"/> </rdf:Description>

</rdf:RDF>

Several Statements About the Same ResourceGraph is shown on the next slide

Page 30: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

Several Statements About the Same Resource

Page 31: RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting

shows 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/' ".