Hi Carl,
here is a design pattern for this:
ex:UniqueValueShape
a sh:PropertyShape ;
sh:targetObjectsOf ex:property ;
sh:path [ sh:inversePath ex:property ] ;
sh:maxCount 1 .
The above applies to all values of ex:property, i.e. the distinct
objects of triples that have ex:property as predicate. It reports a
violation if for any of those target nodes, when you walk ex:property in
the inverse direction, there are more than one value nodes (i.e. the
subjects of the inverse triples).
(Above the property shape itself carries the target statement, but it
would of course also work via a NodeShape that has the property shape
via sh:property).
HTH
Holger
On 24/01/2020 10:59, cburn...@healthwise.org wrote:
What if I wanted to create a constraint (in SHACL, perhaps) specifying
that two concepts may not share the same object for a particular
property? I would want a warning to be raised when a user attempts to
save a concept containing the triple
ex:ConceptX ex:property ex:ConceptY
if somewhere else in the vocabulary there already exists the triple
ex:ConceptZ ex:property ex:ConceptY
It occurs to me that such a rule is already enforced for the
skos:prefLabel property in EDG, but I don't know how this is being
done "under the hood." Can anyone advise how to create a similar
constraint? Thanks.
--
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-users+unsubscr...@googlegroups.com
<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/7a0925ed-ea55-405a-8e10-9f45677bfdcb%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/7a0925ed-ea55-405a-8e10-9f45677bfdcb%40googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/5a606500-b613-becb-faa0-aced31cac6cd%40topquadrant.com.