Guil; I'm not quite understanding what you're trying to accomplish. Is it that when users enter data you want to save the changes in a separate file?
-- Scott On Apr 14, 7:32 am, Guilherme Scomparim <[email protected]> wrote: > Hi Scott and Irene, > > Finally I manage to get my scripts to work in the ensemble > application. > > Was a combination of things that you mention that guided me to be able > to play with data in the <http://tb-session> graph and also in the > current script graph. > > Unfortunately I had to find a work around for a funny result I am > dealing with. > > In case I have a sml:PerformUpdate with the following query after a > sml:ImportRDFFromWorkspace > > MODIFY GRAPH <http://tb-session> > DELETE { > ?s ?p ?o .} > INSERT { > } > > WHERE { > ?s ?p ?o . > > } > > If the URI imported is any URI previously imported that is not the > Data Graph currently opened by ensemble the query above works fine > deleting the imported triples from <http://tb-session> and I can then > identify using the following query the current triples on the <http:// > tb-session> graph without the deleted imported model > > SELECT ?subject ?predicate ?object > WHERE { > GRAPH <http://tb-session> { > ?subject ?predicate ?object . > } . > > } > > However if I import the current Data Graph opened by ensemble it seams > that no triples are deleted from the <http://tb-session>. Is this > normal or I am doing something wrong? > > The workaround was then to create a complex query to find the possible > triples that would be created using the meta-model. This is not that > elegant or reusable but is working. > > The final solution then is to > Imports the Data Graph Model using sml:ImportRDFFromWorkspace > Delete all triples using sml:FilterByConstruct > CONSTRUCT { > ?s ?p ?o . > } > WHERE { > ?s ?p ?o . > } > And then using a sml:IterateOverSelect I inserted the query that > select the possible triples created in the model using WHERE {GRAPH > <http://tb-session> > > After that I just created a series of sml:ApplyConstruct linked as > body that will build URIs of the current instantiations of the model > in the new file. > > I then create the base URI, The Imports triples and export the new > file using sml:ExportToRDFFile > > I also would like to say that I am impressed with the Debug > Functionality available in TBC for Ensemble applications that use > SPARQL Motion Scripts. Every day I like more using TBC, and I am > looking forward in testing the new features of the 3.5 version. > > Tanks again, > Guil -- 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
