Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: 'see also' dataset type #384

Open
erikap opened this issue Feb 10, 2016 · 1 comment
Open

Feature request: 'see also' dataset type #384

erikap opened this issue Feb 10, 2016 · 1 comment

Comments

@erikap
Copy link
Contributor

erikap commented Feb 10, 2016

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.

@coreation
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants