On 08/01/13 18:52, John Capalbo wrote:
> Hello,
>
> I am working on a project where I make a REST call that returns RDF data
> as either an XML or JSON. Is there a way to use sgvizler without a
> sparql query and instead use a web service call?
Hi,
not directly, no. The reason being that the visualization functions
expect a (google data)table of data to process into, e.g., a line chart,
and this filtering of RDF data into a table is what the SPARQL query does.
What you could try is to "pipe" your RDF web service call though a
SPARQL endpoint using FROM in the SPARQL query. I don't think I have
come across this before, but I guess it should work.
Try the following (untested, sgvizler v0.5):
<div id="test"
data-sgvizler-endpoint="
http://sws.ifi.uio.no/sparql/from"
data-sgvizler-query="SELECT ?s ?p ?o { ?s ?p ?o } LIMIT 10"
data-sgvizler-rdf="ENTER YOUR REST CALL HERE"
data-sgvizler-chart="gTable"
style="width:800px; height:400px;"></div>
The endpoint at
http://sws.ifi.uio.no/sparql/from is an empty endpoint
which accepts FROM statements in SPARQL queries. You can of course use
your own.
The data-sgvizler-rdf attribute is just a sgvizler way of adding FROMs
to the SPARQL query. You can also just include the FROM directly into
the query in the data-sgvizler-query attribute.
Hope it works!
Martin