Re: Constraints metamodel draft

(Sorry to revive this old thread)

On 16/12/2015 1:34 AM, Arthur Ryman wrote:
> 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.

I see nothing unusual in that design, it's just multiple-inheritance to 
me. Also, many class structures use intermediate classes to group 
together things that logically belong together.

Holger


>
> -- 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 Saturday, 30 January 2016 06:23:27 UTC