Addendum:
Oddly, while it worked on my development machine (with small graphs), when I deployed it to our TBL instance, it hung indefinitely. It is true that the second graph in TBL contains many triples, so maybe it would have eventually returned, but after about 5 minutes I just halted tomcat. So, I’m going to hold off on searching both graphs in the same call… - 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: steve....@sv.cmu.edu Phone: (650) 587-3780 Cell: (202) 316-6481 Skype: steverayconsulting cid:A9ED74CE-68DA-4276-847C-3C08B21B97C0@wv.cc.cmu.edu From: topbraid-users@googlegroups.com [mailto:topbraid-users@googlegroups.com] On Behalf Of Steve Ray Sent: Wednesday, September 12, 2018 11:57 AM To: topbraid-users@googlegroups.com Subject: RE: [topbraid-users] Use of FROM inside CONSTRUCT Yup. That works – should have thought of that myself. Thanks for explaining the mystery. - 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: steve....@sv.cmu.edu Phone: (650) 587-3780 Cell: (202) 316-6481 Skype: steverayconsulting cid:A9ED74CE-68DA-4276-847C-3C08B21B97C0@wv.cc.cmu.edu From: topbraid-users@googlegroups.com [mailto:topbraid-users@googlegroups.com] On Behalf Of Richard Cyganiak Sent: Wednesday, September 12, 2018 11:29 AM To: topbraid-users@googlegroups.com Subject: Re: [topbraid-users] Use of FROM inside CONSTRUCT Hi Steve, sml:ApplyConstruct has a hack where it interprets the FROM clause in a non-standard way: It interprets the first FROM clause as a SPARQL endpoint URL, and sends the query for execution to that remote endpoint. In your case, the URI in the FROM clause of course isn’t a SPARQL endpoint, so it doesn’t respond in the expected way, and hence the error. This means you can’t use FROM for its intended purpose with sml:ApplyConstruct. You could try using two “Import RDF from workspace” to load the two graphs from their base URIs, and connect them both as inputs to sml:ApplyConstruct. Hope that helps, Richard On 12 Sep 2018, at 19:00, Steve Ray (CMU) <steve....@sv.cmu.edu> wrote: Hi, I have a working SPARQLMotion script that contains an sml:ApplyConstruct module with the following SPARQL query: CONSTRUCT { ?s ?p ?o . } WHERE { GRAPH < <http://siemens.com/vocab/kps/epic_instances> http://siemens.com/vocab/kps/epic_instances> { BIND (spif:buildURI(?tag) AS ?tagURI) . ?s < <http://siemens.com/schemas/kps/epic#hasTag> http://siemens.com/schemas/kps/epic#hasTag> ?tagURI . ?s ?p ?o . } . } (?tag is passed in as a variable). I want to expand the search to two graphs, so I changed the query to: CONSTRUCT { ?s ?p ?o . } FROM < <http://siemens.com/vocab/kps/epicArchive> http://siemens.com/vocab/kps/epicArchive> FROM < <http://siemens.com/vocab/kps/epic_instances> http://siemens.com/vocab/kps/epic_instances> WHERE { BIND (spif:buildURI(?tag) AS ?tagURI) . ?s < <http://siemens.com/schemas/kps/epic#hasTag> http://siemens.com/schemas/kps/epic#hasTag> ?tagURI . ?s ?p ?o . } …but this gives the following error: HTTP ERROR: 500 Problem accessing /tbl/sparqlmotion. Reason: An internal error has been reported by the SPARQLMotion engine of TopBraid Live. Summary: [Endpoint returned Content Type: text/html which is not a valid RDF syntax] Details: org.apache.jena.query.QueryException: Endpoint returned Content Type: text/html which is not a valid RDF syntax at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConstructWorker(QueryEngineHTTP.java:491) at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel(QueryEngineHTTP.java:440) ... more The odd thing is that the same query works inside a SPARQL query pane in TBC Maestro. 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: <mailto:steve....@sv.cmu.edu> steve....@sv.cmu.edu Phone: (650) 587-3780 Cell: (202) 316-6481 Skype: steverayconsulting <image001.png> -- 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 <mailto:topbraid-users+unsubscr...@googlegroups.com> topbraid-users+unsubscr...@googlegroups.com. For more options, visit <https://groups.google.com/d/optout> https://groups.google.com/d/optout. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Virus-free. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> www.avg.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. For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.