The Web of Data for E-Commerce in Brief
A Hands-on Introduction to the GoodRelations Ontology, RDFa, and Yahoo! SearchMonkey
October 25, 2009
Westfields Conference Center near Washington, DC, USA
Martin Hepp Universität der Bundeswehr München, Munich, Germany
Richard Cyganiak Digital Enterprise Research Institute (DERI), Ireland
08:30-10:30 Overview and Motivation: Why the Web of Data is Now 30’
Quick Review of Prerequisites 15’ The GoodRelations Ontology: E-Commerce on the Web of Data 75’
10:30-10:45 Coffee Break
10:45-12:30 RDFa: Bridging the Web of Documents with the Web of Data 45’
Expressing GoodRelations in RDFa: A Running Example 30’ GoodRelations – Advanced Topics 30’
12:30-13:30 Lunch Break
13:30-16:00 Hands-on Exercise: Annotating a Web Shop 60’
Querying the Web of Data for Offerings – SPARQL 15’ Querying the Web of Data – Exercises 15’
16:00-16:30 Coffee Break
16:30-18:00 Publishing Semantic Web Data: Make Your RDF Available 30’
Yahoo SearchMonkey and Yahoo BOSS 45’ Discussion, Conclusion, Feedback Round 15’
2
Logistics
The GoodRelations Ontology:
E-Commerce on the Web of Data
Martin Hepp
25.10.2009 3
GoodRelations User‘s Guide („Primer“)
4
http://www.heppnetz.de/projects/goodrelations/primer/
UML Class Diagram
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:string
gr:ProductOrService
gr:priceType xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTimegr:hasUnitOfMeasurement xsd:string
gr:UnitPriceSpecificationgr:eligibleRegions xsd:stringgr:DeliveryChargeSpecification
gr:hasNAICS xsd:intgr:hasISICv4 xsd:intgr:legalName xsd:stringgr:hasDUNS xsd:stringgr:hasGlobalLocationNumber xsd:string
gr:BusinessEntity
gr:WarrantyScope
gr:PaymentMethod
gr:ProductOrServiceModel
gr:hasUnitOfMeasurement xsd:stringgr:QuantitativeValue
gr:durationOfWarrantyInMonths xsd:intgr:WarrantyPromise
gr:DayOfWeek
gr:DeliveryMethod
gr:QualitativeValue
gr:amountOfThisGood xsd:floatgr:hasUnitOfMeasurement xsd:string
gr:TypeAndQuantityNode
gr:BusinessFunction
gr:hasGlobalLocationNumber xsd:stringgr:LocationOfSalesOrServiceProvisioning
gr:PaymentMethodCreditCard
gr:BusinessEntityType
gr:hasMaxValueInteger xsd:intgr:hasMinValueInteger xsd:int
gr:QuantitativeValueInteger
gr:ActualProductOrServiceInstance
gr:ProductOrServicesSomeInstancesPlaceholder
gr:opens xsd:timegr:closes xsd:time
gr:OpeningHoursSpecification
gr:PaymentChargeSpecification
gr:DeliveryModeParcelService
gr:hasCurrency xsd:stringgr:valueAddedTaxIncluded xsd:booleangr:hasMaxCurrencyValue xsd:floatgr:hasMinCurrencyValue xsd:floatgr:hasCurrencyValue xsd:float
gr:PriceSpecification
gr:hasMinValueFloat xsd:floatgr:hasMaxValueFloat xsd:float
gr:QuantitativeValueFloat
gr:seeks
gr:includesObject
gr:typeOfGood
gr:hasMakeAndModel
gr:hasMakeAndModel
gr:hasManufacturer
gr:hasPOS
gr:hasOpeningHoursSpecification
gr:availableAtOrFrom
gr:hasEligibleQuantity
gr:hasWarrantyPromise
gr:appliesToPaymentMethod
gr:hasWarrantyScope
gr:qualitativeProductOrServiceProperty
gr:quantitativeProductOrServiceProperty
gr:appliesToDeliveryMethod
gr:hasBusinessFunction
gr:availableDeliveryMethods
gr:eligibleCustomerTypes
gr:acceptedPaymentMethods
gr:hasPriceSpecification
gr:hasOpeningHoursDayOfWeek
gr:isConsumableFor
gr:isVariantOf
gr:isSimilarTo
gr:isAccessoryOrSparePartFor
gr:offers
gr:hasInventoryLevel
gr:typeOfGood
gr:includes
gr:includes
Version 1, Release 2009-07-18Martin Hepp. [email protected]
25.10.2009 5
http://www.ebusiness-unibw.org/wiki/File:Goodrelations-UML-2009-07-18.pdf
GoodRelations: Language Reference
6
http://purl.org/goodrelations/v1.html
Overview
The GoodRelations Vocabulary • A universal and free Web
vocabulary for adding
product and offering data
to your Web pages.
• Compatible with all relevant
W3C standards and
recommendations
– RDF – OWL
http://purl.org/goodrelations/
8
GoodRelations: One Single Schema for
A Consolidated View on E-Commerce
Data
9
Product Model
Master Data Shop
Offerings Auctions Spare Parts &
Consumables
Warranty
Delivery Payment
Retailers Manufacturers
Extraction
and Reuse Arbitrary Query
GoodRelations Design Principles
• Keep simple things
simple and make
complex things possible
• Cater for LOD and OWL
DL worlds
• Academically sound
• Industry-strength
engineering
• Practically relevant
10
Lightweight
Web of Data
LOD
RDF + a little bit
Heavyweight
Web of Data
OWL DL
GoodRelations: License
• Permanent, royalty-free access for commercial and non-commercial use.
http://purl.org/goodrelations/
11
GoodRelations vs. eClassOWL etc. GoodRelations:
Companies & Offers
• BusinessEntity
• Offering
• WarrantyPromise
• …
Products and Services
Ontologies
• Industry-specific
ontologies for describing
types of products and services
– eClassOWL
– freeClassOWL
– CEO - Consumer
Electronics Ontology
25.10.2009 12
Domain Structure and Use Cases
Albert Einstein on Ontology
Engineering
"Make everything as simple as possible, but
not simpler.“
Albert Einstein
14
Basic Structure of Offers:
Agent-Promise-Object Principle
15
Agent 1 Object or
Happening Promise
Agent 2
Compensation Transfer of
Rights
The Minimal Scenario
• Scope
– Business entity
– Points-of-sale
– Opening hours
– Payment options
• Suitable for
– Every business
– E-commerce and
brick-and-mortar
16
The Simple Scenario
• Scope: Minimal scenario plus
– Range of products or services
– Business functions
– Eligible regions or customer
types
– Delivery options
• Suitable for
– Any business: E-Commerce and
brick-and-mortar
– Specific products or services 17
The Comprehensive Scenario
• Scope: Simple scenario plus
– Individual products or services
– Product features
– Pricing, rebates, etc.
– Availability
• Suitable for
– Any business: E-commerce and brick-and-mortar
– Specific products or services
– Structured product database
18
Product Model Data Scenario
• Scope
– Individual product
models
– Quantitative and
qualitative features
• Suitable for
– Manufacturers of
commodities
19
Products vs. Product Models Product Model:
“Datasheet”
• Intangible object
• “Ferdinand Porsche
created the VW Beetle”
• Not a subclass of
products!
Products: What you buy,
possess, and use
• (Mostly) tangible object
that can be owned and
used.
• My VW Beetle has a
mileage of 42,000
• Its serial number is
123456789
25.10.2009 20
Product Models vs. Products
• Product models define the defaults for a
subset of a products features
ex:FordTModel ex:hasWeight “400”.
implies that likely (!)
ex:MyFordT ex:hasWeight “400”.
25.10.2009 21
Important: Only products are offered for sale etc
Products: Actual vs. Anonymous Individuals
• Sometimes you offer a particular object
– myMacBookPro
• Sometimes you offer products from a set
of anonymous instances
– A retailer does not expose every single book
copy on stock over the Web
– Those are only quantified existentially.
25.10.2009 22
Products: Actual vs. Anonymous Individuals
• Sometimes you offer a particular object
– Example: eBay auction
– gr:ActualProductOrServiceInstance
• Sometimes you offer products from a set of
anonymous instances
– Example: New books on Amazon
– gr:ProductOrServicesSomeInstancesPlaceholder
25.10.2009 23
Conceptual Structure and
Vocabulary
Understanding the UML Class Diagram
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:string
gr:ProductOrService
gr:priceType xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTimegr:hasUnitOfMeasurement xsd:string
gr:UnitPriceSpecificationgr:eligibleRegions xsd:stringgr:DeliveryChargeSpecification
gr:hasNAICS xsd:intgr:hasISICv4 xsd:intgr:legalName xsd:stringgr:hasDUNS xsd:stringgr:hasGlobalLocationNumber xsd:string
gr:BusinessEntity
gr:WarrantyScope
gr:PaymentMethod
gr:ProductOrServiceModel
gr:hasUnitOfMeasurement xsd:stringgr:QuantitativeValue
gr:durationOfWarrantyInMonths xsd:intgr:WarrantyPromise
gr:DayOfWeek
gr:DeliveryMethod
gr:QualitativeValue
gr:amountOfThisGood xsd:floatgr:hasUnitOfMeasurement xsd:string
gr:TypeAndQuantityNode
gr:BusinessFunction
gr:hasGlobalLocationNumber xsd:stringgr:LocationOfSalesOrServiceProvisioning
gr:PaymentMethodCreditCard
gr:BusinessEntityType
gr:hasMaxValueInteger xsd:intgr:hasMinValueInteger xsd:int
gr:QuantitativeValueInteger
gr:ActualProductOrServiceInstance
gr:ProductOrServicesSomeInstancesPlaceholder
gr:opens xsd:timegr:closes xsd:time
gr:OpeningHoursSpecification
gr:PaymentChargeSpecification
gr:DeliveryModeParcelService
gr:hasCurrency xsd:stringgr:valueAddedTaxIncluded xsd:booleangr:hasMaxCurrencyValue xsd:floatgr:hasMinCurrencyValue xsd:floatgr:hasCurrencyValue xsd:float
gr:PriceSpecification
gr:hasMinValueFloat xsd:floatgr:hasMaxValueFloat xsd:float
gr:QuantitativeValueFloat
gr:seeks
gr:includesObject
gr:typeOfGood
gr:hasMakeAndModel
gr:hasMakeAndModel
gr:hasManufacturer
gr:hasPOS
gr:hasOpeningHoursSpecification
gr:availableAtOrFrom
gr:hasEligibleQuantity
gr:hasWarrantyPromise
gr:appliesToPaymentMethod
gr:hasWarrantyScope
gr:qualitativeProductOrServiceProperty
gr:quantitativeProductOrServiceProperty
gr:appliesToDeliveryMethod
gr:hasBusinessFunction
gr:availableDeliveryMethods
gr:eligibleCustomerTypes
gr:acceptedPaymentMethods
gr:hasPriceSpecification
gr:hasOpeningHoursDayOfWeek
gr:isConsumableFor
gr:isVariantOf
gr:isSimilarTo
gr:isAccessoryOrSparePartFor
gr:offers
gr:hasInventoryLevel
gr:typeOfGood
gr:includes
gr:includes
Version 1, Release 2009-07-18Martin Hepp. [email protected]
25.10.2009 25
Key Questions for Modeling with GoodRelations
• Who is making the offer?
– gr:BusinessEntity
• Which object is being offered? – gr:ActualProductOrServiceInstance
– gr:ProductOrServicesSomeInstancesPlaceholder
• What are the terms and conditions of
the business transaction being offered?
– gr:Offering
25.10.2009 26
Key Questions for Modeling with GoodRelations
25.10.2009 27
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:priceType xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTimegr:hasUnitOfMeasurement xsd:string
gr:UnitPriceSpecification
gr:hasNAICS xsd:intgr:hasISICv4 xsd:intgr:legalName xsd:stringgr:hasDUNS xsd:stringgr:hasGlobalLocationNumber xsd:string
gr:BusinessEntity
gr:BusinessFunction
gr:ActualProductOrServiceInstancegr:hasBusinessFunction
gr:hasPriceSpecification
gr:offers
gr:includes
The Minimal Scenario
• Scope
– Business entity
– Points-of-sale
– Opening hours
– Payment options
• Suitable for
– Every business
– E-commerce and
brick-and-mortar
28
The Minimal Scenario (UML & RDF/N3)
25.10.2009 29
The Minimal Scenario: Full Graph
25.10.2009 30
The Minimal Scenario: Graph - Details
25.10.2009 31
The Minimal Scenario: Graph - Details
25.10.2009 32
The Minimal Scenario: Graph - Details
25.10.2009 33
The Simple Scenario
• Scope: Minimal scenario plus
– Range of products or services
– Business functions
– Eligible regions or customer
types
– Delivery options
• Suitable for
– Any business: E-Commerce and
brick-and-mortar
– Specific products or services 34
Alternative Ways of Describing the
Product or Service • gr:ProductOrServiceSomeInstancesPlaceholder + rdfs:comment
– Textual
• Product or service ontology
– eclassOWL
– freeClass
• DBPedia URIs
• Turn proprietary hierarchy into pseudo-ontology
25.10.2009 35
The Simple Scenario: UML
25.10.2009 36
The Simple Scenario: RDF/N3 - Details
25.10.2009 37
The Simple Scenario: RDF/N3 - Full
25.10.2009 38
The Simple Scenario: Full Graph
25.10.2009 39
The Simple Scenario: Graph - Details
25.10.2009 40
The Simple Scenario: Graph - Details
25.10.2009 41
The Simple Scenario: Graph - Details
25.10.2009 42
The Comprehensive Scenario
• Scope: Simple scenario plus
– Individual products or services
– Product features
– Pricing, rebates, etc.
– Availability
• Suitable for
– Any business: E-commerce and brick-and-mortar
– Specific products or services
– Structured product database
43
Alternative Ways of Describing the
Product or Service • Omit it
– Minimal Example: Describe just your business & store
• gr:ProductOrServiceSomeInstancesPlaceholder + rdfs:comment
– Textual
• Product or service ontology
– eclassOWL
– freeClass
• DBPedia URIs
• Turn proprietary hierarchy into pseudo-ontology
25.10.2009 44
The Comprehensive Example: UML
25.10.2009 45
Product Properties
• gr:qualitativeProductOrServiceProperty
– Links to a gr:QualitativeValue instance
• gr:quantitativeProductOrServiceProperty
– Links to a gr:QuantitativeValueFloat or
gr:QuantitativeValueInteger instance
• gr:datatypeProductOrServiceProperty
– Links to a literal value
– For strings, boolean, datetime, and digits that are no
integer numbers
25.10.2009 46
47
Quantitative Values in GoodRelations
gr:ProductOrService
GRM
foo:myTVSet
rdf:type
foo:weight _value1
gr:QuantitativeValueFloat
rdf:type
gr:hasUnitOfMeasurement
gr:hasValueFloat
30.5
Units of Measurement: UN/CEFACT 25.10.2009 48
49
All Point Values Are Value Ranges
hasValueFloat rdfs:subPropertyOf hasMaxValueFloat, hasMinValueFloat
hasValueInteger rdfs:subPropertyOf hasMaxValueInteger, hasMinValueInteger
gr:ProductOrService
GRM
foo:myTVSet
rdf:type
foo:weight _value1
gr:QuantitativeValueFloat
rdf:type
gr:hasUnitOfMeasurement
gr:hasValueFloat
30.5
gr:ProductOrService
GRM
foo:myTVSet
rdf:type
foo:weight _value1
gr:QuantitativeValueFloat
rdf:type
gr:hasUnitOfMeasurement
gr:hasMinValueFloat
30.5
gr:hasMaxValueFloat30.5
Values and Value Ranges: Example
25.10.2009 50
Comprehensive Example: Basics
25.10.2009 51
Product Bundles
25.10.2009 52
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:amountOfThisGood xsd:floatgr:hasUnitOfMeasurement xsd:string
gr:TypeAndQuantityNode
gr:ProductOrServicesSomeInstancesPlaceholder
gr:includesObject
gr:typeOfGood
Internally, all offers are bundles
25.10.2009 53
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:amountOfThisGood xsd:floatgr:hasUnitOfMeasurement xsd:string
gr:TypeAndQuantityNode
gr:ProductOrServicesSomeInstancesPlaceholder
gr:includesObject
gr:typeOfGood
The Comprehensive Scenario: Graph
54
The Comprehensive Scenario RDF/N3
• See GoodRelations Primer at http://www.heppnetz.de/projects/goodrelations/primer/
25.10.2009 55
Using Domain Ontologies for
Describing Products or Product Models
25.10.2009 56
Instances, Placeholders, Models
25.10.2009 57
eClassOWL and GoodRelations: Class
25.10.2009 58
eClassOWL: Quantitative Properties
25.10.2009 59
eClassOWL: Qualitative Properties &
Values
Property Value
25.10.2009 60
eClassOWL 5.1.4 URIs
• Class “Pencil“: 24-24-01-01 [ AKF303003 ]
– eco:C_AKF303003-gen
• Properties
– Length, BAF559001
• eco:P_BAF559001
– Design of tip state, BAG073001
• eco:P_BAG073001
• Value “pointed”, BAC386001
– eco:V_BAC386001
25.10.2009 61
eClassOWL 5.1.4 in N3/Turtle
25.10.2009 62
eClassOWL 5.1.4 in N3/Turtle
25.10.2009 63
Other Ontologies for GoodRelations
• freeClassOWL for construction and
building materials
• CEO – Consumer Electronics Ontology
25.10.2009 64
Product Model Data Scenario
• Scope
– Individual product
models
– Quantitative and
qualitative features
• Suitable for
– Manufacturers of
commodities
65
Product Model Data
25.10.2009 66
Important: Models cannot be sold
25.10.2009 67
Product Models Define Default Values
25.10.2009 68
Intuition: An actual product inherits all technical features from its make
and model, unless specified at for that particular individual specifically.
Buy Side: Wish Lists and Tenders
25.10.2009 69
gr:hasEAN_UCC-13 xsd:string gr:hasGTIN-14 xsd:stringgr:hasStockKeepingUnit xsd:stringgr:eligibleRegions xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTime
gr:Offering
gr:priceType xsd:stringgr:validFrom xsd:dateTimegr:validThrough xsd:dateTimegr:hasUnitOfMeasurement xsd:string
gr:UnitPriceSpecification
gr:hasNAICS xsd:intgr:hasISICv4 xsd:intgr:legalName xsd:stringgr:hasDUNS xsd:stringgr:hasGlobalLocationNumber xsd:string
gr:BusinessEntity
gr:BusinessFunction
gr:ProductOrServicesSomeInstancesPlaceholder
gr:seeks
gr:hasBusinessFunction
gr:hasPriceSpecificationgr:includes
Quizzes
• What is the difference between
gr:ProductOrService and
gr:ProductOrServiceModel?
• What is the difference between
gr:ActualProductOrService and
gr:ProductOrServiceSomeInstancesPlaceholder?
• How are quantitative values modeled in
GoodRelations?
• What does the string “C62” stand for?
25.10.2009 70
Thank you.
25.10.2009 71