How to simulate hours of operation in RDF

What is the most pragmatic way to model service hours so that SPARQL queries can query objects opened with a specific timestamp / for a specific time interval?

Answers to this question should contain:

  • ontology example
  • sample data that uses this ontology
  • a SPARQL * query that returns everything from this pattern that is open at a specific timestamp

(* additional points for simplicity and performance)

+7
semantic-web rdf owl ontology
source share
3 answers

There are various ways to describe calendars online. Among others, iCal (or rdf-ized RDFCal), http://schema.org/OpeningHoursSpecification or a time ontology (for example, describing the time interval of an event).

Opening hours can be seen as a combination of calendars. Using the rdf list: we can add calendars and indicate whether each of these calendars indicates closing times or hours of operation. For example, for a simple business, I would add 2 calendars: * Opening hours: from 9 to 5 from Monday to Sunday * Closing hours: official holidays

I published an article about this, and I created a brief ontology to create opening hours for http://openinghours.io .

+1
source share

I suggest you look at schema.org. It provides a model for opening hours: http://schema.org/OpeningHoursSpecification . You can see an example applied to enterprises: http://schema.org/LocalBusiness

You can build your RDF graph accordingly, and it should be easy to query later. In addition, if you create web pages from it, the main search engines will be able to better use your information and use it in your own way.

+9
source share

Several triple repositories of temporary requests, such as Parliament , use vocabulary . They should be able to respond to requests such as "events between X and Y". I am sure that the proposed time model from schema.org can be useful to see if something is open or not.

+1
source share

All Articles