- From: Vladimir Alexiev <vladimir.alexiev@ontotext.com>
- Date: Wed, 15 Sep 2021 12:24:33 +0300
- To: Scott Henninger <scotthenninger@gmail.com>, Radostin Nanov <radostin.nanov@ontotext.com>, Miroslav Chervenski <miroslav.chervenski@ontotext.com>
- Cc: Public Shacl W3C <public-shacl@w3.org>
- Message-ID: <CAMv+wg56FChEzH19m=3yrns--dwJzGyFvb9Xkex0VcZoxzOa9Q@mail.gmail.com>
Sorry I sent an incomplete email! Here's an edited version: > the three main requirements (above 1), 2), 3) ) are prerequisites for applying other shapes. Hi Scott! You need to target by shape. You can't do this with standard SHACL. We at Ontotext added such extension to rdf4j ShaclSail because we needed it for the Ontotext Platform: https://rdf4j.org/shacl/extensions.html It didn't make it to SHACL Advanced because TQ thought it's not feasible to implement. But it is, if you have incremental validation. In fact it's an important feature for scenarios when you have related shapes (very often), in order to avoid uncontrollable expansion of validation work. Recursive shapes are not allowed in SHACL (the result is undefined), eg - "shape Company is a foaf:Organization that may have Employees" - "shape Employee is a foaf:Person that has employer, being a Company" But even in non-recursive cases, we found it very useful to have two shape flavors for each "business object": - a Lite shape that discriminates between business objects, and is used to check that references are valid (the target node exists and has the expected Lite shape) - a Full shape that checks all properties of the object This is what we use in the Onotext Platform for "type discrimination", see http://platform.ontotext.com/soml/objects.html#object-typing A simple example: thesaurus values usually use skos:Concept, and are further discriminated by skos:inScheme. Eg - (lite) "shape Industry is a skos:Concept with skos:inScheme being <industry>" - and further (full) "it has :level being xsd:integer, and skos:notation matching a NACE regex, and may have skos:broader being Industry (lite)" - (lite) "shape Technology is a skos:Concept with skos:inScheme being <technology>" - and further (full) "it may have skos:broader being Technology (lite)" - (full) "shape Company is foaf:Organization that has one primaryIndustry, may have more industries, and may have several technologies" We use this distribution of work: - When checking (full) "shape Company" we use the (lite) shapes of Industry and Technology, to ensure Company refers to existing and appropriate nodes. - We check the (full) shapes "Industry" and "Technology" only when new "business objects" of that kind are in the incoming transaction. How do we pick what objects are incoming? By using the (lite) shapes, and targeting by these shapes Sorry, I'm in a hurry now so maybe the above is not very clear. Will write a blog post about it. Scott, if this sounds like it can be useful to you, please contact us directly. Cheers!
Received on Wednesday, 15 September 2021 09:24:59 UTC