Support for reverse paths in predicate trees?

13 views
Skip to first unread message

Leif Warner

unread,
Apr 24, 2012, 3:11:32 AM4/24/12
to scardf
I was wondering if there was any support for traversing a link in the
reverse direction from a given node as part of a predicate tree.
Granted, this might not be so much of a tree anymore, but RDFa and
SPARQL property paths support such things. I was thinking the
something like the syntax in SPARQL property paths and N3 could be
reused - a ^ to indicate reverse direction.
http://www.w3.org/TR/sparql11-property-paths/#path-language
Do you think this is feasible? I've been using RDFa as a sort of
templating language, and so I wanted to parse the RDFa with missing
nodes and form a predicate tree to apply the graph pattern query
against a graph, though RDFa also has "rev" links in addition to
"rel"s.
-Leif Warner

Hrvoje Šimić

unread,
Apr 24, 2012, 3:22:56 AM4/24/12
to sca...@googlegroups.com
I've implemented a minus sign to denote reverse direction. Also, there
is an object AnyPredicate to traverse all predicates. This is not
documented yet, but you see it in the source and specs:

http://code.google.com/p/scardf/source/browse/trunk/src/main/scala/org/scardf/ptree.scala

http://code.google.com/p/scardf/source/browse/trunk/src/test/scala/org/scardf/ptree.spec.scala

Is that what you had in mind?

Leif Warner

unread,
Apr 24, 2012, 4:11:50 AM4/24/12
to scardf
Yes, that's exactly what I was looking for, thanks!

On Apr 24, 12:22 am, Hrvoje Šimić <hrvojesi...@gmail.com> wrote:
> I've implemented a minus sign to denote reverse direction. Also, there
> is an object AnyPredicate to traverse all predicates. This is not
> documented yet, but you see it in the source and specs:
>
> http://code.google.com/p/scardf/source/browse/trunk/src/main/scala/or...
>
> http://code.google.com/p/scardf/source/browse/trunk/src/test/scala/or...
Reply all
Reply to author
Forward
0 new messages