Skip to content

PropertyPaths

Brad Bebee edited this page Feb 13, 2020 · 1 revision

BlazeGraph support SPARQL 1.1 Property Path expressions as well as an extension (the "ALP SERVICE") that allows you to specify more complex constraints on property paths.

 #e.g. "Go three hops out in either direction from vertex <id:v0> where the edge is of type <test:foo> and the edge has <some:prop>=someVal."

 SELECT * WHERE {
 SERVICE bd:alp { " +
 <id:v0> ?edge ?to . " +
 hint:Prior hint:alp.pathExpr true .
 ?edge rdf:type <test:foo> .
 ?edge <some:prop> "someVal" .
 hint:Group hint:alp.lowerBound 1 .
 hint:Group hint:alp.upperBound 3 .
 hint:Group hint:alp.bidirectional true .
 }
 }
Clone this wiki locally
You can’t perform that action at this time.