Hi Tim,
have you tried
https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent
with min count and max count 1 and sh:class? You need three
property shapes on the same property.
Holger
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0WbnKXEb%2BArirQXCq9w5ZH-Y7b%3DX7apZge%2BU_UxCnFVznxPw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/bd4c0653-340d-f188-bf20-95582b4656f6%40topquadrant.com.
Hi Tim,
your example has sh:qualifiedValueShapesDisjoint true on all three cases, but they are NOT disjoint. All that the three helper shapes verify is that the values of rdfs:label are strings. Nothing else. The constraint applies to all instances.
Did you probably expect that sh:node would also implicitly check
for the rdf:type? It doesn't. The fact that for example
st:Streaming_Company is both sh:NodeShape and owl:Class doesn't
make a difference for validation, it is only used for targeting of
nodes.
So you would need to add constraints on rdf:type, e.g. using sh:class. In the attached version I have removed the disjoint statements and instead added three sh:class constraints. This is producing no violations.
Not sure if this exactly what you want to test, but maybe one step closer. Keep in mind that deep sh:node structures may badly impact performance and cause problems with recursion.
Maybe what you really want would be to leave the sh:class constraints in instead of sh:node, but then when a user validates the root instance (e.g. on a form) it should also walk into adjacent instances and check their constraints using class membership?
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0Wbn%2ByHvjQgEMmshwqNgG4Bt-Fn1_0SfTJJhDmPUSDyJQD1Q%40mail.gmail.com.