pss.setIri("node", "_:blankNodeID");

As Andy states the IRI scheme _: is treated as referring to blank nodes in
the data rather than creating a temporary variable

Rob

On 8/5/13 5:39 AM, "Holger Knublauch" <[email protected]> wrote:

>
>On Aug 5, 2013, at 6:28 PM, Andy Seaborne wrote:
>>> I cannot use ParameterizedSparqlString because it does not handle blank
>>> nodes correctly. The previous implementation using initial bindings
>>> supported this, because it didn't have to go through the string syntax.
>>> Now, when I pre-bind a variable to point to a blank node, I am getting
>>> strings like _:b0 which lose the identity of the blank node which is
>>> otherwise (fortunately) preserved throughout Jena.
>>> 
>>> I am not sure if this is fixable in SPARQL syntax - please advise
>>> whether you want me to open a JIRA ticket - but as stated elsewhere I
>>> believe the initial bindings should be brought back into the update
>>>API.
>>> 
>>> Thanks,
>>> Holger
>>> 
>> 
>> Use a URI like <_:LABEL> and you will be naming the blank node in the
>>data, not making a query variable.
>
>I don't understand this. For example, I may have an update template
>
>INSERT {
>    GRAPH <target> {
>        ?node a:p ?o .
>    }
>}
>WHERE {
>    ?node a:p ?o .
>}
>
>where ?node is supplied as a pre-bound variable. The values may be URIs
>or blank nodes, and I want the target graph to use exactly the same blank
>node. (Slightly artificial but roughly one of our use cases).
>
>What would I need to do? ?node in the WHERE clause must be exactly the
>node from the QuerySolutionMap.
>
>Thanks,
>Holger
>

Reply via email to