Closed vemonet closed 1 year ago
@vemonet I've released a new version with the merge request. Could you check if the issue still applies?
Thanks a lot @GerwinBosch !
We are going to present our use of the ldwizard at a conference about digital story telling next week. I will try to update our instance to use directly your code asap and will close the issue if it works as expected
@mightymax Let's test whether this bug is now solved, and if so then close.
Hi, I am trying to use a different SPARQL endpoint than TriplyDB for predicate and class completion
Unfortunately it seems that the LDWizard expect the SPARQL endpoint to return JSON by default (for example see: https://api.data.netwerkdigitaalerfgoed.nl/datasets/ld-wizard/sdo/services/sparql/sparql?query=select%20*%20where%20{?s%20?p%20?o%20.}%20limit%2010 )
If I try to use a Ontotext GraphDB or a Virtuoso triplestore I am getting
It's because by default GraphDB returns CSV, and Virtuoso returns XML!
It should be fixed by adding an
Accept
header to the HTTP query executed byfetch
here: https://github.com/netwerk-digitaal-erfgoed/LDWizard-Core/blob/master/src/config/sparqlSearch.ts#L100The problem is that currently LDWizard supports a simple, but non-standard JSON serialization for the SPARQL results:
But it should use
application/sparql-results+json
that looks like this:I implemented a fix to use the standard SPARQL results JSON format, and make the sparqlAutocomplete work with most SPARQL endpoints. I tested it on GraphDB and the default TriplyDB. I'll make a pull request asap