Hi,
I am trying to customize a SWP script for the first time (7.2.4) and I am
struggling a little bit.
We have an existing script that does almost exactly what I want based on
this:
SELECT DISTINCT ?a ?b ?c
WHERE { ?a ?b c?.
?b a <URI_of_class> .
}.
So a function is called if ?b is a specific class (specified by it's URI)
I wanted to change this so it uses that class' children instead of the
class itself and found rdfs:subClassOf.
I tried the following versions, none of which work.
A)
SELECT DISTINCT ?a ?b ?c
WHERE { ?a ?b c?.
?b rdfs:subClassOf <URI_of_class> .
}.
B)
SELECT DISTINCT ?a ?b ?c
WHERE { ?a ?b c?.
?b (rdfs:subClassOf)* <URI_of_class> .
}.
C)
SELECT DISTINCT ?a ?b ?c
WHERE { ?a ?b c?.
?b (rdfs:subClassOf)+ <URI_of_class> .
}.
I double checked if rdfs:subClassOf (including * and +) works on its own
using a SPARQL endpoint and it gives me the expected instances.
I am guessing I still simply use the wrong syntax for swp scripts or don't
understand what rdfs:subClassOf actually means.
Any advice?
Cheers
Julia
--
The topics of this mailing list include TopBraid EDG and related technologies
such as SHACL.
To post to this group, send email to [email protected]
---
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/85b221e7-5394-4fc4-900b-d2e2cc6d186cn%40googlegroups.com.