RDFIO icon indicating copy to clipboard operation
RDFIO copied to clipboard

RelFinder integration "output=xml"

Open rhaubt opened this issue 8 years ago • 1 comments

Hi,

I'm using the Semantic MediaWiki extension and RDFIO and would like to integrate RelFinder http://www.visualdataweb.org/relfinder.php

  • MediaWiki 1.26.2
  • Semantic MediaWiki | 2.4.6
  • RDFIO | v2.0.9

The problem that I am having is that RelFinder and the SPARQL-Server use different parameter descriptions for the returned formats. RelFinder is sending "format=XML", which the server does not understand and only returns the HTML page. The server needs "output=xml" (case-sensitive) instead.

Is it possible to configure this somewhere?

Thank you for your support :)

rhaubt avatar Sep 14 '17 11:09 rhaubt

Hi @rhaubt, Thanks for reporting! (Also, relfinder looks interesting :) )

The parameter flag is not configurable right now, but would need code changes.

Shouldn't be too hard actually ... the format is checked in:

  • https://github.com/rdfio/RDFIO/blob/master/specials/SpecialSPARQLEndpoint.php#L90-L94
  • https://github.com/rdfio/RDFIO/blob/master/specials/SpecialSPARQLEndpoint.php#L96-L101
  • https://github.com/rdfio/RDFIO/blob/master/specials/SpecialSPARQLEndpoint.php#L111-L114

... based on the $options->outputType object, where the $options object is populated in:

https://github.com/rdfio/RDFIO/blob/master/specials/SpecialSPARQLEndpoint.php#L162

... so it should be possible to do some logic there, and read $request->getText( 'format' ); ... and if it is "XML", it would turn it into 'xml', etc, as you were on to.

We could probably allow the logic to take care of a few such special cases, as long as they don't clash with anything else, so feel free to send a PR if you manage to get this to work with relfinder!

samuell avatar Sep 18 '17 14:09 samuell