Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.82 KB

12.md

File metadata and controls

49 lines (39 loc) · 1.82 KB

Export the chosen offer into another information system which uses a different schema

Description

After deciding on a specific offer, the consumer wants to save information about the vendor on his local machine using a different schema. The corresponding query refers to a randomly selected offer, or the one considered by the previous task.

Sample

"Save in the local computer the information about the vendor for Offer3499, this is half the task. To complete it, restrict the output to just label, homepage and country and map them to schema.org terms name, url and nationality".

Expected Outcome

Given the sample dataset bsbm-1000products, the exported information if the mapping to shema.org is possible should be:

"name: commissariats", "url: www.vendor2.com" and "nationality: US".

SPARQL Query to Perform

CONSTRUCT {
  ?vendorURI schema:name ?vendorname .
	?vendorURI schema:url ?vendorhomepage .
	?vendorURI schema:nationality ?countryURI
} WHERE {
	%OfferXYZ% bsbm:vendor ?vendorURI .
	?vendorURI rdfs:label ?vendorname .
	?vendorURI foaf:homepage ?vendorhomepage .
	?vendorURI bsbm:country ?countryURI
}

SPARQL Query for the Sample Query

PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dfv2: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromVendor2/>
PREFIX schema: <https://schema.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT {
  ?vendorURI schema:name ?vendorname .
	?vendorURI schema:url ?vendorhomepage .
	?vendorURI schema:nationality ?countryURI
} WHERE {
	dfv2:Offer3499 bsbm:vendor ?vendorURI .
	?vendorURI rdfs:label ?vendorname .
	?vendorURI foaf:homepage ?vendorhomepage .
	?vendorURI bsbm:country ?countryURI
}