Swt - Lecture 9& 10[rdfschema]

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Swt - Lecture 9& 10[rdfschema] as PDF for free.

More details

  • Words: 2,207
  • Pages: 47
SEMANTIC WEB TECHNOLOGIES Instructor Lecture Date

: Amna Basharat Haider : 9&10 : 10th February, 2009

RDF SCHEMA

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

Basic Ideas of RDF Schema •

RDF is a universal language that lets users describe resources in their own vocabularies ▫



RDF does not assume, nor does it define semantics of any y particular p application pp domain

The user can do so in RDF Schema using: ▫ ▫ ▫

Classes and Properties Class Hierarchies and Inheritance Property Hierarchies

Semantic Web Technologies

What is RDFS ? • RDF Schema ▫ Defines vocabulary for RDF ▫ Organizes this vocabulary in a typed hierarchy (Class, subClassOf, type, Property, subPropertyOf)

• Rich, web-based publication format for declaring semantics (XML for exchange) • Capability to explicitly declare semantic relations between vocabulary terms

Semantic Web Technologies

RDF Schema Vocabulary • Vocabulary can be used to define other vocabularies for your application domain Person subClassOf Student

range

domain

S

type Frank

subClassOf

S

Researcher type Jeen

Semantic Web Technologies

RDF Schema • • • • •

Semantic network on the Web Nodes are identified by y URIs rdfs:Class rdfs:Property rdfs:subClassOf

Semantic Web Technologies

RDF Schema syntax in XML p g "htt // 3 / #Cl "/ ID= registeredTo > p y rdf:resource="#registeredTo"/> g

Semantic Web Technologies

Classes and their Instances •

We must distinguish between ▫

Concrete “things” (individual objects) in the domain: Discrete Maths, David Billington etc.



Sets of individuals sharing properties called classes: lecturers, students, courses etc.



Individual objects that belong to a class are referred to as instances of that class



The relationship p between instances and classes in RDF is through rdf:type

Semantic Web Technologies

Why Classes are Useful? •

Impose restrictions on what can be stated in an RDF document using the schema ▫ ▫ ▫

As in programming languages E g A+1, E.g. A+1 where A is an array Disallow nonsense from being stated

Semantic Web Technologies

Nonsensical Statements disallowed through the Use of Classes Cl •

Discrete Maths is taught by Concrete Maths ▫ ▫



We want courses to be taught by lecturers only property p y “is taught g Restriction on values of the p by” (range restriction)

Room MZH5760 iis ttaught R ht b by D David id Billington ▫ ▫

Only courses can be taught This imposes a restriction on the objects to which the property can be applied (domain restriction)

Semantic Web Technologies

Class Hierarchies •

Classes can be organised in hierarchies ▫ ▫

A is a subclass of B if every instance of A is also an instance of B Then B is a superclass of A



A subclass graph need not be a tree



A class may have multiple superclasses

Semantic Web Technologies

Class Hierarchy Example

Semantic Web Technologies

Inheritance in Class Hierarchies •

Range restriction: Courses must be taught by academic staff members only



Michael Maher is a professor



He inherits the ability to teach from the class of academic staff members



This is done in RDF Schema by fixing the semantics of “is a subclass of” ▫



It is not up to an application (RDF processing software) to interpret “is a subclass of

Properties are not encapsulated but defined globally

Semantic Web Technologies

Property Hierarchies •

Hierarchical relationships for properties ▫ ▫



The converse is not necessarily true ▫ ▫



E.g., “is E “i ttaught ht b by” ” iis a subproperty b t off “involves” If a course C is taught by an academic staff member A, then C also involves Α

E.g., A may be the teacher of the course C, or a tutor who marks student homework but does not teach C

P is a subproperty p p y of Q,, if Q(x,y) ( ,y) is true whenever P(x,y) is true

Semantic Web Technologies

RDF Layer vs RDF Schema Layer •

Discrete Mathematics is taught by David Billington



The schema is itself written in a formal language, g g , RDF Schema,, that can express p its ingredients: ▫

subClassOf, Class, Property, subPropertyOf, Resource, etc.

Semantic Web Technologies

RDF Layer vs RDF Schema Layer (2)

ΤHE LANGUAGE OF RDF SCHEMA

Semantic Web Technologies

RDF Schema in RDF •

The modeling primitives of RDF Schema are defined using resources and properties (RDF itself is used!)



To declare that “lecturer” is a subclass of “academic staff member” ▫ ▫ ▫



Define D fi resources lecturer, l t academicStaffMember, and subClassOf define property subClassOf Write triple (subClassOf,lecturer,academicStaffMember)

We use the XML-based syntax of RDF

Semantic Web Technologies

Core Classes •

rdfs:Resource the class of all resources rdfs:Resource,



rdfs:Class, the class of all classes



rdfs:Literal, the class of all literals (strings)



rdf:Property, the class of all properties



rdf:Statement, df St t t th the class l off all ll reified ifi d statements

Semantic Web Technologies

Core Properties •

rdf:type, which relates a resource to its class ▫



rdfs:subClassOf,, which relates a class to one of its superclasses ▫



The resource is declared to be an instance of that class

All instances of a class are instances of its superclass

rdfs:subPropertyOf, relates a property to one off iits superproperties i

Semantic Web Technologies

Core Properties (2) •

rdfs:domain, which specifies the domain off a property t P ▫ ▫



The class of those resources that may appear as subjects in a triple with predicate P If the domain is not specified, then any resource can be the subject

rdfs:range, which specifies the range of a property P ▫

The class Th l off those h resources that h may appear as values in a triple with predicate P

Semantic Web Technologies

Examples rdf:resource= #staffMember />

Semantic Web Technologies

Subclass Hierarchy y of some Modelling g primitives p of RDFS

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

Instance Relationships p of some Modelling gp primitives of RDFS

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

Relationships p Between Core Classes and Properties p • rdfs:subClassOf and rdfs:subPropertyOf are transitive by definition transitive, • rdfs:Class is a subclass of rdfs:Resource ▫ Because every class is a resource

• rdfs:Resource is an instance of rdfs:Class ▫ rdfs:Resource is the class of all resources, so it is a class

• Every class is an instance of rdfs:Class ▫ For the same reason

Semantic Web Technologies

Reification and Containers •

rdf:subject, relates a reified statement to its subject



rdf:predicate, relates a reified statement to its predicate



rdf:object relates a reified statement to its object rdf:object,



rdf:Bag, the class of bags



rdf:Seq, the class of sequences



rdf:Alt,, the class of alternatives



rdfs:Container, which is a superclass of all container classes, including the three above

Semantic Web Technologies

Utility Properties •

rdfs:seeAlso relates a resource to another resource that explains p it



rdfs:isDefinedBy is a subproperty of rdfs:seeAlso and relates a resource to the place where its definition, typically an RDF schema, is found



rfds:comment. Comments, rfds:comment Comments typically longer text text, can be associated with a resource



rdfs:label. df l b l A human-friendly h f i dl label l b l (name) ( ) is i associated with a resource

SUMMARY

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

RDF Classes Class name

comment

rdfs:Resource

The class resource, everything.

rdfs:Literal

The class of literal values, e.g. textual strings and integers.

rdf:XMLLiteral

The class of XML literals values.

rdfs:Class

The class of classes.

rdf:Property

The class of RDF properties.

rdfs:Datatype

The class of RDF datatypes.

rdf:Statement

The class of RDF statements.

rdf:Bag

The class of unordered containers.

rdf:Seq

The class of ordered containers.

rdf:Alt

The class of containers of alternatives. alternatives

rdfs:Container

The class of RDF containers.

rdfs:ContainerMembershipProper The class of container membership properties, rdf:_1, rdf:_2, ..., all of ty which are sub-properties of 'member'. rdf:List

FAST-NU, Islamabad

The class of RDF Lists.

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

RDF Properties (1) Property name rdf:type rdfs:subClassOf rdfs:subPropertyOf rdfs:domain rdfs:range rdfs:label rdfs:comment

FAST-NU, Islamabad

comment The subject is an instance of a class. The subject is a subclass off a class. l The subject is a subproperty of a property. A domain of the subject property property. A range of the subject property. A human-readable name for the subject. A description of the subject resource.

domain

range

rdfs:Resource

rdfs:Class

rdfs:Class

rdfs:Class

rdf:Property

rdf:Property

rdf:Property

rdfs:Class

rdf:Property

rdfs:Class

rdfs:Resource

rdfs:Literal

rdfs:Resource

rdfs:Literal

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

RDF Properties (2) Property name rdfs:member rdf:first rdf:rest rdfs:seeAlso rdfs:isDefinedBy

rdf:value

rdf:subject rdf:predicate rdf:object FAST-NU, Islamabad

comment A member of the subject resource. The first item in the subject RDF list. The rest of the subject RDF list after the first item. Further information about the subject resource. The definition of the subject resource. Idiomatic property used for structured values (see the RDF Primer for an example of its usage). The subject of the subject RDF statement. The predicate of the subject bj t RDF statement. t t t The object of the subject RDF statement.

domain

range

rdfs:Resource

rdfs:Resource

rdf:List

rdfs:Resource

rdf:List

rdf:List

rdfs:Resource

rdfs:Resource

rdfs:Resource

rdfs:Resource

rdfs:Resource

rdfs:Resource

rdf:Statement

rdfs:Resource

rdf:Statement

rdfs:Resource

rdf:Statement

rdfs:Resource

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

EXAMPLE : UNIVERSITY

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

Example: A University rdfs:comment The class of lecturers. All lecturers are academic staff members. / df Cl

Semantic Web Technologies

Example: A University (2) The class of courses df Inherits its domain ("course") and range ("lecturer") from its superproperty "involves"

Semantic Web Technologies

Example: A University (3) It is a property of staff members and takes literals as values.

RDF SCHEMA Class Hierarchy Example!

FAST-NU, Islamabad

Fall 2008 - Lecture 1

Instructor: Amna Basharat Haider

Semantic Web Technologies

Class Hierarchy y for the Motor Vehicles Example p •

Semantic Web Technologies

Class Hierarchy of the RDFS Class hierarchy is shown using a "nodes and arcs" graph representation of the RDF data model. If one class l is i a subset b t off another, then there is an rdfs:subClassOf arc from the node representing p g the first class to the node representing the second.

If a resource is an instance of a class, then there is an rdf:type arc from f th resource tto th the the node d representing ti th the class. l

Semantic Web Technologies

Example (1)

Example expresses the following class hierarchy. We first define a class MotorVehicle. We then define three subclasses of MotorVehicle, namely PassengerVehicle Truck and Van. PassengerVehicle, Van We then define a class Minivan which is a subclass of both Van and PassengerVehicle.

Semantic Web Technologies

Example (2)

...

Semantic Web Technologies

Example (3)



< df df "#M t V hi l "/> ...

Semantic Web Technologies

Example (4)





DUBLIN CORE

Semantic Web Technologies

Dublin Core • A set of fifteen basic properties for describing generalised Web resources • ISO Standard 15836-2003 (February 2003): http://www niso org/international/SC4/n515 http://www.niso.org/international/SC4/n515. pdf The Dublin Core Metadata Initiative is an open forum engaged in the development of interoperable online metadata standards that support a broad range of purposes and business models.

http://dublincore.org/

Semantic Web Technologies

Dublin Core (15 basic properties): • • • • • • •

Title Creator Subject Description Publisher Contributor Date

• • • • • • • •

Type Format Identifier Source Language Relation C Coverage Rights

Semantic Web Technologies

Dublin Core Example xmlns:dc="http://purl.org/dc/elements/1.0/"> Guidance on expressing the Dublin Core within the Resource D Description i i Framework F k (RDF) /d i l Eric Miller Paul Miller Dan Brickley Dublin Core; Resource Description Framework; RDF; eXtensible Markup Language; XML Dublin Core Metadata Initiative Dublin Core Data Model Working Group 1999-07-01 text/html en

Semantic Web Technologies

Where to look next? • RDF: http://www.w3.org/RDF/ • RDF Schema: http://www.w3.org/TR/rdf-schema/

Related Documents

Swt
November 2019 10
Lecture 9
November 2019 15
Lecture 9
May 2020 9
Lecture 9
November 2019 14
Lecture 9
November 2019 16