OpenDataNode / odn-box

0 stars 2 forks source link

SPARQL endpoint shall have prefilled graph name #6

Closed Jan-Marcek closed 9 years ago

Jan-Marcek commented 9 years ago

Motivation: SPARQL endpoint shall have prefilled graph name - when a user does click on endpoint resource in ckan then the default graph will be filled.

Jan-Marcek commented 9 years ago

fixed

Jan-Marcek commented 9 years ago

we are using php5 - to find better solution without using php - to remove libapache2-mod-php5 as dependency

hanecak commented 9 years ago

To clarify. Having "something" to achieve better usability of SPARQL enpoint is good and needed. On the other hand, we need to solve this without PHP.

Because so far no other part of ODN uses PHP. Thus, one such (even small) script would bring in lots of other dependencies: PHP, libraries, etc. Thus inflating server requirements and making updates and maintenance more difficult.

Better candidate would be something simple depending on something we already depend on:

skrchnavy commented 9 years ago

Sparql endpoint in virtuoso supports pre-filed graph name by default using parameters:

so url used to call virtuoso as with prefiled graph name is:

http://<sparql-endpoint-server/<sparql-endpoint-context>/sparql?default-graph-uri=<Graph Name>&qtxt=<SPARQL Query>

Note: when you want to run query directly and not to display query editor, then paraeter query=<SPARQL Query> is used instead of qtxt=<SPARQL Query>

Result: no extra php script is necessary

Jan-Marcek commented 9 years ago

the secret was hidden in sparql_io.sql at procedure: WS.WS.SPARQL_ENDPOINT_GENERATE_FORM line 2691 virtuoso version 7.2

Jan-Marcek commented 9 years ago

fixed by https://github.com/OpenDataNode/odn-box/commit/d7737cbf593f56f619662acdd4c229d3a72a142c