Fixes Partially addresses #126 (closed)
- Adds a redirect from artifacts to latest inscription (when one of the below formats is requested)
- ATF and CDLI-CoNLL output, and a base for CoNLL-U*
* CDLI-CoNLL is in the database, to convert to CoNLL-U we need the Python converter.
Type of PR This PR is a feature.
- Adds a Inscription controller to handle inscription output (HTML output may be removed later)
- Defines custom, unregistered MIME types to describe inscription formats
- Uses a component to recognize inscription formats across the Artifact and Inscription controllers
- Uses separate views for every format to leverage CakePHP's built-in
- Goes down the list of acceptable response type to find one that is available for an inscription (not all have CoNLL)
- Returns 406 NOT ACCEPTABLE if no type is fullfillable
curl -LH 'Accept: text/x-c-atf' http://127.0.0.1:2354/inscriptions/2309985
curl -LH 'Accept: text/x-cdli-conll' http://127.0.0.1:2354/inscriptions/2309985→ HTTP 406
curl -LH 'Accept: text/x-cdli-conll' http://127.0.0.1:2354/inscriptions/2341997
- Redirect does not work yet since
is_latestis not filled in the database yet. Change the value to
1for any artifact (say P000001) and
curl -LH 'Accept: text/x-c-atf' http://127.0.0.1:2354/artifacts/1
My pull request has a descriptive title (not a vague title like "Update
My pull request targets the
phoenix/developbranch of the repository.
My commit messages follow best practices.
My code follows the established code style of the repository.
I added tests for the changes I made (if applicable).
I added or updated documentation (if applicable).
I tried running the project locally and verified that there are no visible errors.