core icon indicating copy to clipboard operation
core copied to clipboard

Feature request: 'see also' dataset type

Open erikap opened this issue 9 years ago • 1 comments

We want to provide our datasets with a URI containing the dataset version (e.g. https://www.example.com/sets/v1.0/foo) and with a 'versionless' URI which points to the current version (e.g. https://www.example.com/sets/foo). The versionless URI should return a 302/303 status code and redirect the user to the current version. This redirection can currently not be configured in The Datatank.

Is it possible to add a new dataset type 'see also' which allows to configure a redirection in The Datatank? We are aware that we can configure this redirection through Apache, but the versionless dataset will then not be visible in the list of datasets in The Datatank so the end user may not be aware of its existence.

erikap avatar Feb 10 '16 10:02 erikap

Hi @erikap That is possible, create a new datasource type (like CSV, SPARQL, ...) and take as parameters just the URI you want to 303 to. The "hack" you'll need to do is catch the dataset type in Dataset controller and check if it's a redirect resource, if so, the normal content-negotiation does not need to be initiated, but directly return the redirect object coming from the "redirect" source type.

coreation avatar Mar 08 '16 14:03 coreation