There is information on the SPARQLMotion debugger on Holger's blog: http://composing-the-semantic-web.blogspot.com/2010/03/sparqlmotion-debugger.html
-- Scoty On May 28, 5:11 pm, Arthur Keen <[email protected]> wrote: > Thanks. I see what happened: Setting replace = true in the ApplyConstruct > module clobbered the spin:constructor, so the ApplyTopSpin module did not > see the spin:constructor. Your example helped a lot with understanding how > to use the SMS debugger. I did not realize it persisted the debug queries, > also your suggestion of toggling replace between true and false on modules > is also a great debugging idea. Pretty cool, it lets you see exactly what > the script is processing. > > Thanks > > Arthur > > On Fri, May 28, 2010 at 5:09 PM, Arthur Keen <[email protected]>wrote: > > > Thanks. I see what happened: Setting replace = true in the ApplyConstruct > > module clobbered the spin:constructor, so the ApplyTopSpin module did not > > see the spin:constructor. Your example helped a lot with understanding how > > to use the SMS debugger. I did not realize it stored debug queries and you > > can toggle replace between true and false on modules to more easily see what > > is going on. Pretty cool, it lets you see exactly what the script is > > processing. > > > Thanks > > > Arthur > > > On May 27, 2010, at 8:05 PM, Scott Henninger wrote: > > > Arthur, attached is a partial example that will create a triples from the > > constructor. To test it, put both files in a Composer workspace, open the > > script and run debug on the PerformUpdate (or ApplyTopSPIN in the example). > > I've set replace=true to show that the constructor is called and creates the > > appropriate triple. > > > Not having an example of your model, it would be pretty time consuming to > > reproduce your queries. One suggestion is to test whether the Construct > > query is OK in your SPARQL view. This could cause the constructor query to > > fail. > > > -- Scott > > > On 5/27/10 5:20 PM, Arthur Keen wrote: > > > Scott, I have tried this a few ways > > > PerformUpdate ---> ApplyTopSpin (sml:predicate = spin:constructor, > > sml:replace = false, sml:singlePass = false) > > ApplyConstruct(sml:replace=*true*) ---> ApplyTopSpin (sml:predicate = > > spin:constructor, sml:replace = false, sml:singlePass = false) > > -->PerformUpdate > > > The constructor does not get triggered on these. If the constructor > > feature does not trigger from ApplyTopSPIN, then I will move the > > constructors into the sparql-motion scripts. > > > Regards > > Arthur > > > This is the construct query on the ApplyConstruct variant > > *CONSTRUCT* { > > ?newProject a < > >http://www.objectreservoir.com/owl/2010/02/22/project#WellPhase1Project> . > > ?newProject rdfs:label ?projectLabel . > > ?selectedResource well:projects ?newProject . > > } > > *WHERE* { > > *LET* (?wellName := afn:localname(?selectedResource)) . > > *LET* (?ns := afn:namespace(?selectedResource)) . > > *LET* (?newProject := smf:buildURI("{?ns}{?wellName}_Phase_1_Project")) > > . > > ?selectedResource rdfs:label ?wellLabel . > > *LET* (?projectLabel := fn:concat(?wellLabel, " Phase 1 Project")) . > > } > > > Here is the Constructor > > *CONSTRUCT* { > > _:b0 a :AcquireData . > > *?this* :tasks _:b0 . > > _:b1 a :ImportData . > > _:b0 :nextTask _:b1 . > > *?this* :tasks _:b1 . > > _:b2 a :CleanupData . > > _:b1 :nextTask _:b2 . > > *?this* :tasks _:b2 . > > _:b3 a :PromoteToReady . > > _:b2 :nextTask _:b3 . > > *?this* :tasks _:b3 . > > _:b4 a :Task_Perform_Diagnostics . > > _:b3 :nextTask _:b4 . > > *?this* :tasks _:b4 . > > _:b5 a :Task_LPPM_Fit . > > _:b4 :nextTask _:b5 . > > *?this* :tasks _:b5 . > > _:b6 a :Task_Develop_Stochastics . > > _:b5 :nextTask _:b6 . > > *?this* :tasks _:b6 . > > _:b7 a :Task_LPPM_Forecast . > > _:b6 :nextTask _:b7 . > > *?this* :tasks _:b7 . > > _:b8 a :Task_Analytics_Report . > > _:b7 :nextTask _:b8 . > > *?this* :tasks _:b8 . > > _:b9 a :ExportData . > > _:b2 :nextTask _:b9 . > > *?this* :tasks _:b9 . > > } > > *WHERE* { > > } > > > This is the insert query on the PerformUpdate variant > > *INSERT* *INTO* <http://tb-session> { > > ?newProject a < > >http://www.objectreservoir.com/owl/2010/02/22/project#WellPhase1Project> . > > ?newProject rdfs:label ?projectLabel . > > ?selectedResource well:projects ?newProject . > > } > > *WHERE* { > > *LET* (?wellName := afn:localname(?selectedResource)) . > > *LET* (?ns := afn:namespace(?selectedResource)) . > > *LET* (?newProject := smf:buildURI("{?ns}{?wellName}_Phase_1_Project")) > > . > > ?selectedResource rdfs:label ?wellLabel . > > *LET* (?projectLabel := fn:concat(?wellLabel, " Phase 1 Project")) . > > } > > > On Wed, May 26, 2010 at 10:38 PM, Scott Henninger < > > [email protected]> wrote: > > >> Arthur; Is there a specific event you want to trigger a constructor > >> on? If it is when a triple is created by a ApplyConstruct that has a > >> rdf:type as the property, then you'll need to pass all of those > >> triples to TopSPIN running on spin:constructor. So you'd have an > >> ApplyConstuct with replace=true with the query: > > >> CONSTRUCT {?uri rdf:type ?value} > >> WHERE { ... } > > >> and sm:next is ApplyTopSPIN with sml:predicate set to > >> spin:constructor. > > >> -- Scott > > >> On May 26, 5:42 pm, Arthur Keen <[email protected]> wrote: > >> > I had tried running topspin on spin:constructor to see if it would work > >> like > >> > a spin:rule, but it did not trigger the constructor. > >> > Thanks > >> > Arthur > > >> > On Wed, May 26, 2010 at 5:23 PM, Scott Henninger < > >> [email protected] > > >> > > wrote: > >> > > <Is there a way to ensure the constructors > >> > > > trigger when creating instances in sparqlmotion?> > > >> > > Yes, you can run TopSPIN on the property spin:constructor. Composer > >> > > has specific triggers to run the constructors, and you need to tell > >> > > the SPARQLMotion script when it should be executed. > > >> > > -- Scott > > >> > > On May 26, 4:58 pm, Arthur Keen <[email protected]> wrote: > >> > > > I have a sparqlmotion script that creates instances of owl:class > >> Project. > >> > > > Project and Tasve has a spin:constructor for creating a default > >> task > >> > > > network and assigning it to Project. When I create a project using > >> the > >> > > > Composer instance form, the task network gets created and bound to > >> the > >> > > > project instance, however, when I use the sparqlmotion script, the > >> > > > constructors do not trigger. Is there a way to ensure the > >> constructors > >> > > > trigger when creating instances in sparqlmotion? > > >> > > > Thanks > >> > > > 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]<topbraid-users%[email protected]> > >> <topbraid-users%[email protected]<topbraid-users%[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]<topbraid-users%[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 > > <ConstructorExample_Script.sms.ttl><ConstructorExample_SPIN.ttl> -- 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
