Hi Jorrit, Holger I'm looking for a similar approach. For each taxonomy modification (e.g. in labels) I want to trigger that update and append the "action" to another taxonomy (in my case <urn:x-evn-master:events_store_taxonomy> ) that would have the source taxonomy label, who edited, date, etc (basically keeping a history of each taxo changes in a separate taxonomy for further external process).
I'm new to ADS scripting inside EDG Sudio and without much documentation I end up creating a ttl File, adding my code as text strings under dash:js """ and finally included that file under a common ontology, which is further included in all my taxonomies, so whenever a taxonomy gets edited that CommitScript is triggered. I'm not sure that's the normal development practice with ADS or writing the code as strings there's no code completion and I relate mostly on console logs with a Trial and error programming approach. So the question is what's the best approach to go with the development if I need to get the changes of a taxo using commitScript or similar? Thank you in advance!! Valentin On Friday, February 28, 2025 at 6:09:36 PM UTC+2 Jorrit Dorman wrote: > Thanks! I'll check it out > > On Thursday, 27 February 2025 at 11:53:44 UTC+1 Holger Knublauch wrote: > >> >> On Feb 27, 2025, at 11:45, Jorrit Dorman <[email protected]> wrote: >> >> Thanks Holger, that seems to work. >> >> I've made it like this, but I was wondering if there is a more >> streamlined way to do this? Also, is there documentation available about >> the tbs functions? >> const targetGraph <urn:x-evn-master:test> ; >> >> const targetUserGraph = graph.withDataGraph( >> targetGraph, >> function getUserGraph() { >> return tbs.queryGraph(); >> } >> ); >> >> >> Looks generally Ok but could be written more compact as >> >> const targetUserGraph = graph.withDataGraph(targetGraph, tbs.queryGraph) >> >> There is no documentation on the TBS functions as an HTML page. Instead, >> you can just use auto-complete like this >> >> [image: PastedGraphic-1.png] >> >> to reach the documentation of each function. Also you can see most >> functions when you go to Reports > Web Services Swagger. >> >> Holger >> >> >> >> graph.transaction( >> targetUserGraph, >> "change message" >> function addTriples() { >> graph.addTriples(res); >> } >> ); >> On Wednesday, 26 February 2025 at 19:06:56 UTC+1 Holger Knublauch wrote: >> >>> The change history is only activated when the URI of the graph includes >>> the user name. In your case, does it, or is just something like >>> urn:x-evn-master:geo ? >>> >>> One way of getting such graphs is to call tbs.queryGraph() >>> >>> Holger >>> >>> >>> On Feb 26, 2025, at 15:33, Jorrit Dorman <[email protected]> wrote: >>> >>> Hi, >>> >>> I have an ADS script in which I get an array of triples from the current >>> graph, and I want to insert them in another graph. I use the following: >>> graph.transaction( >>> targetGraph, >>> "Changes history message", >>> function addTriples() { >>> graph.addTriples(resultSet); >>> } >>> ); >>> >>> This works as intended. The target Graph is updated with the resultSet. >>> However I do not see this in the change history of the target Graph. >>> >>> If I reverse it, and from the targetGraph start a script like this: >>> const resultSet = graph.withDataGraph( >>> sourceGraph, >>> function getTriples() { >>> return graph.construct(sparqlQuery); >>> } >>> ); >>> graph.transaction( >>> null, >>> "Changes history message", >>> function addTriples() { >>> graph.addTriples(resultSet); >>> } >>> ); >>> >>> then I do get the change history. Is it as inteded that I do not get an >>> entry in the change history when writing from another graph? Is there >>> something to I can do to get the changes? >>> >>> -- >>> The topics of this mailing list include TopBraid EDG and related >>> technologies such as SHACL. >>> To post to this group, send email to [email protected] >>> --- >>> 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]. >>> To view this discussion visit >>> https://groups.google.com/d/msgid/topbraid-users/360c4e85-30f3-482d-b7f7-20f5cbee5b58n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/topbraid-users/360c4e85-30f3-482d-b7f7-20f5cbee5b58n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> >>> >> -- >> The topics of this mailing list include TopBraid EDG and related >> technologies such as SHACL. >> To post to this group, send email to [email protected] >> --- >> 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]. >> >> To view this discussion visit >> https://groups.google.com/d/msgid/topbraid-users/4438b957-fc74-4952-a243-ce61a9feeb49n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/topbraid-users/4438b957-fc74-4952-a243-ce61a9feeb49n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- The topics of this mailing list include TopBraid EDG and related technologies such as SHACL. To post to this group, send email to [email protected] --- 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]. To view this discussion visit https://groups.google.com/d/msgid/topbraid-users/ae3581fc-e587-484a-9c14-cce418754621n%40googlegroups.com.
