On 6/01/2018 10:12, Steve Ray wrote:
Thanks, Holger,
This might really help. My application is one where we have been
providing a service via the TBL SPARQL endpoint, and we’ve had the
clients send SPARQL queries in which they call various SPIN functions
which are the underlying functions of SPARQLMotion scripts. The
scripts have been parsing XML (using Semantic XML against a known
standard that provides the .xsd files), then invoking SPINMap to
transform the data into our own native schema.
Now, we’d like to do the same with JSON, so I have a number of questions:
1.Can I continue to use SPARQLMotion with the swon library?
2.If not, and I migrate to SWP, is it still possible to invoke our
services via the SPARQL endpoint? In other words, are there function
calls that can be embedded within SPARQL queries to the endpoint? The
client code is not set up to directly make web service calls.
Just to give you a feel for the interface we offer, a sample call to
our endpoint currently is:
SELECT ?response WHERE {BIND
(<http://epic/scripts/triplestoreOperations#XMLInsert2>("""<?xml
version="1.0" encoding="UTF-8" standalone="yes"?>…<lots of
XML>""") AS ?response)}
Yes this should work, either with ui:Functions or functions backed by
SPARQLMotion scripts (which then use sml:CreateSWPDocument internally).
In the case of 5.5 (which is BTW scheduled for quite soon), you could
call <ui:json ui:str="{= ?json }">... where ?json is the parameter from
the client. Or use the corresponding mechanisms of swon:parse.
Holger
- 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: [email protected]
Phone: (650) 587-3780
Cell: (202) 316-6481
Skype: steverayconsulting
cid:[email protected]
*From:*[email protected]
[mailto:[email protected]] *On Behalf Of *Holger Knublauch
*Sent:* Friday, January 05, 2018 3:42 PM
*To:* [email protected]
*Subject:* Re: [topbraid-users] Semantic JSON capability in TopBraid?
Hi Steve,
we acknowledge that JSON processing is very important and have just
added new capabilities to 5.5.
I assume you are aware of the SWP SWON namespace, used primarily for
generating JSON from RDF. See
http://uispin.org/swon.html
This includes some basic facilities for parsing JSON too:
http://uispin.org/swon.html#parse
The RDF triples created from JSON may be too verbose for some use
cases, so we have just added something into the ui: namespace itself
for 5.5:
http://uispin.org/ui.html#json
The latter approach allows you to selectively walk through a JSON
structure using SPARQL.
All these are SWP-related capabilities because in our experience, JSON
processing is part of some other processing steps, in particular web
service calls.
What would your requirements be? Do you have .json files in your
workspace that you want to open similar to Semantic XML?
Regards,
Holger
PS: If you have any control over the JSON that is used, obviously
JSON-LD would be the ideal solution for RDF interoperability. Custom
@contexts give you quite some flexibility.
On 6/01/2018 9:02, Steve Ray (CMU) wrote:
Hi,
With the increasing appearance of JSON as an exchange encoding, I
was hoping TopQuadrant would release a “Semantic JSON” capability,
analogous to the Semantic XML capability you already offer. I have
been working on recreating this on my own, but am realizing it is
not as easy as I had hoped.
Is this being considered? As a fall-back, I tried using open
source tools to convert my JSON into XML and then use your
Semantic XML. I was not successful.
- 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: [email protected] <mailto:[email protected]>
Phone: (650) 587-3780
Cell: (202) 316-6481
Skype: steverayconsulting
cid:[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]
<mailto:[email protected]>.
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 [email protected]
<mailto:[email protected]>.
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 [email protected]
<mailto:[email protected]>.
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 [email protected].
For more options, visit https://groups.google.com/d/optout.