sh:minus takes any node expression and will simply compute the nodes resulting from sh:nodes and then remove the nodes resulting from sh:minus.
Did you try
For the geeks here is the implementation of sh:minus
public ExtendedIterator<RDFNode> eval(RDFNode
focusNode, NodeExpressionContext context) {
Set<RDFNode> sans = minus.eval(focusNode,
context).toSet();
return getInput().eval(focusNode, context).filterDrop(n
-> sans.contains(n));
}
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/ba2904a6-242d-4c9c-8ad3-ad334edfd5e1n%40googlegroups.com.
Holger, that did the trick. Thanks! I felt like I had tried every possible combination, but apparently not that one.
Are there plans to develop a more detailed spec with examples, or maybe further tutorials for SHACL? With other specs/languages, it’s possible to google around and find a similar example to see someone else did something. But with SHACL, I often feel alone in a giant, empty sea…
Carl
From: topbrai...@googlegroups.com <topbrai...@googlegroups.com>
On Behalf Of Holger Knublauch
Sent: Wednesday, February 24, 2021 3:58 PM
To: topbrai...@googlegroups.com
Subject: Re: [topbraid-users] How to use sh:minus
*** External email: use caution ***
--
You received this message because you are subscribed to a topic in the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/topbraid-users/I9rSZumVNVQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
topbraid-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/551b2dea-a35d-c1a9-d84b-a7059371c777%40topquadrant.com.
Hi Carl,
since this topic has come up many times recently, and the existing documentation of SHACL Node Expressions (and thus sh:values and sh:TripleRules) in the spec was rather wanting, I have finally allocated some time to produce examples for most of the node expression types:
https://w3c.github.io/shacl/shacl-af/#node-expressions
While we at TQ may produce all kinds of tutorials and product
documentation, the W3C specs (here, Community Report draft) are
the ultimate sources that most people will look up.
HTH
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/MWHPR19MB1598D1ED88DD623EE3F51502B79E9%40MWHPR19MB1598.namprd19.prod.outlook.com.