Re: Constraints metamodel draft (was: ISSUE-95: Proposal for model simplifications)

Holger,

Your proposal seems to invert the intuitive class hierarchy. "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."

It is more natural that specific constraints are subclasses of more
general constraints.  You seem to pick this inverted design as a way
to inject parameters. However, I think that is not the natural use of
subclassing in RDFS.

-- Arthur

On Sat, Nov 21, 2015 at 6:31 AM, Holger Knublauch
<holger@topquadrant.com> wrote:
> 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
>

Received on Tuesday, 15 December 2015 15:35:20 UTC