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
On 3/07/2021 7:51 am, Tim Smith wrote:
Hi,
I have a need to model this constraint in SHACL:
/*An Entertainment Holding Company must own one and only one instance
of EACH of the following classes: Movie Company, Racing Company, and
Streaming Company in order to be a valid instance of Entertainment
Holding Company.*/
This is an example of a valid instance:
image.png
Any more or less than 3 st:owns triples or more or less than 1
instance of the three classes listed above should be a violation.
I have tried numerous ways to model this behavior without success.
SHACL seems to iterate through each object of the st:owns property
where I'm making a statement about the set of st:owns objects. I
encounter this type of problem frequently so I'm hoping there is a
pattern I can apply as a generic solution. Something like sh:and but
where sh:and would look across all objects of sh:path.
Am I missing something simple? The one solution that I know works is
the one that I cannot use - creating a new property and property shape
for each class e.g. st:ownsMovieCompany. If this is the only
solution, then I can never use a "generic" property like "owns",
"category", etc.... This will result in a property explosion and
would rapidly become unworkable in industry-sized models.
Thanks in advance for your input,
Tim
--
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 [email protected]
<mailto:[email protected]>.
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
<https://groups.google.com/d/msgid/topbraid-users/CAF0WbnKXEb%2BArirQXCq9w5ZH-Y7b%3DX7apZge%2BU_UxCnFVznxPw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/bd4c0653-340d-f188-bf20-95582b4656f6%40topquadrant.com.