Abstract:
This paper presents a novel framework for validating the Time Ontology (https://www.w3.org/TR/owl-time). The Time Ontology is currently a W3C candidate recommendation draft and is widely recognized as the “de facto” standard for representing temporal data in the Semantic Web. However, its current axiomatization in OWL is unable to enforce several constraints on temporal data, which are instead captured by the SHACL formalization proposed in this paper. Besides providing a practical tool for processing temporal data in RDF within applications, this paper also offers insights into the combined use of SHACL shapes and SHACL-SPARQL rules to properly capture the interplay between validation and inference in knowledge graphs. Specifically, we demonstrate that SHACL shapes alone are insufficient for validating certain knowledge graphs that can be asserted using the current vocabulary of the Time Ontology. To ensure proper validation, we first compute the inferred knowledge graphs using SHACL-SPARQL rules, then validate the inferred graphs through SHACL shapes. We argue that these findings extend beyond the Time Ontology and apply more broadly, even in the context of more advanced reasoning rules. In light of this, we see our work as a call to action for the Semantic Web community to systematically investigate the representational requirements of different use cases in order to identify the minimal inference rules necessary for validating data in those use cases. The SHACL shapes and SHACL-SPARQL rules that define the proposed framework are freely available on the GitHub repository
https://github.com/liviorobaldo/TimeOntologyInSHACL, along with Java programs and clear instructions for processing them.