Re: [topbraid-users] Sparqlmotion working with EDG context

2020-06-05 Thread Colin Meerveld
Thanks again Richard! 

I played around with the Perform update node for a while but somehow it 
doesn't update the EDG graph. This is, i suppose, why you need SWP. I use 
SWP only for UI to keep it separated from the (web)services which makes it 
more readable. 

Another option, i guess, is to use a graphgl endpoint but the project 
already uses a couple of sparqlmotions scripts and i don't like to mix 
those different abstraction into one project. Currently i use a 
sparqlmotion service and return a swp document so-that i could set the 
context. This feels like a hack but does the job. 

Here is the final solution:





done!




Cheers,

Colin


  

On Thursday, June 4, 2020 at 8:16:06 PM UTC+2, Richard Cyganiak wrote:
>
> 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 > 
> 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
>
>
>
> 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  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  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.
>>>
>>>
>>> 
>>>
>>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>>>  
>>> 

Re: [topbraid-users] Sparqlmotion working with EDG context

2020-06-04 Thread Richard Cyganiak
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  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 
> 
> 
> 
> 
> 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 > 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 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.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 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 .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>>>  
>>> .
>>> 
>> 
>> 
>> -- 
>> 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
>>  
>> 

Re: [topbraid-users] Sparqlmotion working with EDG context

2020-06-04 Thread Colin Meerveld
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



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  > 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  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.
>>
>>
>> 
>>
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>>  
>> 
>> .
>> 
>>
>>
>>
> -- 
> 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
>  
> 
> .
>
>
>

-- 
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/ce17f04c-27d4-4b73-be0a-9ced164c3b9d%40googlegroups.com.


Re: [topbraid-users] Sparqlmotion working with EDG context

2020-04-24 Thread Richard Cyganiak
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  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 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.
>> 
>> 
>> 
>> 
>> 
>> 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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>>  
>> .
>> 
> 
> 
> -- 
> 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/5aec5131-0925-4045-bd90-d0755ac58bad%40googlegroups.com
>  
> .

-- 
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/877B70F4-EF26-4F17-8360-5A6B28A20DDB%40topquadrant.com.


Re: [topbraid-users] Sparqlmotion working with EDG context

2020-04-24 Thread Colin Meerveld
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  > 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.
>
>
> 
>
> 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 .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/c3107eba-bb3d-4d05-b337-932fae67d92c%40googlegroups.com
>  
> 
> .
> 
>
>
>

-- 
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/5aec5131-0925-4045-bd90-d0755ac58bad%40googlegroups.com.


Re: [topbraid-users] Sparqlmotion working with EDG context

2020-04-23 Thread Richard Cyganiak
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  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.
> 
> 
> 
> 
> 
> 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 topbraid-users+unsubscr...@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
>  
> .
> 

-- 
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/42FFF67A-AB0A-4689-BDAF-FB1C121045A4%40topquadrant.com.