Fix/417
Description, Context and related Issue
This PR fixes output methods and media types returned from XQuery endpoints.
Refs #417
While the changes introduced here are merely a refactoring of code, there are two changes that modify function names and return types: edition:toJSON and work:toJSON are renamed to edition:details and work:details, now returning a map object rather than a string. Greping through the code I couldn't find any calls to these functions other than those from the XQuery endpoints I was updating, so I hope this will not be of much trouble.
How Has This Been Tested?
I tested the changes with the clarinet quintet data. This worked quite nicely except for
- getAnnotationsInText.xql
- getChapters.xql
- getParts.xql
Here, the response was always empty since the data did not provide this information?!
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation Update
Checklist
- [ ] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have performed a self-review of my code
- [x] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
any updates here? I'm happy to chat about it if there are any questions …
I have looked at all the suggested changes and tested them with the clarinet quintet. All fine. I was not able to check the overlays- (
getOverlayOnPage.xqlandgetOverlays.xql) and text-related (getAnnotationsInText.xqlandgetChapters.xql) files.
Thanks @roewenstrunk ! Maybe @bwbohl can check these XQueries with his data?