bshambaugh / node-arc-d3

Visualization of Triples
5 stars 0 forks source link

Get the SPARQL Query Box working #24

Open bshambaugh opened 7 years ago

bshambaugh commented 7 years ago

Starting out:

The code in (https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/jquerysparql/c-jqueryn3lib.js) builds:

http://localhost:8080/marmotta/sparql?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2014

It should call something like:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/libraries/fn_ldpsparql.js

bshambaugh commented 7 years ago

It looks like the current pipeline is: d3sketch ==> createprimatives ===> parsetriples...

The parse triples code appears to be written to accept ldp, sparql, and file type urls

so calling d3sketch will probably work...

to test do parse triples???

bshambaugh commented 7 years ago

There is a page called index2, where I can test the sparql query:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/jquerysparql/index2.html

http://localhost/bc-node-arc-d3/node-arc-d3/js/tests/jquerysparql/index2.html

bshambaugh commented 7 years ago

The next thing I need is some code that does the sparql query...

bshambaugh commented 7 years ago

curl http://localhost:8080/marmotta/sparql/select?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2014

http://localhost:8080/marmotta/sparql?query=SELECT%20*%20WHERE%20%7B%0A%20%20%3Fsubject%20%3Fproperty%20%3Fobject%0A%7D%0ALIMIT%2010

bshambaugh commented 7 years ago

This works:

curl http://localhost:8080/marmotta/sparql/select?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2014

and

curl http://localhost:8080/marmotta/sparql/select?query=SELECT%20*%20WHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%20LIMIT%2010

matches the results of bringing up index2.html

bshambaugh commented 7 years ago

Unfortunately, queries looking like this do not work:

SELECT * WHERE { ?subject ?property ?object } LIMIT 10

ToDO: Encode this URI in fn_ldpsparql so it looks something like:

curl http://localhost:8080/marmotta/sparql/select?query=SELECT%20*%20WHERE%20%7B%3Fsubject%20%3Fproperty%20%3Fobject%7D%20LIMIT%2010