Closed Jan-Marcek closed 9 years ago
fixed
we are using php5 - to find better solution without using php - to remove libapache2-mod-php5 as dependency
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:
Sparql endpoint in virtuoso supports pre-filed graph name by default using parameters:
qtxt=<SPARQL Query>
- text pre-filled in query text areadefault-graph-uri=<Graph Name>
- name of graph pre-filed in graph name fieldso 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
the secret was hidden in sparql_io.sql at procedure: WS.WS.SPARQL_ENDPOINT_GENERATE_FORM
line 2691 virtuoso version 7.2
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.