The way the min-count cardinality constraint is currently implemented, there are two separate instances of sh:ConstraintComponent, there are cases when only for one or for none of the two the defined validator is applicable. Currently, the ConstraintFactory throws a warning that no validators can be found, but here it seems sound to have non-total constraint components, for which a query for validation has to be only executed for some values of sh:minCount (i.e. no checks at all have to take place if sh:minCount is non-positive).
As there might be further cases for this for other constraint types, I suggest introducing another custom shacl-ext property shr:partial:
sh:MinCountConstraintComponent
a sh:ConstraintComponent ;
shr:partial "true"^^xsd:boolean ;
[...]
This will inform RDFUnit that is can safely accept that no applicable validator can be found for this component without generating errors/warnings.
The way the min-count cardinality constraint is currently implemented, there are two separate instances of
sh:ConstraintComponent
, there are cases when only for one or for none of the two the defined validator is applicable. Currently, theConstraintFactory
throws a warning that no validators can be found, but here it seems sound to have non-total constraint components, for which a query for validation has to be only executed for some values ofsh:minCount
(i.e. no checks at all have to take place ifsh:minCount
is non-positive).As there might be further cases for this for other constraint types, I suggest introducing another custom
shacl-ext
propertyshr:partial
:This will inform RDFUnit that is can safely accept that no applicable validator can be found for this component without generating errors/warnings.