On 12/09/2020 09:21, Irene Polikoff wrote:
On Sep 11, 2020, at 6:02 PM, cbur...@healthwise.org
<http://healthwise.org> <cburn...@healthwise.org
<mailto:cburn...@healthwise.org>> wrote:
These questions are more about SHACL than about EDG per se, but I
think you experts will be able to help me.
1. *sh:disjoint*: I have used sh:disjoint to declare that the sh:path
of a property shape is disjoint with another another property, like
this:
ex:Concept-property
a sh:PropertyShape ;
sh:path ex:property ;
sh:disjoint ex:property2 .
Testing this out in EDG 6.4.1 yields no constraint violations when I
assign values to a certain instance of ex:Concept for both
ex:property and ex:property2. Have I set this up incorrectly, or do I
need to do something else to make EDG raise warnings in this situation?
Disjoint means that a given resource cannot have the same value for
ex; property as for ex:property2. E.g., a pref label for resource X
can’t be the same as alLabel for resource X. Is this what you meant?
In case you're stuck, a minimal complete example would allow us to
reproduce it.
Or do you mean something else i.e., it either have a value for
ex:property or a value for ex:property2 e.g., either foaf:givenName or
foaf:firstName, but not both. If so, then use xone:
https://www.w3.org/TR/shacl/#XoneConstraintComponent
2. *Inferring data: *Suppose ex:property and ex:property2 are
disjoint for a given shape, as specified above. If an instance of
ex:Concept has *exactly one value *for either ex:property or
ex:property2, I would like to infer that this is the value of
ex:property3. How could this be modeled?
The exact expression depends on your answer to the first question.
2. *A different property pair constraint:* This case is nearly the
opposite of the above. Suppose I wish to specify that any value of
ex:property4 (which has sh:maxCount 1) *must be* one of the values of
ex:property5 (which has no sh:maxCount). How would I express that? (I
don't see a way to do it using sh:equals.)
SPARQL-based constraint
Yes or dash:subSetOf already implements this SPARQL constraint:
http://datashapes.org/constraints.html#SubSetOfConstraintComponent
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/5d7141cd-7193-f5bf-0493-28b449f79a0d%40topquadrant.com.