On 01/07/15 05:27, Holger Knublauch wrote:
Hi Andy,
this looks great, and is just in time for the ongoing discussions in the
SHACL group. I apologize in advance for not having the bandwidth yet to
try this out from your branch, but this topic will definitely bubble up
in the priorities soon...
On 01/07/15 07:17, Claude Warren wrote:
SelectBuilder sb = new SelectBuilder()
.addVar( * )
.addWhere( ?s, ?p, ?o );
sb.setVar( Var.alloc( ?o ), NodeFactory.createURI(
http://xmlns.com/foaf/0.1/Person; ) ) ;Query q = sb.build();
Hi Claude,
Should that be one of
Var.alloc( o )
The QueryBuilder also has parameterized variables of a type.
Basically you can construct the query with variables and then replace the
variable with a value by calling setVar() just before calling build.
SelectBuilder sb = new SelectBuilder()
.addVar( * )
.addWhere( ?s, ?p, ?o );
Hi Andy,
this looks great, and is just in time for the ongoing discussions in the
SHACL group. I apologize in advance for not having the bandwidth yet to
try this out from your branch, but this topic will definitely bubble up
in the priorities soon...
I have not fully understood how the
For completeness:
A 3rd option is injecting a VALUEs at the start of the query:
SELECT ?x
WHERE
{ ?s :p ?x
FILTER ( ?x 57 )
}
and ?x = :X
PREFIX : http://example/
SELECT ?x
WHERE
{ VALUES ?x { :X }
?s :p ?x
FILTER ( ?x 57 )
}
Like PQ, it's
(info / discussion / ...)
In working on JENA-963 (OpAsQuery; reworked handling of SPARQL modifiers
for GROUP BY), it was easier/better to add the code I had for rewriting
syntax by transformation, much like the algebra is rewritten by the
optimizer. The use case is rewriting the output of