Hello, Tim;  I'm not yet clear how your use case deviates from normal SPARQLMotion data pipelines.  I.e. if the need to modify the "triple stream" is within the session, then using ApplyConstruct (with replace = true or false depending on required behavior) or FilterByConstruct should work. 

Admittedly, this can mean complex data flows if the processing is not straightforward, but the complexity could be mitigated by creating SPARQLMotion functions that address the non-linear flows as part of module processing.  The best way to create a SPARQLMotion function is to choose a few modules representing a sub-flow and use 'Extract SPARQLMotion Function...' in the top icon bar of the SM work area.  If you're not familiar with this, let us know and we can supply examples, etc.

If it is more convenient to view the constructed data as a session object instead of a data flow, then one suggestion is to create a SWP module that uses ui:tempGraph.  See http://uispin.org/ui.html#tempGraph for more.  Though not stated in that page, there are multiple tempGraphs available by adding a number to the end - i.e. ui:tempGraph{1..n}.

ui:createSessionGraph is similar to ui:tempGraph, except that you have an option to include a named graph.  In both cases, these are only available in a SWP context, hence the null pointer exceptions in other contexts.

SWP modules can be called from a SPARQLMotion script via CreateSWPDocument and many of the SPARQLMotion modules can be called from SWP, using an XML syntax with attribute definitions for the modules.

So all of that is mostly informational, and let us know where it does and does not help.  Perhaps with a more concrete example, here or offline, we could provide a response that is a bit more concrete.

-- Scott

On 12/29/2014 9:43 AM, Tim Smith wrote:
Hi,

I've created an SM script that extracts a number of triples from various graphs to create what I need to be a "working graph" that I can update (Insert/Delete) while it sits in memory.  The output of the script is the updated graph that is returned via a REST service.

I'm running into a problem when I attempt to use the PerformUpdate module to update the graph.  Of course the graph I need to update is the incoming graph which I understand is not update-able.  I've been attempting to find the proper way to create the equivalent of a Session Graph; i.e. something that only exists while the script is executing. 

I've tried using Create Session Graph.  However, I receive a null pointer exception when the module executes.

Any suggestions on how to solve this problem?  My fallback is to create an empty file in the workspace and push the incoming graph into this graph then use PerformUpdate to update that graph.

Thanks in advance for your help,

Tim
 
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages 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 Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages 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 Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to