We should be able to configure the prefixes to be whatever
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T211799 Make RDF prefixes configurable | |||
Open | None | T196042 Configurable RDF prefixes for WDQS |
Event Timeline
I guess this is in the wdqs image?
We should also probably change the default from wdt etc to wbt (for wikibase?)
So, a 'dream' could be to have an env var for a prefix for the base prefixes?
"lb" vs "wd" etc.
envsubst could then be used to swap these into the appropriate files
@Smalyshev are there any places in the query service where these prefixes are hardcoded? or is it just the single config like file that we need to change?
Yes, unfortunately, these prefixes are in the code - namely, at WikibaseContextListener.addPrefixes class. If you look there, it's not hard to change them in the code, but they are hardcoded for now.
You could easily define extra prefixes, by adding them to prefixes.conf, but you can't easily change the existing ones. Internally, it's all URIs, so if you are fine with having both old and new prefixes, adding them to prefixes.conf would probably work.
I find wd: (and derivatives) should be reserved for Wikidata to avoid confusion, and the default installation of wdqs-updater should propose another prefix, advertised as shared between all default Wikibase installations. In this proposition, the default prefixes in the frontend would include wd: fixed as Wikidata and the shared prefix for the specific Wikibase installation.
According to http://prefix.cc wb: is already used for http://data.worldbank.org/.
This etherpad contains notes on WDQS namespaces under "Configure your own name space for query service"
This commit on GitHub lists patches to the WDQS query GUI to achieve custom name spaces: https://github.com/rhizomedotorg/artbase-query-gui/commit/29ce17b225a3fb9d9bcd16896778f94495fdf9c9