the semantic web #6 - rdf schema

18
Linked Data & Semantic Web Technology The Semantic Web Part 6. RDF Vocabularies: RDF Schema Dr. Myungjin Lee

Upload: myungjin-lee

Post on 08-May-2015

745 views

Category:

Technology


0 download

DESCRIPTION

This is a lecture note #6 for my class of Graduate School of Yonsei University, Korea. It describes RDF Vocabularies: RDF Schema.

TRANSCRIPT

Page 1: The Semantic Web #6 - RDF Schema

Linked Data &Semantic WebTechnology

The Semantic WebPart 6. RDF Vocabularies: RDF Schema

Dr. Myungjin Lee

Page 2: The Semantic Web #6 - RDF Schema

2Linked Data & Semantic Web Technology

Ability to Define the Vocabularies

<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://example.org/person/vocab#">

<rdf:Description rdf:about="http://example.org/person/mjlee"> <s:name>Myungjin Lee</s:name> </rdf:Description>

<rdf:Description rdf:about="http://example.org/person/john"> <s:name>John Mayer</s:name> </rdf:Description>

<rdf:Description rdf:about="http://example.org/person/berners-lee"> <s:name>Tim Berners-Lee</s:name> </rdf:Description>

</rdf:RDF>

These resources are person.

This is a property, and it indicates person’s name.

Page 3: The Semantic Web #6 - RDF Schema

3Linked Data & Semantic Web Technology

RDF Vocabularies: RDF Schema

• RDF Schema– a set of classes with certain properties using the RDF extensible knowl-

edge representation language– providing basic elements for the description of ontologies

• The resources in the RDF Schema vocabulary have URIrefs with the prefix http://www.w3.org/2000/01/rdf-schema# (conventionally asso-ciated with the QName prefix rdfs:).

– W3C Recommendation 10 February 2004

• RDF Schema allows:– definition of classes and class instantiation– definition of properties and simple restrictions– definition of hierarchies of classes and properties

Page 4: The Semantic Web #6 - RDF Schema

4Linked Data & Semantic Web Technology

Describing Classes

• Class– "kinds of things“, the generic concept of a Type or Category

• Vocabularies for describing classes– rdfs:Class

• the class of resources

– rdfs:Resource• all things described by RDF are called resources, and are instances of the

class rdfs:Resource.

– rdf:type• to state that a resource is an instance of a class

– rdfs:subClassOf• to state that all the instances of one class are instances of another

Page 5: The Semantic Web #6 - RDF Schema

5Linked Data & Semantic Web Technology

A Vehicle Class Hierarchy

rdfs:Class

ex:MotorVehicle

rdf:type

ex:PassengerVehicle

ex:Van

ex:Truck

ex:MiniVan

rdfs:subClassOfexthings:companyCar

rdfs:Resource

Page 6: The Semantic Web #6 - RDF Schema

6Linked Data & Semantic Web Technology

A Vehicle Class Hierarchy

rdfs:Class

ex:MotorVehicle

rdf:type

ex:PassengerVehicle

ex:Van

ex:Truck

ex:MiniVan

rdfs:subClassOf

inferred triple

exthings:companyCar

rdf:type

rdfs:subClassOf

rdfs:Resource

Page 7: The Semantic Web #6 - RDF Schema

7Linked Data & Semantic Web Technology

ex:MotorVehicle rdf:type rdfs:Class .ex:PassengerVehicle rdf:type rdfs:Class .ex:Van rdf:type rdfs:Class .ex:Truck rdf:type rdfs:Class .ex:MiniVan rdf:type rdfs:Class .

ex:PassengerVehicle rdfs:subClassOf ex:MotorVehicle .ex:Van rdfs:subClassOf ex:MotorVehicle .ex:Truck rdfs:subClassOf ex:MotorVehicle .

ex:MiniVan rdfs:subClassOf ex:Van .ex:MiniVan rdfs:subClassOf ex:PassengerVehicle .

<?xml version="1.0"?><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://example.org/schemas/vehicles">

<rdfs:Class rdf:ID="MotorVehicle"/>

<rdfs:Class rdf:ID="PassengerVehicle"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdfs:Class>

<rdfs:Class rdf:ID="Truck"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdfs:Class>

<rdfs:Class rdf:ID="Van"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdfs:Class>

<rdfs:Class rdf:ID="MiniVan"> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/></rdfs:Class>

</rdf:RDF>

rdfs:Class

ex:MotorVehicle

ex:PassengerVehicle

ex:Van

ex:Truckex:MiniVan

Page 8: The Semantic Web #6 - RDF Schema

8Linked Data & Semantic Web Technology

Describing Properties

• Vocabularies for describing properties– rdf:Property

• the class of RDF properties

– rdfs:subPropertyOf• to state that all resources related by one property are also related by an-

other

– rdfs:domain• to state that any resource that has a given property is an instance of one or

more classes

– rdfs:range• to state that the values of a property are instances of one or more classes

Page 9: The Semantic Web #6 - RDF Schema

9Linked Data & Semantic Web Technology

Properties of Vehicle Schema

ex:registeredTo

ex:MotorVehicle

ex:Person

ex:rearSeatLegRoom ex:PassengerVehiclexsd:integer

ex:driver

ex:primaryDriver

rdf:Property

rdf:type

rdfs:range

rdfs:domain

rdfs:subPropertyOf

rdfs:subClassOf

rdfs:Datatype

rdfs:Class

Page 10: The Semantic Web #6 - RDF Schema

10Linked Data & Semantic Web Technology

Properties of Vehicle Schema

ex:registeredTo

ex:MotorVehicle

ex:Person

ex:rearSeatLegRoom ex:PassengerVehiclexsd:integer

ex:driver

ex:primaryDriver

rdf:Property

rdf:type

rdfs:range

rdfs:domain

rdfs:subPropertyOf

rdfs:subClassOf

infered triple

rdfs:domain

rdfs:domainrdfs:Datatype

rdfs:Class

Page 11: The Semantic Web #6 - RDF Schema

11Linked Data & Semantic Web Technology

An Instance of Vehicle Schema

exthings:johnSmithsCarexthings:staff85740 exhings:JohnSmithex:registeredTo ex:primaryDriver

ex:registeredTo

ex:MotorVehicle

ex:Person

ex:PassengerVehicle

ex:driver

ex:primaryDriver

rdf:Property

rdf:type

rdfs:range

rdfs:domain

rdfs:subPropertyOf

rdfs:subClassOf

infered triple

Page 12: The Semantic Web #6 - RDF Schema

12Linked Data & Semantic Web Technology

An Instance of Vehicle Schema

exthings:johnSmithsCarexthings:staff85740 exhings:JohnSmithex:registeredTo ex:primaryDriver

ex:registeredTo

ex:MotorVehicle

ex:Person

ex:PassengerVehicle

ex:driver

ex:primaryDriver

rdf:Property

rdf:typerdf:type

rdf:type

rdfs:range

rdfs:domain

rdfs:subPropertyOf

rdfs:subClassOf

infered triple

ex:driver

Page 13: The Semantic Web #6 - RDF Schema

13Linked Data & Semantic Web Technology

TBox and ABox

• TBox– "terminological component"– a conceptualization associated with a set of facts

• ABox– "assertion component"– a fact associated with a terminological vocabulary within a knowledge

base

Page 14: The Semantic Web #6 - RDF Schema

14Linked Data & Semantic Web Technology

TBox and ABox

exthings:johnSmithsCarexthings:staff85740 exhings:JohnSmithex:registeredTo ex:primaryDriver

ex:registeredTo

ex:MotorVehicle

ex:Person

ex:PassengerVehicle

ex:driver

ex:primaryDriver

rdf:Property

rdf:typerdf:type

rdf:type

rdfs:range

rdfs:domain

rdfs:subPropertyOf

rdfs:subClassOf

infered triple

ex:driver

TBox

ABox

Page 15: The Semantic Web #6 - RDF Schema

15Linked Data & Semantic Web Technology

Other Vocabularies

• rdfs:label– to provide a human-readable version of a resource's name

• rdfs:comment– to provide a human-readable description of a resource

• rdfs:seeAlso– to indicate a resource that might provide additional information about the subject resource

• rdfs:isDefinedBy– to indicate a resource defining the subject resource<?xml version="1.0"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:kdc="http://data.kdata.kr/class/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<kdc:StateDesignatedHeritage rdf:about="http://data.kdata.kr/resource/Namdaemun"> <rdfs:label xml:lang="ko"> 남대문 </rdfs:label> <rdfs:label xml:lang="en">Namdaemun</rdfs:label> <rdfs:seeAlso rdf:resource="http://dbpedia.org/resource/Namdaemun"/> <rdfs:comment> 국보 1 호 </rdfs:comment> </kdc:StateDesignatedHeritage>

</rdf:RDF>

Page 16: The Semantic Web #6 - RDF Schema

16Linked Data & Semantic Web Technology

Structure of RDF Vocabularies

Page 17: The Semantic Web #6 - RDF Schema

17Linked Data & Semantic Web Technology

References• http://www.w3.org/TR/2004/REC-rdf-primer-20040210/• http://www.w3.org/TR/rdf-schema/• http://www.slideshare.net/lysander07/openhpi-22• http://seijikoide.files.wordpress.com/2011/10/rdfs_entities.jpg

Page 18: The Semantic Web #6 - RDF Schema

18Linked Data & Semantic Web Technology

18

Dr. Myungjin Lee

e-Mail : [email protected] : http://twitter.com/MyungjinLee

Facebook : http://www.facebook.com/mjinlee

SlideShare : http://www.slideshare.net/onlyjiny/

Thanks foryour attention.