Closed hmottestad closed 3 years ago
Implicit AND is supported
Lots of nice little curveballs in the shacl spec. Mixing node-shape and property-shapes.
ex:SuperShape
a sh:NodeShape ;
sh:property [
sh:path ex:property ;
sh:minCount 1 ;
] .
ex:ExampleAndShape
a sh:NodeShape ;
sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
sh:and (
ex:SuperShape
[
sh:path ex:property ;
sh:maxCount 1 ;
]
) .
Kinda makes me wonder how the following works:
ex:SuperShape
a sh:NodeShape ;
sh:targetClass ex:ExampleClass ; #########
sh:property [
sh:path ex:property ;
sh:minCount 1 ;
] .
ex:ExampleAndShape
a sh:NodeShape ;
sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
sh:and (
ex:SuperShape
[
sh:path ex:property ;
sh:maxCount 1 ;
]
) .
Basic sh:and is now supported.
Support
sh:and
https://www.w3.org/TR/shacl/#AndConstraintComponent
Also support implicit sh:and:
Note the implicit
sh:and
between minLenght 100 and nodeKind sh:Literal.