I have very little knowledge of SHACL and ShEx.
I've been reading about them and to figure out whether I could create constraints over a property to make it define a hierarchy (i.e. a tree-like structure).
I guess what I'm looking for is a way to specify that, for a given property p
,
a) this can happen (o1 != o2
):
s p o1 .
s p o2 .
...
s p oN
b) but this cannot (s1 != s2
):
s1 p o .
s2 p o
I guess for a) I should use some kind of constraint on the cardinality of p
, right?
No idea on how to specify b) or even if it is possible at all using either SHACL or ShEX. Should I be using OWL?