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.
"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".
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".
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
}
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
}