- From: Holger Knublauch <holger@topquadrant.com>
- Date: Sat, 21 Nov 2015 06:31:56 -0500
- To: public-data-shapes-wg@w3.org
- Message-ID: <5650562C.8080306@topquadrant.com>
This is in continuation of my email [1] in which I have outlined a simpler constraints metamodel that can serve as a "schema" for SHACL that is friendly both to RDFS/OWL and SHACL tools. The attached file is a quick draft for an RDFS model of SHACL shapes and constraints. I have also attached a few diagrams to explain how this would work. Image 1 illustrates the classes sh:Shape and sh:Constraint, with its 3 subclasses for property, inverseProperty and general node constraints). Image 2 introduces the class sh:ConstraintType (similar to Arthur's Assertion class, aka templates), which groups together the arguments of a constraint type (such as sh:minCount for sh:MinCountConstraint). Furthermore, ConstraintTypes link to Validators, which provide the executable semantics. SPARQL is one kind of validators, NodeValidationFunction is another: - General SPARQL validators can contain an arbitrary SELECT query, returning one row for each violation. That is needed for complex cases like sh:minCount, QCRs, and sh:hasValue - NodeValidationFunctions are simplified ASK queries that take a single node as parameter and check whether that node matches a condition, e.g. a given regular expression sh:pattern. Image 3 shows two examples of such sh:ConstraintTypes (sh:MinCountConstraint and sh:PatternConstraint). They serve as superclasses of sh:PropertyConstraint etc so that their properties can be accumulated in a single node. As you can see, the structure of constraint types such as sh:MinCountConstraint can be reused in multiple places. Regards, Holger [1[ https://lists.w3.org/Archives/Public/public-data-shapes-wg/2015Nov/0163.html
Attachments
- text/plain attachment: shacldraft.ttl
- image/png attachment: SHACL-Metamodel-Draft-1.png
- image/png attachment: SHACL-Metamodel-Draft-2.png
- image/png attachment: SHACL-Metamodel-Draft-3.png
Received on Saturday, 21 November 2015 11:32:28 UTC