Hi Colin,

Export to RDF file actually does what it says on the tin—it exports the results 
to an RDF file in the workspace. It doesn't work for updating a graph in the 
system database.

The closest equivalent to Import RDF from Workspace in the other direction is 
Perform Update, but that is not entirely safe to use for EDG graphs such as the 
urn:x-evn-master:xxx ones.

Personally I would use SWP over SPARQLMotion for this kind of task. It's much 
closer to a traditional programming/scripting language (but with a very strange 
syntax, and an RDF/SPARQL-based type system).

Richard


> On 4 Jun 2020, at 14:03, Colin Meerveld <colin.meerv...@gmail.com> wrote:
> 
> Hi Richard,
> 
> Still a bit confused. Currently i want to do the opposite. i.e.  add data to 
> EDG similar to the following SPARQL query:
> 
> INSERT {
>       GRAPH ?graph {
>       ?s rdfs:comment ?annotation .
>       }
> }
> WHERE {
>       BIND("archimate_example_model" AS ?workspace).
>       BIND("aangifte" AS ?station).
>       BIND("test3" AS ?annotation).
>     BIND (URI(CONCAT("urn:x-evn-master:", ?workspace)) AS ?graph) .
>     GRAPH ?graph {
>         ?s rdfs:label ?station .
>     } .
> }
> 
> This query works in Composer. I translated this into a sparqlmotion script 
> where the first three binds are arguments and uses an apply construct node to 
> construct the new nodes.   Lastly i use the Export-to-RDF-file node to save 
> the constructed triples back in the asset collection. However the last step 
> doesn't work. Any thoughts?
> 
> Thanks,
> 
> Colin
> 
> p.s. the source: 
> https://github.com/btotr/metromap/blob/development/put-annotation.sms.ttl 
> <https://github.com/btotr/metromap/blob/development/put-annotation.sms.ttl>
> 
> 
> 
> On Friday, April 24, 2020 at 2:14:39 PM UTC+2, Richard Cyganiak wrote:
> Yes, EDG has the same kind of workspace as TBC underneath, although in EDG it 
> is usually somewhat hidden behind a higher-level abstraction (an 
> RDF/SPARQL-style “set of named graphs”, which in turn is somewhat hidden 
> behind the “asset collection” abstraction).
> 
> The name of the “Import RDF From Workspace” module might be a bit unhelpful 
> when using it with the sml:baseURI argument. Think of it as “Load triples 
> from a system-managed graph into a SPARQLMotion script”.
> 
> Richard
> 
> 
>> On 24 Apr 2020, at 07:41, Colin Meerveld <colin....@gmail.com <>> wrote:
>> 
>> Hi Richard,
>> 
>> Great, this works, thank you so much! I never knew that a workspace was 
>> referring to an EDG asset collection as i always thought this was a 
>> composer/eclipse workspace. 
>> 
>> Colin 
>> 
>> On Thursday, April 23, 2020 at 10:22:50 AM UTC+2, Richard Cyganiak wrote:
>> Hi Colin,
>> 
>> I think what you need to do is:
>> 
>> 1) Get the graph URI of the asset collection containing the EDG instances. 
>> This can be found on the Settings tab of the asset collection and is a URI 
>> of the form urn:x-evn-master:...
>> 
>> 2) In the SPARQLMotion script, use the Import RDF From Workspace module, 
>> with that graph URI as the sml:baseURI, and sml:ignoreImports set to true or 
>> false depending on whether you want to include triples from other included 
>> asset collections and system graphs
>> 
>> 3) Any further SPARQLMotion modules in the chain now have access to the 
>> triples from the EDG asset collection.
>> 
>> Hope that helps,
>> Richard
>> 
>> 
>>> On 23 Apr 2020, at 07:33, Colin Meerveld <colin....@ <>gmail.com 
>>> <http://gmail.com/>> wrote:
>>> 
>>> Hi,
>>> 
>>> I created a sparqlmotion service to convert RDF to XML. For asserted 
>>> triples which are deployed to EDG this seems to work fine. However, newly 
>>> created instances within EDG doesn't work. I currently use the import 
>>> module (see screenshot) and believe this must be changed to an EDG context 
>>> (e.g. an EDG exposed graph) but don't know how to practically do this. Some 
>>> assistance would be appreciated.
>>> 
>>> 
>>> <sparqlmotion.jpg>
>>> 
>>> 
>>> Thanks,
>>> 
>>> Colin Meerveld
>>> 
>>> -- 
>>> 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 topbrai...@ <>googlegroups.com <http://googlegroups.com/>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> <sparqlmotion.jpg>
>> 
>> 
>> -- 
>> 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 topbrai...@googlegroups.com <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/5aec5131-0925-4045-bd90-d0755ac58bad%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/5aec5131-0925-4045-bd90-d0755ac58bad%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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 topbraid-users+unsubscr...@googlegroups.com 
> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/ce17f04c-27d4-4b73-be0a-9ced164c3b9d%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/ce17f04c-27d4-4b73-be0a-9ced164c3b9d%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/75C43D26-3085-4482-9260-960C1BBEEFAD%40topquadrant.com.

Reply via email to