Hi,I have until recently been successfully using IO.serializeRDF in a dash:ResourceService. I'm running TBC-ME 7.0 for reasons I will explain below.However, I'm now getting an error message when I call it. My current hypothesis:1. The EDG collection that contains my code used to also include a graph "DASH Data Shapes Vocabulary", but the last time I rebuilt my workspace, that graph mysteriously no longer appears in the available graphs to include. Is it possible that IO.serializeRDF is thus not visible?
To check whether dash is really not imported you could run a
query such as
SELECT DISTINCT ?g { ?x owl:imports ?g }
in the SPARQL query panel. Under normal circumstances there is always some subgraph in your EDG graphs that will owl:import dash.
Even if not, IO.serializeRDF should be there. I checked that it
was introduced with TB 7.0.0.
What error message do you get when you invoke it?
In a possibly related problem, I also no longer see teamwork.topbraidlive.org in my TBC-ME workspace in versions higher than 7.0, and my SWP scripts depended on it. Hence, until I figure out how to adapt, I am stuck running 7.0 for my services.
Yeah, TBC 7.1 had been further simplified and decoupled from EDG. If you're a typical TBC user that has used TBC for a long time, there is really no reason to upgrade to that version.
For the latest features such as ADS improvements, EDG Studio is a much better choice as it evolves alongside the EDG product. However that requires a different license altogether.
Holger
--Help, please!
Steve
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAGUep87iDuzZ2P1%3DYn05XKDaXAfAZKxz5mv4amsBfOZ%3DRfX1Fw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/642c2262-9d60-a8d6-91a7-8a50112115e6%40topquadrant.com.
qudt:TurtleSnippet
rdf:type dash:ResourceService ;
dash:js """function collectTriples(subject, triples) {
graph.triples(subject, null, null, true).forEach(t => {
triples.push(t);
if(t.object.isBlankNode()) {
collectTriples(t.object, triples);
}
})
}
let triples = [];
collectTriples(focusNode, triples);
IO.serializeRDF(triples);""" ;
dash:responseContentType "text/turtle" ;
rdfs:label "Turtle Snippet" ;
.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/642c2262-9d60-a8d6-91a7-8a50112115e6%40topquadrant.com.
Hi Steve,
I have no explanation why it wouldn't find that function. So I would suggest we take it step by step.
When you enter IO. in the script editor, does it look like this?

The IO functions are defined in the file TopBraid\SHACL\js\io.js - can you see the function there? Maybe the file is from an older workspace from an older TopBraid version.
You should also see the definition when you open the Script API viewer:

HTH
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAGUep84HKBsFSfUErmeajjuT53JY7h3hc5E8nQ%3DiActv5rfvWA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/6796d4eb-7748-7bec-10c8-925516746ac8%40topquadrant.com.