Trying to trick TBC Maestro (and TBL)

17 views
Skip to first unread message

Steve Ray (CMU)

unread,
Oct 9, 2017, 6:15:35 PM10/9/17
to topbrai...@googlegroups.com

Hi,

            I’m working on a project where our installation of TBL is called by a system that expects to issue SPARQL queries to an endpoint, rather than calling a SPARQLMotion module as a web service. Until now, I have been successfully bypassing the web service call by directly calling the associated sm:Function instead. I would issue calls to the SPARQL endpoint such as:

 

SELECT ?response WHERE {BIND (<http://epic/scripts/triplestoreOperations#myFunction>() AS ?response)}

 

…where myFunction is associated with the return module via the sm:returnModule property.

 

This works fine, even with input arguments as you might expect. However, in the past I was always using a “Return text” module.

 

What I’m trying to do now is to use a “Return RDF” module as the final module in the script, rather than “Return text”, in the hopes of a cleaner result. (The return text serializations (as JSON) contained lots of extra header info that I am hoping to avoid).  My SPARQLMotion script works fine when I call it the way your documentation expects:

 

http://localhost:8083/tbl/sparqlmotion?&id=myFunction

 

…but it comes back empty when I use the SELECT call through the SPARQL endpoint. Clearly there is some subtlety that I’m not appreciating. Can’t I bind my ?response variable to a serialized graph, as specified in the “Return RDF” module?

 

Any ideas?

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:    stev...@sv.cmu.edu

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

cid:A9ED74CE-68DA-4276-847C-3C08B21B97C0@wv.cc.cmu.edu

 

image001.png

Holger Knublauch

unread,
Oct 9, 2017, 8:19:28 PM10/9/17
to topbrai...@googlegroups.com
Hi Steve,

SM functions cannot use sml:ReturnRDF. Instead, could you try continue to use sml:ReturnText but turn the RDF graph into a string just beforehand, using smf:convertRDFToText?

HTH
Holger
--
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.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages