I would like to get all the paths between two nodes (subjects).
Lets say my RDF graph is:
@prefix : <urn:ex:>.
:a :relatedTo :b .
:b :relatedTo :c .
:c :relatedTo :d .
:a :relatedTo :e .
:e :relatedTo :f .
:f :relatedTo :d .
:a :relatedTo :i .
:i :relatedTo :j .
:j :relatedTo :d .
I want to get the paths between a
& d
.
As per the above data there are 3 paths between a
& d
which are.
a - b - c - d
a - e - f - d
a - i - j - d
Is it possible to achieve this using SPARQL or CTS query?