Warning: This tool or project is no longer maintained and kept available only for archival purposes. Since GoodRelations and schema.org have evolved significantly in the past years, the current status available on this page is unlikely to function as expected. We take no responsibility for any damage caused by the use of this outdated work, to the extent legally possible.

Due to a lack of resources, we are unable to provide support for this project outside of consulting projects or sponsored research. Please contact us if you can contribute resources to update and enhance these resources.

GoodRelations - The Web Vocabulary for E-Commerce

This is the archive of the goodrelations dicussion list

GoodRelations is a standardized vocabulary for product, price, and company data that can (1) be embedded into existing static and dynamic Web pages and that (2) can be processed by other computers. This increases the visibility of your products and services in the latest generation of search engines, recommender systems, and other novel applications.

[goodrelations] Modelling opening hours where shop closes on the following day and multiple intraday timespans

László Török ltorokjr at gmail.com
Wed Sep 12 22:08:05 CEST 2012


Thanks, that helps a lot!

2012/9/12 Martin Hepp <martin.hepp at ebusiness-unibw.org>

> This has to be specified as follows:
>
> <div itemscope itemtype="http://schema.org/Place" itemid="#store">
>   <link itemprop="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
>         href="http://purl.org/goodrelations/v1#Location" />
>   <span itemprop="name">Hepp's Happy Burger Restaurant</span>
>   <div itemprop="hasOpeningHoursSpecification" itemscope
>        itemtype="
> http://purl.org/goodrelations/v1#OpeningHoursSpecification">
> Opening hours: Fridays
>      <link itemprop="hasOpeningHoursDayOfWeek"
>            href="http://purl.org/goodrelations/v1#Friday" />
>      <meta itemprop="opens" content="19:00:00">7:00 p.m. -
>      <meta itemprop="closes" content="23:59:59">
>   </div>
>   <div itemprop="hasOpeningHoursSpecification" itemscope
>        itemtype="
> http://purl.org/goodrelations/v1#OpeningHoursSpecification">
>      <link itemprop="hasOpeningHoursDayOfWeek"
>            href="http://purl.org/goodrelations/v1#Saturday" />
>      <meta itemprop="opens" content="00:00:00">
>      <meta itemprop="closes" content="02:00:00">2:00 a.m. (next day)
>   </div>
> </div>
>
> Apologies for using Microdata syntax here; that was what I had as hand.
>
> I.e., opening hours that cross midnight must be broken into two chunks,
> one opening hour specification for the first day, then closing at 23:59:59,
> and one for the next day of the week, opening ant 00:00:00.
>
> A bar that opens every evening at 7.00 p.m. and closes at 2:00 a.m. the
> next day would then say for Mondays through Sundays:
>
> opens 00:00:00, closes 02:00:00
> opens 19:00:00, closes 23:59:59
>
> You will need two gr:OpeningHoursSpecification nodes, because gr:opens and
> gr:closes have a cardinality of 1..1 in this case.
>
> A consuming client should assume that if the shop closes for only 1
> second, it is actually open without interruption.
>
> This is the only way to model this scenario properly in GoodRelations,
> since otherwise, SPARQL queries for sub-intervals and other things would
> not work.
> For instance, someone checking at 0:30 am on the following Saturday for a
> bar that is open for at least another hour should find this place.
>
> Also, it is not always obvious which specification is the right one for
> the next day, because they might be constrained by validFrom and
> validThrough.
>
> Hope that helps.
>
>
> Best wishes
>
> Martin Hepp
>
> On Sep 12, 2012, at 5:36 PM, László Török wrote:
>
> > Hi,
> >
> > Is there any recommendation how should one modell the following opening
> hours pattern:
> >
> > Fri: 7pm - 2am (next day)
> >
> >
> > The following seems a bit odd:
> > <div rel="gr:hasOpeningHoursSpecification">
> >
> >
> > <div typeof="gr:OpeningHoursSpecification">
> >  Opening hours: Fri,
> >
> > <div rel="gr:hasOpeningHoursDayOfWeek"
> >
> >
> > resource="http://purl.org/goodrelations/v1#Friday"></div>
> >
> >
> > <div property="gr:opens" content="19:00:00" datatype="xsd:time">7:00
> p.m. - </div>
> >
> >
> > <div property="gr:closes" content="02:00:00" datatype="xsd:time">2:00
> a.m.</div>
> >
> >
> > </div>
> >
> >
> > </div>
> >
> > it becomes confusing, if I want to specify multiple intraday time spans,
> which is common for restaurants:
> >
> > e.g.  Mo-Fri: 10am - 3pm, 5pm - 11pm
> >
> > Is there a compact way to represent this or should one provide two
> gr:OpeningHoursSpecification nodes to describe those.
> >
> > There is a recommendation for schema.org:
> http://schema.org/LocalBusiness
> >
> > Thanks!
> > --
> > László Török
> >
> > _______________________________________________
> > goodrelations mailing list
> > goodrelations at ebusiness-unibw.org
> > http://ebusiness-unibw.org/cgi-bin/mailman/listinfo/goodrelations
>
>
>
> --------------------------------------------------------
> martin hepp
> e-business & web science research group
> universitaet der bundeswehr muenchen
>
> e-mail:  hepp at ebusiness-unibw.org
> phone:   +49-(0)89-6004-4217
> fax:     +49-(0)89-6004-4620
> www:     http://www.unibw.de/ebusiness/ (group)
>          http://www.heppnetz.de/ (personal)
> skype:   mfhepp
> twitter: mfhepp
>
> Check out GoodRelations for E-Commerce on the Web of Linked Data!
> =================================================================
> * Project Main Page: http://purl.org/goodrelations/
>
>
>
>


-- 
László Török
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ebusiness-unibw.org/pipermail/goodrelations/attachments/20120912/902bcd78/attachment.html>


More information about the goodrelations mailing list