wellcomecollection / platform

Wellcome Collection Digital Platform
https://developers.wellcomecollection.org/
MIT License
47 stars 10 forks source link

Build equivalent of WellcomeMetsPackageProvider #4750

Closed tomcrane closed 3 years ago

tomcrane commented 3 years ago

In Current DDS, this converts from Sierra metadata and IMetsRepository objects into the Package Model - https://wellcomelibrary.org/package/b28047345

We then convert the package model to IIIF2.

In iiif-builder, we go direct from METS and catalogue records to IIIF3. That means all the accumulated business logic in WellcomeMetsPackageProvider needs to live on in IIIFBuilder.

This is where all those little edge-cases and interesting rules live. Things like image reordering, interpretation of how METS structures video and audio...

tomcrane commented 3 years ago

For #4734, make sure everything the PDF cover page needs is in the manifest. Including looked-up license text from dictionaries.

tomcrane commented 3 years ago

Was trying to see if we can control the serialisation order of the IIIF JSON without cluttering up the classes in https://github.com/wellcomecollection/iiif-builder/tree/master/src/Wellcome.Dds/IIIF/Presentation with attributes.

You can do this by implementing a ContractResolver but that's too much intervention and maintenance.

Ideally, an external fluent declaration outside of the IIIF Model classes, decorating the properties with their order. This doesn't seem to be possible.

System.Text.Json doesn't acknowledge the importance of serialisation order for aesthetics and usability. https://github.com/dotnet/runtime/issues/728

That's out then, unless we serialise manually...

So, it has to be [JsonProperty(Order = 2)] from Json.NET, as in the v2 model, e.g.,

https://github.com/digirati-co-uk/iiif-model/blob/master/Digirati.IIIF/Model/Types/Manifest.cs

tomcrane commented 3 years ago

Done, apart from C&D, for which I will create a new ticket.

As we test and validate all 400K+ possible collections and manifests, there will be tweaking and bug fixing, but first pass is done.