Scott,
That works! I tried this out, by coupling a "Bind By Select" to a "Perform
Update" but have a question on how "PerformUpdate" figures out it can use
?updateQuery instead of the sml:updateQuery property? When I first tried this,
I tried to bind {?updateQuery} to sml:updateQuery, but that did not work, and
on re-reading your email, I realized that you had simply told me to pass a
string query bound to ?updateQuery to "Perform Update". Does this only work
for "perform update" or are there other modules where you can bind to a value
to a variable that is named the same as a property on a downstream module?
Regards
Arthur
FYI: I used the "Bind by select" SMS module to bind the query:
SELECT ?updateQuery
WHERE {
LET (?updateQuery := "INSERT INTO <http://tb-session> { :Aron rdf:type
owl:Thing } WHERE {}") .
}
Then connected it to a "Perform Update" SMS module
Run the script
Arthur
On Apr 26, 2010, at 11:08 AM, Scott Henninger wrote:
> Arthur; You can pass a string bound to ?updateQuery to a
> PerformUpdate module. Of course, you will need to make sure that the
> query is correct syntactically, including any bindings at run-time.
>
> -- Scott
>
> On Apr 21, 6:05 pm, Arthur Keen <[email protected]> wrote:
>> Holger,
>>
>> Thanks very much for clarifying this.
>>
>> Arthur
>>
>> On Apr 21, 2010, at 5:59 PM, Holger Knublauch wrote:
>>
>>
>>
>>> I would not recommend going down this route. Theoretically it might be
>>> enough to insert the missing triple into the SPIN expression tree, but I
>>> don't think this would be a clean and maintainable solution. It goes too
>>> far into the area of metaprogramming, even for my taste.
>>
>>> Holger
>>
>>> On Apr 22, 2010, at 8:55 AM, Arthur Keen wrote:
>>
>>>> Could I use the "Convert string to RDF" to construct the query in
>>>> SPARQLMotion to achieve the same outcome as your jena suggestion?
>>
>>>> On Apr 21, 2010, at 5:49 PM, Holger Knublauch wrote:
>>
>>>>> Yes with Jena this is possible. Basically you would need to create the
>>>>> SPARQL query string dynamically, and insert the URI of the target graph
>>>>> before compiling it into a Query object.
>>
>>>>> But since the ARQ parser won't allow variables as named graphs, we do not
>>>>> support this in SPIN yet.
>>
>>>>> Holger
>>
>>>>> On Apr 22, 2010, at 8:44 AM, Arthur Keen wrote:
>>
>>>>>> Holger,
>>
>>>>>> I was inspired to look at named graphs by a paper by Jeremy Carol's on
>>>>>> using named graphs (instead of statement reification) for provenance
>>>>>> (published around 2003), in which he shows how one could insert the
>>>>>> statements resulting from a particular decision into a named graph and
>>>>>> assert the rationale (provenance) for the decision as statements about
>>>>>> the named graph, so that the provenance for a series of decisions
>>>>>> (statements and rationale) could be captured in a series of named
>>>>>> graphs.
>>
>>>>>> When I tried to do this in SPARQL, I found that I could not construct an
>>>>>> INSERT INTO for an arbitrary graph, which would be created at the
>>>>>> decision point. So I thought I could leverage SPIN Template
>>>>>> functionality to create graph-specific SPARQL INSERT INTO <graph>
>>>>>> queries, but from your email, I understand that that won't work either.
>>>>>> These kinds of things are probably easy to do inside Jena.
>>
>>>>>> Arthur
>>
>>>>>> On Apr 19, 2010, at 3:43 PM, Holger Knublauch wrote:
>>
>>>>>>> Hi Arthur,
>>
>>>>>>> I guess the underlying issue is that SPARQL has no formal notion of
>>>>>>> pre-bound variables. In SPIN templates (and many other real-world
>>>>>>> applications), those pre-bound variables are very convenient and
>>>>>>> powerful, but without this concept, having a variable as graph URI does
>>>>>>> not make sense, because the SPARQL queries would not be self-contained.
>>
>>>>>>> I have no plans to move SPIN beyond what ARQ (Jena's SPARQL engine) is
>>>>>>> able to parse as this would have a lot of undesired implications. Maybe
>>>>>>> a future SPARQL version adds a proper concept for pre-bound variables.
>>>>>>> I will try to follow up on this topic elsewhere, but in the meantime I
>>>>>>> am not aware of work-arounds for your use case.
>>
>>>>>>> Thanks,
>>>>>>> Holger
>>
>>>>>>> On Apr 20, 2010, at 2:47 AM, Arthur Keen wrote:
>>
>>>>>>>> The SPARQL form: INSERT INTO <graph> does not allow a variable for the
>>>>>>>> graph so something like INSERT INTO ?graph{...} WHERE GRAPH
>>>>>>>> ?graph{...} is not valid SPARQL.
>>>>>>>> I tried to get around this constraint by parametrizing the query in a
>>>>>>>> spin template so that I could create valid queries from the template
>>>>>>>> by passing in a parameter sp:arg1 for the graph into the template,
>>>>>>>> e.g., INSERT INTO ?arg1{...} WHERE..., but the syntax checker on the
>>>>>>>> SPIN Template will not let it through. Is this the way to do this or
>>>>>>>> is there some other way?
>>
>>>>>>>> Arthur
>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Group "TopBraid Suite Users", the topics of which include TopBraid
>>>>>>>> Composer,
>>>>>>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>>>>>>> To post to this group, send email to
>>>>>>>> [email protected]
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> [email protected]
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Group "TopBraid Suite Users", the topics of which include TopBraid
>>>>>>> Composer,
>>>>>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>>>>>> To post to this group, send email to
>>>>>>> [email protected]
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> [email protected]
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Group "TopBraid Suite Users", the topics of which include TopBraid
>>>>>> Composer,
>>>>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>>>>> To post to this group, send email to
>>>>>> [email protected]
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected]
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Group "TopBraid Suite Users", the topics of which include TopBraid
>>>>> Composer,
>>>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>>>> To post to this group, send email to
>>>>> [email protected]
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Group "TopBraid Suite Users", the topics of which include TopBraid
>>>> Composer,
>>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>>> To post to this group, send email to
>>>> [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
>>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>>> To post to this group, send email to
>>> [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/topbraid-users?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
>> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
>> To post to this group, send email to
>> [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group
>> athttp://groups.google.com/group/topbraid-users?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en