GRValidator Implemented E18
From Wiki of the E-Business and Web Science Research Group
Contents |
Error 18
E18: Check that all hours specification includes at least one day.
Validator Tool: Step # 30
Error Message
Open and close hours specifications must include at least one day of the week.
Potential Problem
Care must be taken that all hour specifications include at least one day, otherwise it is not possible to really know when a location is open.
Examples of Wrong Data
@prefix foo: <http://www.example.com/#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix vcard: <http://www.w3.org/2006/vcard/ns#> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix gr: <http://purl.org/goodrelations/v1#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . foo:myCompany rdf:type gr:BusinessEntity ; gr:legalName "Hepp's Bagel Bakery Ltd. "^^<http://www.w3.org/2001/XMLSchema#string> ; vcard:fn "Hepp's Bagel Bakery Ltd. "@en . foo:myShop rdf:type gr:LocationOfSalesOrServiceProvisioning ; vcard:adr foo:address ; vcard:tel "+49-89-6004-4217"^^<http://www.w3.org/2001/XMLSchema#string> . foo:Mondays rdf:type gr:OpeningHoursSpecification ; gr:opens "08:00:00"^^<http://www.w3.org/2001/XMLSchema#time> ; gr:closes "18:00:00"^^<http://www.w3.org/2001/XMLSchema#time> ; gr:hasOpeningHoursDayOfWeek gr:Monday . foo:myShop gr:hasOpeningHourSpecification foo:Mondays . foo:NoDay rdf:type gr:OpeningHoursSpecification ; gr:opens "10:00:00"^^<http://www.w3.org/2001/XMLSchema#time> ; gr:closes "20:00:00"^^<http://www.w3.org/2001/XMLSchema#time> . foo:myShop gr:hasOpeningHourSpecification foo:NoDay . foo:Saturdays rdf:type gr:OpeningHoursSpecification ; gr:opens "08:30:00"^^<http://www.w3.org/2001/XMLSchema#time> ; gr:closes "14:00:00"^^<http://www.w3.org/2001/XMLSchema#time> ; gr:hasOpeningHoursDayOfWeek gr:Saturday . foo:myShop gr:hasOpeningHourSpecification foo:Saturdays . foo:myCompany gr:hasPOS foo:myShop ; rdfs:seeAlso <http://www.example.com/> . foo:address rdf:type vcard:Address ; vcard:country-name "Germany"@en ; vcard:locality "Neubiberg"@en ; vcard:postal-code "85577"^^<http://www.w3.org/2001/XMLSchema#string> ; vcard:region "Bavaria"@en ; vcard:street-address "1234 Hepp Road"@en . foo:myCompany vcard:adr foo:address ; vcard:tel "+49-89-6004-0"^^<http://www.w3.org/2001/XMLSchema#string> ; vcard:url <http://www.example.com/> .
SPARQL Query
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT ?object
WHERE
{
?object a gr:OpeningHoursSpecification .
OPTIONAL { ?object gr:hasOpeningHoursDayOfWeek ?day . }
FILTER ( !bound(?day) )
}