Using ParameterizedSparqlString doesn't work for a couple of reasons:

1 - As Holger points out it is using dumb string substitution (the Javadoc
says as much) so doesn't necessarily substitute what you actually want
2 - It only allows a single value per variable whereas initial bindings
allows many possible values per variable

Holger's SERVICE workaround functions because internally ARQ substitutes
each possible binding once into the SERVICE clause so executes potentially
many remote calls to appropriately fulfill the SERVICE portion of the
query.

One possibility would be to inject a VALUES clause into the query though
there may be some issues with scoping and collision with existing VALUES
clauses

Feel free to open a JIRA

Rob

On 4/3/13 9:21 AM, "Martynas Jusevičius" <marty...@graphity.org> wrote:

>Hey all,
>
>QueryEngineHTTP does not implement setInitialBindings() due to Jena's
>implementation specifics, as I found out a while ago:
>http://mail-archives.apache.org/mod_mbox/jena-users/201201.mbox/%3C4F11B03
>e.7040...@apache.org%3E
>
>However, this lack of uniformity prevents generic code that depends on
>QueryExecution. Usually implementations need the same behavior no
>matter where the query is executed (locally or remotely). There was
>recently such case within SPIN API:
>https://groups.google.com/forum/?fromgroups=#!topic/topbraid-users/pMeMo-1
>U4_k
>
>So I was wondering, wouldn't it be possible to implement
>QueryEngineHTTP.setInitialBinding() using ParameterizedSparqlString?
>Now the code includes a notice related to this, but no implementation.
>
>If that looks reasonable, I can make a new issue on JIRA.
>
>Martynas
>graphity.org

Reply via email to