the semantic web #6 - rdf schema
DESCRIPTION
This is a lecture note #6 for my class of Graduate School of Yonsei University, Korea. It describes RDF Vocabularies: RDF Schema.TRANSCRIPT
Linked Data &Semantic WebTechnology
The Semantic WebPart 6. RDF Vocabularies: RDF Schema
Dr. Myungjin Lee
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.
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
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
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
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
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
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
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
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
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
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
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
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
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>
16Linked Data & Semantic Web Technology
Structure of RDF Vocabularies
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
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.