Resource Description Framework ( RDF )

32
Resource Description Resource Description Framework Framework ( RDF ) ( RDF ) Xinxia An Xinxia An

description

Resource Description Framework ( RDF ). Xinxia An. Resource Description Framework ( RDF ). Introduction RDF Syntax Dublin Core. Introduction. What is RDF ?. RDF: Resource Description Framework Is a language designed to describe resources which has its own formal grammar - PowerPoint PPT Presentation

Transcript of Resource Description Framework ( RDF )

Page 1: Resource Description Framework ( RDF )

Resource Description FrameworkResource Description Framework( RDF )( RDF )

Xinxia AnXinxia An

Page 2: Resource Description Framework ( RDF )

Resource Description FrameworkResource Description Framework( RDF )( RDF )

IntroductionIntroduction RDF SyntaxRDF Syntax Dublin CoreDublin Core

Page 3: Resource Description Framework ( RDF )

What is RDF ?What is RDF ?

RDF: Resource Description FrameworkRDF: Resource Description FrameworkIs a language designed to describe resourcesIs a language designed to describe resources which has its own formal grammarwhich has its own formal grammarIs a framework:Is a framework:• tells us how to organize metadatatells us how to organize metadata• does not say what metadata we should havedoes not say what metadata we should haveIs an XML applicationIs an XML applicationIs a W3C recommendationIs a W3C recommendation

IntroductionIntroduction

Page 4: Resource Description Framework ( RDF )

What is Dublin Core ?What is Dublin Core ?

Is a metadata standard Is a metadata standard

Tells us what aspects of a resource

we should describe and what names

to use

IntroductionIntroduction

Page 5: Resource Description Framework ( RDF )

Why need RDF and Dublin Core ?Why need RDF and Dublin Core ?

Provides a foundation for metadata Provides a foundation for metadata processingprocessing

Supports metadata interchanging Supports metadata interchanging

better precision in resource discoverybetter precision in resource discovery

IntroductionIntroduction

Page 6: Resource Description Framework ( RDF )

(Root Element)(Root Element)

A RDF document A RDF document mustmust start with start with <?xml?><?xml?> declarationdeclaration

It also It also mustmust have a root element with a fixed have a root element with a fixed name which is name which is <RDF><RDF>

It It mustmust use the use the RDF namespaceRDF namespace, which is, which is

http://www.w3.org/1999/02/22-rdf-syntax-ns#The prefix for this namespace is usually The prefix for this namespace is usually rdfrdf

RDF SyntaxRDF Syntax

Page 7: Resource Description Framework ( RDF )

Root ElementRoot Element

<?xml version=“1.0”?><?xml version=“1.0”?> <rdf:RDF<rdf:RDF xmlns:rdf=“http://www.w3.org/xmlns:rdf=“http://www.w3.org/ 1999/02/22-rdf-syntax-ns#”>1999/02/22-rdf-syntax-ns#”> . . ( Description ElementsDescription Elements ) . . </rdf:RDF></rdf:RDF>

RDF SyntaxRDF Syntax

Page 8: Resource Description Framework ( RDF )

Description ElementDescription Element

Each resource you want to describe in RDF Each resource you want to describe in RDF document gets its own document gets its own <rdf:Description> <rdf:Description> elementelement

We use We use aboutabout attribute to specify the resource attribute to specify the resource to be describedto be described

RDF SyntaxRDF Syntax

Page 9: Resource Description Framework ( RDF )

Description ElementDescription Element

<?xml version=“1.0”?><?xml version=“1.0”?> <rdf:RDF<rdf:RDF xmlns:rdf=“http://www.w3.org/xmlns:rdf=“http://www.w3.org/ 1999/02/22-rdf-syntax-ns#”>1999/02/22-rdf-syntax-ns#”> <rdf:Description <rdf:Description about=“about=“http://www.nmsu.edu/jobs.htmlhttp://www.nmsu.edu/jobs.html”>”>

………… ( ( Property ElementsProperty Elements ) )

………… </rdf:Description></rdf:Description></rdf:RDF></rdf:RDF>

RDF SyntaxRDF Syntax

Page 10: Resource Description Framework ( RDF )

Description ElementDescription Element

attributes of attributes of <rdf:Description><rdf:Description> element element

• aboutabout

• aboutEachaboutEach

• aboutEachPrefixaboutEachPrefix

• bagIDbagID

• IDID

• typetype

RDF SyntaxRDF Syntax

Page 11: Resource Description Framework ( RDF )

Property ElementProperty Element Each property element describes one property Each property element describes one property or one aspect of the resourceor one aspect of the resource It is up to you to decide how to name the It is up to you to decide how to name the propertiesproperties But it is strongly suggested to use agreed-upon But it is strongly suggested to use agreed-upon sets of termssets of terms The most widely used standard is The most widely used standard is Dublin CoreDublin Core whose namespace is usually given a prefix whose namespace is usually given a prefix dcdc http://www.purl.org/DC/

RDF SyntaxRDF Syntax

Page 12: Resource Description Framework ( RDF )

Property ElementProperty Element

Some forms of property elements1. <PropertyName> Value </PropertyName>

Value = string | Description | Container

e.g.1e.g.1 <dc:Creator> <dc:Creator> John SmithJohn Smith </dc:Creator> </dc:Creator>

e.g.2 <dc:Creator> e.g.2 <dc:Creator>

<rdf:Description about=“Jsmith.html”><rdf:Description about=“Jsmith.html”>

<dc:Language> en </dc:Language><dc:Language> en </dc:Language>

<dc:Date> Feb.18,2002 </dc:Date><dc:Date> Feb.18,2002 </dc:Date>

</rdf:Description></rdf:Description>

</dc:Creator></dc:Creator>

RDF SyntaxRDF Syntax

Page 13: Resource Description Framework ( RDF )

Property ElementProperty Element

Some forms of property elements2. <PropertyName parseType=“Literal”> any well-formed XML (not interpreted by RDF-aware browers) </PropertyName>

e.g.e.g. <dc:Creator parseType=“Literal”> <dc:Creator parseType=“Literal”> <js:Name> John Smith <js:Name> John Smith </js:Name></js:Name> <js:Birth> Jan 01,1900<js:Birth> Jan 01,1900 </js:Birth></js:Birth> </dc:Creator></dc:Creator>

RDF SyntaxRDF Syntax

Page 14: Resource Description Framework ( RDF )

Property ElementProperty Element

Some forms of property elements3. <PropertyName parseType=“Resource”>

property elements

</PropertyName>

e.g.e.g.

<dc:Creator parseType=“Resource”> <dc:Creator parseType=“Resource”>

<js:Name> John Smith<js:Name> John Smith </js:Name></js:Name>

<js:Birth> Jan 01,1900<js:Birth> Jan 01,1900 </js:Birth></js:Birth>

</dc:Creator></dc:Creator>

RDF SyntaxRDF Syntax

Page 15: Resource Description Framework ( RDF )

Property ElementProperty Element

Some forms of property elements4. <PropertyName rdf:resource=URI /> URI = Uniform Resource Identifier

e.g.e.g. <rdf:Description <rdf:Description about=“about=“http://nmsu.edu/jobs.htmlhttp://nmsu.edu/jobs.html”>”> <dc:Creator rdf:Resource=“<dc:Creator rdf:Resource=“smith.htmlsmith.html””/>/>

</rdf:Description></rdf:Description>

RDF SyntaxRDF Syntax

Page 16: Resource Description Framework ( RDF )

RDF Document - RDF Document - ExampleExample

<?xml version=“1.0”?><?xml version=“1.0”?>

<rdf:RDF<rdf:RDF

xmlns:rdf=“http://www.w3.org/xmlns:rdf=“http://www.w3.org/

1999/02/22-rdf-syntax-ns#”1999/02/22-rdf-syntax-ns#”

xmlns:dc=“xmlns:dc=“http://purl.org/DC/”>”>

<rdf:Description <rdf:Description

about=“about=“http://www.nmsu.edu/jobs.htmlhttp://www.nmsu.edu/jobs.html”>”>

<dc:Creator> John Smith </dc:Creator><dc:Creator> John Smith </dc:Creator>

<dc:Date> Feb.18,2002 </dc:Date><dc:Date> Feb.18,2002 </dc:Date>

</rdf:Description></rdf:Description>

</rdf:RDF></rdf:RDF>

RDF SyntaxRDF Syntax

Page 17: Resource Description Framework ( RDF )

Abbreviated RDF SyntaxAbbreviated RDF Syntax

Up to now, we place all the property elements inside the description elements

W3C also provides another way to organize the property elements, which is called abbreviated RDF syntax

Abbreviated RDF syntax allows us convert property elements into attributes of the <rdf:Description> element

RDF SyntaxRDF Syntax

Page 18: Resource Description Framework ( RDF )

Abbreviated RDF SyntaxAbbreviated RDF Syntax

<rdf:/Description about=“jobs.html”> <dc:Creator> John Smith </dc:Creator> <dc:Date> Feb 18, 2002 </dc:Date><rdf:/Description>

is converted into

<rdf:/Description about=“jobs.html” dc:Creator=“ John Smith “ dc:Date=“ Feb 18, 2002 ”><rdf:/Description>

RDF SyntaxRDF Syntax

Page 19: Resource Description Framework ( RDF )

Abbreviated RDF SyntaxAbbreviated RDF Syntax

Abbreviate RDF syntax results in empty description elements

The biggest advantage of this is that

browsers that do not understand RDF, will not mishandle the content of the property elements, if we embed some RDF descriptions in an HTML document

RDF SyntaxRDF Syntax

Page 20: Resource Description Framework ( RDF )

RDF ContainersRDF Containers

A RDF container is a group of propertiesA RDF container is a group of properties

of a resourceof a resource

With RDF containers, we could describe a With RDF containers, we could describe a resource more conveniently and efficientlyresource more conveniently and efficiently

RDF SyntaxRDF Syntax

Page 21: Resource Description Framework ( RDF )

RDF ContainersRDF Containers

Without RDF container, we have to repeat Without RDF container, we have to repeat the property tags likethe property tags like

<rdf:Description about=“<rdf:Description about=“planets.htmlplanets.html”>”>

<dc:Subject> Mercury </dc:Subject><dc:Subject> Mercury </dc:Subject>

<dc:Subject> Venus </dc:Subject><dc:Subject> Venus </dc:Subject>

<dc:Subject> Earth </dc:Subject><dc:Subject> Earth </dc:Subject>

<dc:Subject> Mars </dc:Subject><dc:Subject> Mars </dc:Subject>

</rdf:Description></rdf:Description>

if Mercury, Venus, Earth and Mars are all if Mercury, Venus, Earth and Mars are all subjects of the resource subjects of the resource planets.htmlplanets.html

RDF SyntaxRDF Syntax

Page 22: Resource Description Framework ( RDF )

RDF ContainersRDF Containers

There are three types of RDF containersThere are three types of RDF containers <rdf:Bag><rdf:Bag> a group of multiple,unordered propertiesa group of multiple,unordered properties

<rdf:Seq><rdf:Seq> a group of multiple,ordered propertiesa group of multiple,ordered properties

<rdf:Alt><rdf:Alt> a list of properties giving alternative choices,a list of properties giving alternative choices, only one of all these choices is actually chosenonly one of all these choices is actually chosen

RDF SyntaxRDF Syntax

Page 23: Resource Description Framework ( RDF )

RDF Containers - BagRDF Containers - Bag<rdf:Description about=“planets.html”><rdf:Description about=“planets.html”>

<dc:Creator> John Smith </dc:Creator><dc:Creator> John Smith </dc:Creator>

<dc:Subject> <dc:Subject>

<rdf:Bag><rdf:Bag>

<rdf:li> Mercury </rdf:li><rdf:li> Mercury </rdf:li>

<rdf:li> Venus </rdf:li><rdf:li> Venus </rdf:li>

<rdf:li> Earth </rdf:li><rdf:li> Earth </rdf:li>

<rdf:li> Mars </rdf:li><rdf:li> Mars </rdf:li>

</rdf:Bag> </rdf:Bag>

</dc:Subject></dc:Subject>

</rdf:Description></rdf:Description>

RDF SyntaxRDF Syntax

Page 24: Resource Description Framework ( RDF )

RDF Containers - SeqRDF Containers - Seq<rdf:Description about=“planets.html”><rdf:Description about=“planets.html”>

<dc:Creator> John Smith </dc:Creator><dc:Creator> John Smith </dc:Creator>

<dc:Subject> <dc:Subject>

<rdf:Seq><rdf:Seq>

<rdf:li> Mercury </rdf:li><rdf:li> Mercury </rdf:li>

<rdf:li> Venus </rdf:li><rdf:li> Venus </rdf:li>

<rdf:li> Earth </rdf:li><rdf:li> Earth </rdf:li>

<rdf:li> Mars </rdf:li><rdf:li> Mars </rdf:li>

</rdf:Seq> </rdf:Seq>

</dc:Subject></dc:Subject>

</rdf:Description></rdf:Description>

RDF SyntaxRDF Syntax

Page 25: Resource Description Framework ( RDF )

Why Dublin Core ?Why Dublin Core ? RDF is just a framework under which we

organize our metadata about resourcesIt does not say anything about what properties

or aspects of a resource we should describeWe need some standard property names or

agreed-upon terms to describe resources, otherwise, the metadata is not easy to share or exchange

Dublin Core comes for this reason

Dublin CoreDublin Core

Page 26: Resource Description Framework ( RDF )

What is Dublin Core ?What is Dublin Core ?

Is a metadata standard Is a set of named properties Is a description model Tells us what aspects of a resource

should be described Is the most popular and supported by

most search engines

Dublin CoreDublin Core

Page 27: Resource Description Framework ( RDF )

Dublin Core PropertiesDublin Core Properties

The Dublin Core standard has 15 properties of 3 categories

Content Intellectual Property Instantiation

Dublin CoreDublin Core

Page 28: Resource Description Framework ( RDF )

Content PropertiesContent Properties

• Coverage

• Description

• Type

• Relation

• Source

• Subject

• Title

Dublin CoreDublin Core

Page 29: Resource Description Framework ( RDF )

TypeType Property Property

• text

• image

• sound

• software

• . . .

Dublin CoreDublin Core

Page 30: Resource Description Framework ( RDF )

Intellectual PropertiesIntellectual Properties

• Contributor

• Creator

• Publisher

• Rights

Dublin CoreDublin Core

Page 31: Resource Description Framework ( RDF )

Instantiation PropertiesInstantiation Properties

• Date

• Format

• Identifier

• Language

Dublin CoreDublin Core

Page 32: Resource Description Framework ( RDF )

SummarySummary

RDF is a language about how to write RDF documents

RDF does not specify what properties or aspects of a resource we should describe

Dublin Core provides a standard way to describe resources by giving a set of agreed-upon terms