35
Resource Resource Description Description Framework Framework Seminar Multimedia Seminar Multimedia Heiko Naumann Heiko Naumann SS 2004 SS 2004

Resource Description Framework

Embed Size (px)

DESCRIPTION

Resource Description Framework. Seminar Multimedia Heiko Naumann SS 2004. Table of content. Semantic Web – Introduction RDF History & Specifications RDF Graphs & N-Triples RDF Serialising (Coding) RDF Schema Example: RDF Vocabulary Practical RDF Summary. Semantic Web [1]. - PowerPoint PPT Presentation

Citation preview

Page 1: Resource Description Framework

Resource Resource Description Description FrameworkFramework

Seminar MultimediaSeminar MultimediaHeiko NaumannHeiko Naumann

SS 2004SS 2004

Page 2: Resource Description Framework

2

Table of contentTable of content

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 3: Resource Description Framework

3

Semantic Web [1]Semantic Web [1]

Tim Berners-Lee :Tim Berners-Lee :

„The Semantic Web will bring „The Semantic Web will bring structure to the meaningful content structure to the meaningful content of Web pages, creating an of Web pages, creating an environment where software environment where software agents roaming from page to page agents roaming from page to page can readily carry out sophisticated can readily carry out sophisticated tasks for users.“tasks for users.“

Page 4: Resource Description Framework

4

Semantic Web [2]Semantic Web [2]

Aims of Semantic Web:Aims of Semantic Web: Additional information about contentAdditional information about content Agents „understand“ contentAgents „understand“ content Standards for uniformed storageStandards for uniformed storage Ability for automatic analysisAbility for automatic analysis Applications exchange data Applications exchange data

automaticallyautomatically Relations and hierarchy displayableRelations and hierarchy displayable

Page 5: Resource Description Framework

5

Semantic Web [3]Semantic Web [3]

RDF in a Semantic Web:RDF in a Semantic Web: RDF as a Tool for the Semantic WebRDF as a Tool for the Semantic Web Older concept than „Semantic Web“Older concept than „Semantic Web“ Universal usage (every possible Universal usage (every possible

resource)resource) Concept, regardless if implementationConcept, regardless if implementation Addition, not substitution of Addition, not substitution of

technologiestechnologies

Page 6: Resource Description Framework

6

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 7: Resource Description Framework

7

RDF HistoryRDF History Based on the work of Ora Lassila and Based on the work of Ora Lassila and

Ralph Swick (Application Data Ralph Swick (Application Data Exchange)Exchange)

1997 first draft1997 first draft ~1998 W3C takes over draft~1998 W3C takes over draft 1999 Model- and Syntax Specification 1999 Model- and Syntax Specification

(W3C)(W3C) 2000 RDF Schema Specification (W3C)2000 RDF Schema Specification (W3C) Splitting of specificationsSplitting of specifications Ongoing Process (Core Groups)Ongoing Process (Core Groups)

Page 8: Resource Description Framework

8

W3C SpezifikationenW3C Spezifikationen

RDF/XML Syntax Specification RDF/XML Syntax Specification RDF Vocabulary Description RDF Vocabulary Description

Language 1.0 (RDF Schema)Language 1.0 (RDF Schema) RDF Concepts and Abstract Syntax RDF Concepts and Abstract Syntax RDF Semantics RDF Semantics RDF Primer (Examples & RDF Primer (Examples &

Explanation)Explanation) RDF Test Cases (Probs & Discussion)RDF Test Cases (Probs & Discussion)

Page 9: Resource Description Framework

9

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 10: Resource Description Framework

10

RDF Konzept [1]RDF Konzept [1]

Information as triple:Information as triple:

<Source> <Property> <Value><Source> <Property> <Value>

In RDF as compound sentence:In RDF as compound sentence:

<Subject> Predicate <Object><Subject> Predicate <Object>

Known as occurs in grammar Known as occurs in grammar (sentence building)(sentence building)

Page 11: Resource Description Framework

11

RDF Konzept [2]RDF Konzept [2]

RDF Graph:RDF Graph: Abstract display (Tree - node)Abstract display (Tree - node) Human readabilityHuman readability Complex graphs possible to displayComplex graphs possible to display Node – arc – NodeNode – arc – Node Regardless of implementationRegardless of implementation

Page 12: Resource Description Framework

12

RDF Konzept [3]RDF Konzept [3]

Serialising: N-TriplesSerialising: N-Triples

Subject Predicate Object .Subject Predicate Object .

<<http://www.beispiel.de/folder/index.htmlhttp://www.beispiel.de/folder/index.html>>

<<http://http://purl.orgpurl.org//dcdc//elementselements/1.1//1.1/creatorcreator>>

„„Hans Mustermann“ .Hans Mustermann“ .

<bbd:index.html> dc:creator „Hans Mustermann“ .<bbd:index.html> dc:creator „Hans Mustermann“ .

Page 13: Resource Description Framework

13

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 14: Resource Description Framework

14

RDF / XML [1]RDF / XML [1]

Typical serialisation in XML-Syntax:Typical serialisation in XML-Syntax:

<?xml version=“1.0“?><?xml version=“1.0“?><rdf:RDF<rdf:RDF

xmlns:rdf=„xmlns:rdf=„httphttp://www.w3.org/1999/02/22-rdf-syntax-ns#://www.w3.org/1999/02/22-rdf-syntax-ns#““xmlns:pstcn=„xmlns:pstcn=„httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//

“>“><rdf:Description rdf:about=“<rdf:Description rdf:about=“httphttp://://www.mydomain.dewww.mydomain.de//

artikelartikel/artikel1.html/artikel1.html“>“><pstcn:author>Heiko Naumann</pstcn:author><pstcn:author>Heiko Naumann</pstcn:author><pstcn:datum>01.09.1999</pstcn:datum><pstcn:datum>01.09.1999</pstcn:datum>

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

Page 15: Resource Description Framework

15

RDF / XML [2]RDF / XML [2]

A resource as a property:A resource as a property:

<?xml version=“1.0“?><?xml version=“1.0“?><rdf:RDF<rdf:RDF

xmlns:rdf=„xmlns:rdf=„httphttp://www.w3.org/1999/02/22-rdf-syntax-ns#://www.w3.org/1999/02/22-rdf-syntax-ns#““xmlns:pstcn=„xmlns:pstcn=„httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//“>“><rdf:Description rdf:about=“<rdf:Description rdf:about=“httphttp://://www.mydomain.dewww.mydomain.de//artikelartikel

/artikel1.html/artikel1.html“>“><pstcn:subpageOf rdf:resource=“<pstcn:subpageOf rdf:resource=“httphttp

://www.mydomain.de/serie1.html://www.mydomain.de/serie1.html“ > “ > </rdf:Description></rdf:Description>

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

<rdf:Description rdf:about=“<rdf:Description rdf:about=“httphttp://www.mydomain.de/serie1.html://www.mydomain.de/serie1.html“>“><pstcn:titel>Eine Serie</pstcn:titel><pstcn:titel>Eine Serie</pstcn:titel>

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

Page 16: Resource Description Framework

16

RDF / XML [3]RDF / XML [3]

Blank nodes with parseType:Blank nodes with parseType:<pstcn:author <pstcn:author parseType=“Literal“parseType=“Literal“>>

<rdf>Heiko Naumann</rdf><rdf>Heiko Naumann</rdf></pstcn:author></pstcn:author>

<pstcn:author <pstcn:author parseType=“Resource“parseType=“Resource“>><pstcn:name>Heiko Naumann</pstcn:name><pstcn:name>Heiko Naumann</pstcn:name>

</pstcn:author></pstcn:author>

Explicit ID for Nodes with Explicit ID for Nodes with rdf:nodeID=„xxx“rdf:nodeID=„xxx“

Page 17: Resource Description Framework

17

RDF / XML [4]RDF / XML [4]

Container: Seq and BagContainer: Seq and Bag<rdf:Description rdf:about=“<rdf:Description rdf:about=“httphttp://www.mydomain.de/artikel1.html://www.mydomain.de/artikel1.html“>“>

<pstcn:menu><pstcn:menu>

<rdf:Seq><rdf:Seq>

<rdf:_1 rdf:resource=“<rdf:_1 rdf:resource=“httphttp://://www.mydomain.dewww.mydomain.de//artikelartikel/sub1.html/sub1.html“ />“ />

<rdf:li rdf:resource=“<rdf:li rdf:resource=“httphttp://://www.mydomain.dewww.mydomain.de//artikelartikel/sub2.html/sub2.html“ />“ />

<rdf:li rdf:resource=“<rdf:li rdf:resource=“httphttp://://www.mydomain.dewww.mydomain.de//artikelartikel/sub3.html/sub3.html“ />“ />

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

</pstcn:menu></pstcn:menu>

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

Page 18: Resource Description Framework

18

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 19: Resource Description Framework

19

RDF Schema [1]RDF Schema [1]

Own vocabulary with SchemaOwn vocabulary with Schema Combination of different SchemasCombination of different Schemas Use with XML Namespaces Use with XML Namespaces

(QNames)(QNames) Derivates of base classes (W3C)Derivates of base classes (W3C) ConsistencyConsistency

Page 20: Resource Description Framework

20

RDF Schema [2]RDF Schema [2]

Base classes of W3C:Base classes of W3C:rdfs:Resourcerdfs:Resourcerdfs:Classrdfs:Classrdfs:Literalrdfs:Literalrdfs:XMLLiteralrdfs:XMLLiteralrdfs:Containerrdfs:Containerrdfs:ContainerMembershipPropertyrdfs:ContainerMembershipPropertyrdfs:Datatyperdfs:Datatype

All classes and properties are derivatesAll classes and properties are derivates

Page 21: Resource Description Framework

21

RDF Schema [3]RDF Schema [3]

Syntax for derivation:Syntax for derivation:<?xml version=“1.0“?><?xml version=“1.0“?><rdf:RDF<rdf:RDF

xmlns:rdf=xmlns:rdf=httphttp://www.w3.org/1999/02/22-rdf-syntax-ns#://www.w3.org/1999/02/22-rdf-syntax-ns#xmlns:rdfs=xmlns:rdfs=httphttp://www.w3.org/2000/01/://www.w3.org/2000/01/rdf-schemardf-schema## xmlns:pstcn=“xmlns:pstcn=“httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//“ >“ >

<rdfs:Class rdf:about=“<rdfs:Class rdf:about=“httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//DiaryEntry“>DiaryEntry“>

<rdfs:subClassOf rdf:resource=“<rdfs:subClassOf rdf:resource=“httphttp://www.w3.org/://www.w3.org/2000/01/rdf-schema#Resource“ />2000/01/rdf-schema#Resource“ /></rdfs:Class></rdfs:Class>

<rdf:Property rdf:about=“<rdf:Property rdf:about=“httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//autor“>autor“><rdfs:domain rdf:resource=“<rdfs:domain rdf:resource=“httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//

DiaryEntry“ />DiaryEntry“ /></rdf:Property></rdf:Property>

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

Comment and xml:lang for readabilityComment and xml:lang for readability

Page 22: Resource Description Framework

22

RDF Schema [4]RDF Schema [4]

Determination of valid values:Determination of valid values:<rdfs:Class rdf:about=“<rdfs:Class rdf:about=“httphttp://://www.mydomain.dewww.mydomain.de//rdfrdf//schemaschema//postconpostcon//

Review“>Review“><rdfs:subClassOf rdf:resource=“http://www.w3.org/2000/01/rdf-<rdfs:subClassOf rdf:resource=“http://www.w3.org/2000/01/rdf-

schema#Resource“ />schema#Resource“ /></rdfs:Class ></rdfs:Class >

<rdf:Property <rdf:Property rdf:about=“http://www.mydomain.de/rdf/schema/postcon/ueber“>rdf:about=“http://www.mydomain.de/rdf/schema/postcon/ueber“>

<rdfs:domain <rdfs:domain rdf:resource=“http://www.mydomain.de/rdf/schema/postcon/Review“ />rdf:resource=“http://www.mydomain.de/rdf/schema/postcon/Review“ />

<rdfs:range<rdfs:range rdf:resource=“http://www.mydomain.de/rdf/schema/postcon/Artikel“ rdf:resource=“http://www.mydomain.de/rdf/schema/postcon/Artikel“ />/>

</rdf:Property></rdf:Property>

Rdfs:range defines valid values all Rdfs:range defines valid values all subclassessubclasses

Rdfs:type for single type values Rdfs:type for single type values

Page 23: Resource Description Framework

23

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 24: Resource Description Framework

24

PostCon [1]PostCon [1]

Page 25: Resource Description Framework

25

PostCon [2]PostCon [2]

404 Error – what´s up ?404 Error – what´s up ? Did that page exist at all ?Did that page exist at all ? Is page moved or deleted ?Is page moved or deleted ? Why moved or deleted ?Why moved or deleted ? Redirection to another source ?Redirection to another source ?

Page 26: Resource Description Framework

26

PostCon [3]PostCon [3]

PostContent-System can provide PostContent-System can provide information:information:

Did or does page exist ?Did or does page exist ? Has it been moved ? Where ?Has it been moved ? Where ? If so, why ?If so, why ? Is content depricated ?Is content depricated ? Is there a substitutional source ?Is there a substitutional source ?

A Schema is requiredA Schema is required

Page 27: Resource Description Framework

27

PostCon [4]PostCon [4]

RDF File for a document:RDF File for a document:rdf_description.doc (.rdf)rdf_description.doc (.rdf)

RDF Schema:RDF Schema:postcon_schema.doc (.rdfs)postcon_schema.doc (.rdfs)

So system can give automatic So system can give automatic information, why 404 Error has information, why 404 Error has occured.occured.(Evtl. further information on the (Evtl. further information on the document)document)

Page 28: Resource Description Framework

28

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 29: Resource Description Framework

29

Practical RDF [1]Practical RDF [1]

Query language for RDF:Query language for RDF: RDQL similar SQLRDQL similar SQL Implementations in APIsImplementations in APIs Supports PHP, Perl, C++, JAVA, ..Supports PHP, Perl, C++, JAVA, ..

SELECT ?dateSELECT ?dateWHEREWHERE(?resource, <rdf:type>, <pstcn:Movement>),(?resource, <rdf:type>, <pstcn:Movement>),(?resource, <pstcn:movementType>, ?value),(?resource, <pstcn:movementType>, ?value),(?resource, <dc:date>, ?date)(?resource, <dc:date>, ?date)AND (?value eq “Add”)AND (?value eq “Add”)USING pstcn FOR http://www.mydomain.de/postcon/schema/,USING pstcn FOR http://www.mydomain.de/postcon/schema/,rdf FOR http:///www.w3.org/1999/02/22-rdf-syntax-ns#,rdf FOR http:///www.w3.org/1999/02/22-rdf-syntax-ns#,dc FOR <http://purl.org/dc/elements/1.1/>dc FOR <http://purl.org/dc/elements/1.1/>

Page 30: Resource Description Framework

30

Practical RDF [2]Practical RDF [2]

Tools to modify and work with RDF:Tools to modify and work with RDF: BrownSauce BrownSauce

(brownsauce.sourceforge.net)(brownsauce.sourceforge.net) FOAF (Friend-of-a-friend) O-MaticFOAF (Friend-of-a-friend) O-Matic Sesame (Java Appl. RDF Repos & Sesame (Java Appl. RDF Repos &

Query)Query) Jena (by HP: Java API Parser & Jena (by HP: Java API Parser &

Toolkit)Toolkit) ARP (Another RDF Parser)ARP (Another RDF Parser)

Page 31: Resource Description Framework

31

Practical RDF [3]Practical RDF [3]

Software using RDF:Software using RDF: Mozilla (embedded, e.g. Bookmarks, History,..)Mozilla (embedded, e.g. Bookmarks, History,..) RDF Gateway (DB & WebServer) based on RDF Gateway (DB & WebServer) based on

RDFRDF Adobe Products:Adobe Products:

Proprietary format „XMP“ based on RDFProprietary format „XMP“ based on RDFEmbedding of RDF into binary dataEmbedding of RDF into binary dataSupports Photoshop 7, Acrobat 5, Illustrator Supports Photoshop 7, Acrobat 5, Illustrator 10..)10..)

Microsoft supports XMP FrameworkMicrosoft supports XMP Framework

Page 32: Resource Description Framework

32

InhaltInhalt

Semantic Web – IntroductionSemantic Web – Introduction RDF History & SpecificationsRDF History & Specifications RDF Graphs & N-TriplesRDF Graphs & N-Triples RDF Serialising (Coding)RDF Serialising (Coding) RDF SchemaRDF Schema Example: RDF Vocabulary Example: RDF Vocabulary Practical RDFPractical RDF SummarySummary

Page 33: Resource Description Framework

33

Fazit [1]Fazit [1]

About RDF:About RDF: Needs increase with the WWWNeeds increase with the WWW Relevant for parts of the web onlyRelevant for parts of the web only RDF/XML notation as a standardRDF/XML notation as a standard Usage für Applications, Agents Usage für Applications, Agents

and Embedded Systems (Portability)and Embedded Systems (Portability) Basic concepts easily understandabelBasic concepts easily understandabel

Page 34: Resource Description Framework

34

Fazit [2]Fazit [2]

About seminar:About seminar: Difficult researchDifficult research Little and redundant information Little and redundant information

foundfound Difficult to present, mainly embedded Difficult to present, mainly embedded

usageusage Very interesting and innovativeVery interesting and innovative Want to work with RDF more in the Want to work with RDF more in the

futurefuture

Page 35: Resource Description Framework

35

The EndThe End

Tim Berners-Lee:Tim Berners-Lee:

„„Though there will still not be a machine Though there will still not be a machine which can guarantee to answer arbitrary which can guarantee to answer arbitrary questions, the power questions, the power [of RDF] to answer real questions which [of RDF] to answer real questions which are the stuff of our daily lives and are the stuff of our daily lives and especially of commerce may be quite especially of commerce may be quite remarkable.“ remarkable.“

((http://www.w3.org/DesignIssues/Semantic.html)http://www.w3.org/DesignIssues/Semantic.html)