Skip to content

MinCount, MaxCount #29

@pkiraly

Description

@pkiraly

The MinCount and MaxCount Parameters on a Constraint with property P identify the minimum and maximum number of triples (value node, P, _) may exist in the instance data. Unless provided, the MinCount is 0 and the MaxCount in infinite.

MinCount := ref:numeric PC

sh:minCount: Testing a MinCount parameter against a set of value nodes returns fail if the number of value nodes is less than ref.

MaxCount := ref:numeric PC

sh:maxCount: Testing a MaxCount parameter against a set of value nodes returns fail if the number of value nodes is greater than ref.

<IssueShape> sh:property [ sh:predicate ex:status; sh:minCount 1; sh:maxCount 1 ] ;
             sh:property [ sh:predicate ex:notes; sh:nodeKind sh:literal ] .
<issue1> ex:status ex:Confirmed .
<issue2> ex:status ex:Confirmed, ex:Assigned .
<issue3> ex:notes "shouldn't QC have caught this?" .
<IssueShape>  <issue1>  pass
<IssueShape>  <issue2>  fail  expected at most 1 ex:status.
<IssueShape>  <issue3>  fail  expected at least 1 ex:status.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions