Web Services and Semantic Web - Introduction to Web Services
Semantic Web: an introduction
-
Upload
luigi-de-russis -
Category
Technology
-
view
270 -
download
1
description
Transcript of Semantic Web: an introduction
![Page 1: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/1.jpg)
THE SEMANTIC WEB AN INTRODUCTION
LUIGI DE RUSSIS
![Page 2: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/2.jpg)
THE WEB IS A WEB OF DOCUMENT
FOR PEOPLE, NOT FOR MACHINES
![Page 3: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/3.jpg)
THE WEB IS A WEB OF DOCUMENT
![Page 4: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/4.jpg)
THE SEMANTIC WEB IS A WEB OF DATA
Linking Open Data cloud diagram,
by Richard Cyganiak and Anja Jentzsch.
http://lod-cloud.net/
![Page 5: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/5.jpg)
LET’S THINK!
![Page 6: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/6.jpg)
HOW TO GET DATA
FROM THE WEB?
![Page 7: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/7.jpg)
HOW TO GET DATA FROM THE WEB?
DATA IS PRESENT ON SOME WEBSITES Wikipedia, GitHub, Twitter, Facebook, …
HOW TO GET IT? different, evolving and proprietary Web APIs
various data exchange formats
![Page 8: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/8.jpg)
EXAMPLE
GITHUB Web APIs (third version)
https://developer.github.com/v3
Data available in JSON
Authentication is required for most calls
![Page 9: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/9.jpg)
EXAMPLE
TWITTER https://dev.twitter.com/docs/
Authentication is required for most calls
Limitations about number of requests
Data available in JSON
RESTful Web APIs (version 1.1)
Streaming APIs (version 1.1)
![Page 10: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/10.jpg)
EXAMPLE
WIKIPEDIA MediaWiki Web APIs (version 1.1)
http://www.mediawiki.org/wiki/API:Main_page
Data available in JSON, PHP, WDDX, XML, YAML, TXT, …
RSS
Direct XML exports
![Page 11: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/11.jpg)
HOW TO GET DATA FROM THE WEB?
DATA IS LOCKED IN “DATA ISLANDS” Wikipedia, GitHub, Twitter, Facebook, …
LIMITED OR NO ACCESS TO THIS DATA different, evolving and proprietary Web APIs
various data exchange formats
![Page 12: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/12.jpg)
DATA ON THE WEB IS NOT ENOUGH! we need a proper infrastructure
DATA SHOULD BE AVAILABLE ON THE WEB accessible and structured via standard Web technologies
not controlled by applications, only
DATA SHOULD BE INTERLINKED OVER THE WEB i.e., data can be integrated over the Web
THIS IS WHERE SEMANTIC WEB COME IN
![Page 13: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/13.jpg)
DEFINITIONS
![Page 14: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/14.jpg)
To a computer, the Web is a flat, boring world, devoid of
meaning. This is a pity, as in fact documents on the Web
describe real objects and imaginary concepts. […]
Adding semantics to the Web involves two things: allowing
documents which have information in machine-readable
forms, and allowing links to be created with relationship
values. Only when we have this extra level of semantics we
will be able to use computer power to help us exploit the
information to a greater extent than our own reading.
TIM BERNERS-LEE, 1994
![Page 15: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/15.jpg)
THE INTERNET, 1994 C.A.
NEW!
NEW! No Google, Wikipedia, Amazon,
… yet!
![Page 16: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/16.jpg)
I have a dream for the Web [in which computers] become
capable of analyzing all the data on the Web – the content,
links, and transaction between people and computers.
A “Semantic Web”, which should make this possible, has yet
to emerge, but when it does, the day-to-day mechanisms of
trade, bureaucracy and our daily lives will be handled by
machines talking to machines. The “intelligent agents” people
have touted for ages will finally materialize.
TIM BERNERS-LEE, 1999 Weaving the Web – The Original Design and Ultimate Destiny of the World Wide Web by Its Inventor. Tim Berners-Lee, Harper San Francisco, September 1999
![Page 17: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/17.jpg)
THE SEMANTIC WEB IS A WEB OF DATA
THE SEMANTIC WEB IS THE WEB same base technologies, evolutionary, decentralized
IT IS ABOUT COMMON FORMATS for integration and combination of data drawn from diverse sources
IT IS ABOUT A LANGUAGE for recording how the data relates to real world objects
![Page 18: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/18.jpg)
WHAT IS THE RELATIONSHIP WITH AI?
INFLUENCE Some technologies in the Semantic Web benefited a lot from AI research
and development (and viceversa)
DIFFERENT GOALS Artificial Intelligence approach: build smarter machines, teach
computers to infer the meaning of data
Semantic Web approach: have smarter data, make data easier for
machines to find, access and process
![Page 19: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/19.jpg)
FUNDAMENTALS
![Page 20: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/20.jpg)
RESOURCE AND DESCRIPTION
RESOURCE every document “reachable” on the Web
no matter the content, format, language, etc.
RESOURCE DESCRIPTION independent from the format
standard language (based on metadata)
![Page 21: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/21.jpg)
RESOURCE AND DESCRIPTION
Resources
![Page 22: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/22.jpg)
RESOURCE AND DESCRIPTION
Description
![Page 23: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/23.jpg)
RESOURCE AND DESCRIPTION
Description Title
Author
Date
Topic
Quality
Title Author
Date Topic
![Page 24: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/24.jpg)
URIS unambiguous names for resources
RDF a common data model to connect and describe resources
SPARQL access to the data model
RDFS, OWL common description languages
OWL, RIF reasoning (mainly logic inference)
![Page 25: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/25.jpg)
MODELING DATA
![Page 26: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/26.jpg)
EXAMPLE: BOOKSTORE
Represent the following data about the AI book as a set of relations
Title: “Artificial Intelligence: A Modern
Approach”
Author: Russel, Stuart and Norvig, Peter
Publisher: Prentice Hall
ISBN: 978-0136042594
![Page 27: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/27.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594
Resource
![Page 28: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/28.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Literal
![Page 29: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/29.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
title
![Page 30: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/30.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall
Russel, Stuart
Norvig, Peter
title
publisher
author
author
![Page 31: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/31.jpg)
RDF: RESOURCE DESCRIPTION FRAMEWORK
STRUCTURED IN STATEMENTS
SUBJECT a resource (URI)
PREDICATE a verb, property or relationship
OBJECT a resource or a literal string
![Page 32: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/32.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall
Russel, Stuart
Norvig, Peter
title
publisher
author
author
Subject Object
Object
Object
Object
Predicate Predicate
Predicate
![Page 33: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/33.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
title
RDF IN XML SYNTAX
<rdf:RDF xmlns:rdf=http://www.w3.org/…/22-rdf-syntax-ns#>
<rdf:Description about=“http://... isbn/9780136042594”>
<title>Artificial Intelligence: A Modern Approach</title>
</rdf:Description>
</RDF>
![Page 34: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/34.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
title
RDF IN TURTLE
<http://... isbn/9780136042594>
title “Artificial Intelligence: A Modern Approach”
![Page 35: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/35.jpg)
LINKIN’ DATA
![Page 36: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/36.jpg)
EXAMPLE: BOOKSTORE
Represent the following data about the Italian translation of the AI book
as a set of relations
Title: “Intelligenza artificiale. Un approccio
moderno”
Author: Russel, Stuart and Norvig, Peter
Publisher: Prentice Hall
ISBN: 978-8871925936
Original ISBN: 978-0136042594
![Page 37: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/37.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9788871925936
Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
Russel, Stuart
Norvig, Peter
title
publisher
creator creator
http://...isbn/9780136042594
original
![Page 38: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/38.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9788871925936
Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
title
publisher
http://...isbn/9780136042594
original
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall
title
publisher
![Page 39: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/39.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9788871925936
Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
title
publisher
http://...isbn/9780136042594
original
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall
title
creator
same URI, same resource
![Page 40: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/40.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall Russel, Stuart
Norvig, Peter
title
publisher
author
author
http://...isbn/9788871925936
Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
title
publisher
original
Russel, Stuart
Norvig, Peter
creator
creator
![Page 41: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/41.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall Russel, Stuart
Norvig, Peter
title
publisher
author
author
http://...isbn/9788871925936
Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
title
publisher
original
Russel, Stuart
Norvig, Peter
creator
creator
What about merging creator and author?
In RDF, it is not possible!
![Page 42: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/42.jpg)
PROBLEM: FIELD NAMES ARE ARBITRARY Synonyms : author or creator or maker or contributor or…
Singular or plural: author or authors
SOLUTION: STANDARDS general or domain-specific
![Page 43: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/43.jpg)
DUBLIN CORE
GENERAL VOCABULARY Dublin Core Metadata Initiative (DCMI)
http://dublincore.org
BUILDING BLOCKS TO DEFINE METADATA FOR THE
SEMANTIC WEB Define title, contributor, publisher, license, date, language, etc.
![Page 44: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/44.jpg)
PROBLEM: FIELD VALUES ARE ARBITRARY Value type: string, date, integer, …
Value format: “Norvig, Peter” or “Norvig, P.” or “Peter Norvig” or…
Value restrictions: one value or multiple values (how many?)
SOLUTIONS Standards
Controlled vocabulary (close list of terms)
Semantically rich descriptions to support search (RDFS and/or OWL)
![Page 45: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/45.jpg)
FRIEND OF A FRIEND (FOAF)
GENERAL ONTOLOGY Describe persons, their activities and their relations to other people and
objects
http://www.foaf-project.org
BUILDING BLOCKS TO DEFINE STRUCTURED
RELATIONS BETWEEN PEOPLE Define name, familyName, givenName, knows, age, nick, etc.
![Page 46: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/46.jpg)
EXAMPLE: BOOKSTORE
http://...isbn/9780136042594 Artificial Intelligence: A Modern
Approach
Prentice Hall
Russel, Stuart
Norvig, Peter
dc:title
dc:publisher dc:creator
dc:creator
foaf: http://xmlns.com/foaf/spec
dc: http://purl.org/dc/terms
foaf:name
foaf:name
foaf:name
![Page 47: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/47.jpg)
http://...isbn/9780136042594
Norvig, Peter
dc:creator
foaf:name
http://...isbn/9780136042594
Norvig, Peter
author
WHY?
![Page 48: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/48.jpg)
RDF SCHEMA
![Page 49: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/49.jpg)
RDF SCHEMA
SCHEMA Definition of the nodes and predicates used in a RDF document
DOMAIN AND RANGE RDFS describes properties in terms of classes of resource
to which they apply (from a “domain” to a “range”)
![Page 50: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/50.jpg)
EXAMPLE
RDF data
http://elite.polito.it/people/derussis teaches
http://bit.ly/lingambmult
![Page 51: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/51.jpg)
http://elite.polito.it/people/derussis teaches
EXAMPLE
RDF data
RDF schema
http://bit.ly/lingambmult
Teacher
Person
teaches Course
domain range
subClassOf
type type
![Page 52: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/52.jpg)
http://...isbn/9780136042594
Norvig, Peter
dc:creator
foaf:name
http://...isbn/9780136042594
Norvig, Peter
author
BACK TO THE BOOKSTORE EXAMPLE…
![Page 53: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/53.jpg)
http://...isbn/9780136042594
Norvig, Peter
dc:creator
foaf:name
http://...isbn/9780136042594
Norvig, Peter
author
BACK TO THE BOOKSTORE EXAMPLE…
dc:creator has range Agent, i.e., a class (resource), not a literal:
we use an anonymous class for this scope.
Finally, foaf:Name has range rdfs:Literal.
anonymous
class
![Page 54: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/54.jpg)
RDFS EXPRESSIVITY
SIMPLE RELATIONSHIP BETWEEN THINGS RDFS provides a vocabulary to express relationship between things
(e.g., subClassOf or type)
AVOID COMPLEX RELATIONSHIP RDFS cannot describe data in terms of set of operations (e.g., unionOf),
equivalence (e.g., sameAs) or cardinality (e.g., allValueFrom)
![Page 55: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/55.jpg)
OWL
![Page 56: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/56.jpg)
WEB ONTOLOGY LANGUAGE
WHAT? OWL (version 2): a knowledge representation language
Designed to formulate, exchange and reason with knowledge about a
domain of interest
![Page 57: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/57.jpg)
WEB ONTOLOGY LANGUAGE
INDIVIDUALS, CLASSES AND PROPERTIES “Politecnico di Torino is a university”
“Politecnico di Torino has a professor named Elio Piccolo”
“Politecnico di Torino” is an object: an individual in OWL2
“university” is a category: a class in OWL2
“has a professor” is a relation: a property in OWL2
“Elio Piccolo” is an individual, too
![Page 58: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/58.jpg)
WEB ONTOLOGY LANGUAGE
EXPRESSIVITY Designed to represent rich and complex knowledge about things, group
of things, and their relations
LOGIC-BASED Knowledge expressed in OWL can be reasoned with a computer program
to verify its consistency or to make implicit knowledge explicit
![Page 59: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/59.jpg)
WEB ONTOLOGY LANGUAGE
LINKED Ontologies in OWL can be published on the Web and may refer to or be
referred from other OWL ontologies
CHOOSE THE SYNTAX YOU LIKE Various syntaxes available for OWL, for different purposes
(RDF/XML, Turtle, Manchester, etc.)
![Page 60: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/60.jpg)
EXAMPLE: BOOKSTORE Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
dc:title
dc:publisher
Artificial Intelligence: A Modern
Approach
Prentice Hall
dc:title
dc:publisher
Libro
Book
rdfs:type
rdf:type
http://...isbn/9788871925936
http://...isbn/9780136042594
![Page 61: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/61.jpg)
EXAMPLE: BOOKSTORE Intelligenza Artificiale. Un
approccio moderno
Prentice Hall
dc:title
dc:publisher
Artificial Intelligence: A Modern
Approach
Prentice Hall
dc:title
dc:publisher
Libro
Book
rdfs:type
rdf:type
owl:sameAs
http://...isbn/9788871925936
http://...isbn/9780136042594
![Page 62: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/62.jpg)
HANDS ON OWL
![Page 63: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/63.jpg)
EXAMPLE: BOOKSTORE
It is time to sell the books we modeled.
Users must have the possibility to search in our book catalog.
We need to describe our store
and add some other information about the books.
GoodRelations helps in realizing such an example:
http://www.heppnetz.de/projects/goodrelations/
![Page 64: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/64.jpg)
EXAMPLE: BOOKSTORE
BUILD THE MODEL 1. Describe the business entity
2. Describe the offered items
3. Describe the offer
4. Link the offer to the business entity
SEARCH IN THE MODEL
![Page 65: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/65.jpg)
DESCRIBE THE BUSINESS ENTITY
default:BookStore_1
a gr:BusinessEntity ;
gr:legalName “bookstore.com Ltd.”^^xsd:string .
Bookstore_1
![Page 66: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/66.jpg)
DESCRIBE THE OFFERED ITEMS
default:AIBook_en
a item:Book, gr:ActualProductOrServiceInstance ;
item:hasTotalPages default:QuantitativeValueInteger_1 .
AIBook_en
default:QuantitativeValueInteger_1
a gr:QuantitativeValueInteger ;
gr:hasValue “1132”^^xsd:integer .
QuantitativeValue
Integer_1
![Page 67: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/67.jpg)
Bookstore_1 AIBook_en
item:Book QuantitativeValue
Integer_1
1132 gr:ActualProductOrServiceInstance
gr:ProductOrService
rdf:type
rdfs:subClassOf
rdf:type
item:hasTotalPages
gr:hasValue
![Page 68: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/68.jpg)
DESCRIBE THE OFFER default:Offering_1
a gr:Offering ;
gr:hasBusinessFunction gr:Sell ;
gr:hasPriceSpecification default:UnityPriceSpecification_1 ;
gr:includeObject default:TypeAndQuantityNode_1 .
Offering_1
![Page 69: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/69.jpg)
Bookstore_1
Offering_1
TypeAndQuantity
Node_1 UnitPriceSpecification_1
AIBook_en
item:Book QuantitativeValue
Integer_1
gr:Sell
1.0
1132 gr:ActualProductOrServiceInstance
gr:ProductOrService
gr:includeObject
gr:hasBusinessFunction
gr:hasPriceSpecification
gr:amountOfThisGood
rdf:type
rdfs:subClassOf
rdf:type
item:hasTotalPages
gr:hasValue
gr:Offering
rdf:type
![Page 70: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/70.jpg)
DESCRIBE THE OFFER
default:TypeAndQuantityNode_1
a gr:TypeAndQuantityNode ;
gr:amountOfThisGood “1.0”^^xsd:float ;
gr:typeOfGood default:AIBook_en .
default:UnitPriceSpecification_1
a gr:UnitPriceSpecification ;
gr:hasCurrency “EUR”^^xsd:string ;
gr:hasCurrencyValue “120.0”^^xsd:float .
TypeAndQuantity
Node_1
UnitPriceSpecification_1
![Page 71: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/71.jpg)
Bookstore_1
Offering_1
TypeAndQuantity
Node_1 UnitPriceSpecification_1
AIBook_en
item:Book QuantitativeValue
Integer_1
gr:Sell
120.0
“EUR”
1.0
1132 gr:ActualProductOrServiceInstance
gr:ProductOrService
gr:includeObject
gr:hasBusinessFunction
gr:hasPriceSpecification
gr:hasCurrency
gr:hasCurrencyValue gr:amountOfThisGood
gr:typeOfGood
rdf:type
rdfs:subClassOf
rdf:type
item:hasTotalPages
gr:hasValue
gr:Offering
rdf:type
![Page 72: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/72.jpg)
default:BookStore_1 gr:offers default:Offering_1
LINK THE OFFER TO THE BUSINESS ENTITY
![Page 73: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/73.jpg)
Bookstore_1
Offering_1
TypeAndQuantity
Node_1 UnitPriceSpecification_1
AIBook_en
item:Book QuantitativeValue
Integer_1
gr:Sell
120.0
“EUR”
1.0
1132 gr:ActualProductOrServiceInstance
gr:ProductOrService
gr:offers
gr:includeObject
gr:hasBusinessFunction
gr:hasPriceSpecification
gr:hasCurrency
gr:hasCurrencyValue gr:amountOfThisGood
gr:typeOfGood
rdf:type
rdfs:subClassOf
rdf:type
item:hasTotalPages
gr:hasValue
gr:Offering
rdf:type
![Page 74: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/74.jpg)
QUERY THE WHOLE!
PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX item: <http://www.elite.polito.it/ontologies/example/item#>
SELECT ?offering
WHERE { ?offering rdf:type gr:Offering .
?offering gr:includesObject ?object .
?object gr:typeOfGood ?item .
?item rdf:type item:Book .
}
How to get all the available offer for the book?
SPARQL
![Page 75: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/75.jpg)
QUERY THE WHOLE!
?item rdf:type item:Book . SPARQL
?item
item:Book
rdf:type
![Page 76: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/76.jpg)
QUERY THE WHOLE!
?object gr:typeOfGood ?item . SPARQL
?object
AIBook_en
item:Book
gr:typeOfGood
rdf:type
![Page 77: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/77.jpg)
QUERY THE WHOLE!
?offering gr:includesObject ?object . SPARQL
?offering
TypeAndQuantity
Node_1
AIBook_en
item:Book
gr:includeObject
gr:typeOfGood
rdf:type
![Page 78: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/78.jpg)
QUERY THE WHOLE!
?offering rdf:type gr:Offering . SPARQL
?offering
TypeAndQuantity
Node_1
AIBook_en
item:Book
gr:includeObject
gr:typeOfGood
rdf:type gr:Offering
rdf:type
![Page 79: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/79.jpg)
QUERY THE WHOLE!
SELECT ?offering SPARQL
Offering_1
TypeAndQuantity
Node_1
AIBook_en
item:Book
gr:includeObject
gr:typeOfGood
rdf:type gr:Offering
rdf:type
![Page 80: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/80.jpg)
REFERENCES Semantic Web standards: http://w3c.org/standards/semanticweb
Semantic Web Wiki: http://semanticweb.org
Semantic Web FAQ: http://www.w3c.org/2001/sw/SW-FAQ
Book: A Semantic Web Primer (http://www.semanticwebprimer.org)
Book: Semantic Web Programming (http://semwebprogramming.org)
Last access: 26 May 2014
![Page 81: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/81.jpg)
THANKS!
Luigi De Russis
http://elite.polito.it
![Page 82: Semantic Web: an introduction](https://reader034.fdocuments.us/reader034/viewer/2022052522/554e7c40b4c90545698b5048/html5/thumbnails/82.jpg)
LICENSE This work is licensed under the Creative Commons “Attribution-NonCommercial-
ShareAlike Unported (CC BY-NC-SA 3,0)” License.
You are free:
to Share - to copy, distribute and transmit the work
to Remix - to adapt the work
Under the following conditions:
Attribution - You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or your use of the
work).
Noncommercial - You may not use this work for commercial purposes.
Share Alike - If you alter, transform, or build upon this work, you may distribute the
resulting work only under the same or similar license to this one.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/