Edirom-Online icon indicating copy to clipboard operation
Edirom-Online copied to clipboard

Fix/417

Open peterstadler opened this issue 1 year ago • 1 comments

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.

peterstadler avatar Sep 08 '24 21:09 peterstadler

any updates here? I'm happy to chat about it if there are any questions …

peterstadler avatar Oct 02 '24 07:10 peterstadler

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.xql and getOverlays.xql) and text-related (getAnnotationsInText.xql and getChapters.xql) files.

Thanks @roewenstrunk ! Maybe @bwbohl can check these XQueries with his data?

peterstadler avatar Oct 13 '24 11:10 peterstadler