From 014b2b8abfc365007a9e68c3e3d28a1e655c6577 Mon Sep 17 00:00:00 2001 From: Stephen Fraser Date: Mon, 15 Nov 2021 15:28:18 +0000 Subject: [PATCH] Updates to Presentation 3 serialisation and validation --- .../__snapshots__/compatibility-test.ts.snap | 1290 ++++++++++++++- .../compatibility-test.ts | 28 +- fixtures/presentation-2/ghent-omeka.json | 1388 +++++++++++++++++ .../parser/src/serialise-presentation-3.ts | 30 +- packages/types/services/image-service.d.ts | 1 + .../validator/src/schemas/presentation-3.json | 51 +- 6 files changed, 2723 insertions(+), 65 deletions(-) create mode 100644 fixtures/presentation-2/ghent-omeka.json diff --git a/__tests__/presentation-3-parser/__snapshots__/compatibility-test.ts.snap b/__tests__/presentation-3-parser/__snapshots__/compatibility-test.ts.snap index b7882245..3a4c831d 100644 --- a/__tests__/presentation-3-parser/__snapshots__/compatibility-test.ts.snap +++ b/__tests__/presentation-3-parser/__snapshots__/compatibility-test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Compatibility Presentation 2 serialisation from normalised 3 1`] = ` +exports[`Compatibility Presentation 2 + 3 serialisation from normalised 1`] = ` Object { "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497/manifest", "@type": "sc:Manifest", @@ -762,10 +762,674 @@ Object { } `; -exports[`Compatibility Presentation 3 serialisation from normalised 1`] = ` +exports[`Compatibility Presentation 2 + 3 serialisation from normalised 2`] = ` Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/manifest", - "items": Array [], + "items": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [1]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [2]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [3]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [4]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [5]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [6]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [7]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + "4 [8]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + "5 [9]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + "6 [10]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + "7 [11]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + "8 [12]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [13]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [14]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [15]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [16]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas/annotation-page", + "items": Array [ + Object { + "body": Array [ + Object { + "height": 1998, + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/full/full/0/default.jpg", + "service": Array [ + Object { + "@id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017", + "@type": "ImageService2", + "profile": "http://iiif.io/api/image/2/level2.json", + }, + ], + "type": "Image", + "width": 1226, + }, + ], + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/annotation", + "target": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas", + "type": "Annotation", + }, + ], + "type": "AnnotationPage", + }, + ], + "label": Object { + "none": Array [ + " - [17]", + ], + }, + "type": "Canvas", + "width": 1226, + }, + ], "label": Object { "none": Array [ "Kurtze Nachricht von dem freyen Unterricht, welchen arme Kinder in den Friedrichsstädtischen teutschen Schulen geniessen", @@ -1142,130 +1806,698 @@ Object { "structures": Array [ Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-1", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-2", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-3", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-4", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorderdeckel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-5", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-6", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + ], + "label": Object { + "none": Array [ + "Einband", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-7", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Titelblatt", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-8", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "[Dritte Fortsetzung]", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-9", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-10", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-11", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-12", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Rückdeckel", + ], + }, + "type": "Range", + }, + ], + "label": Object { + "none": Array [ + "Einband", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-13", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Farbinformation", + ], + }, + "type": "Range", + }, + ], + "label": Object { + "none": Array [ + "Kurtze Nachricht von dem freyen Unterricht, welchen arme Kinder in den Friedrichsstädtischen teutschen Schulen geniessen", + ], + }, + "type": "Range", + }, + ], "label": Object { "none": Array [ - "", + "Kurtze Nachricht von dem freyen Unterricht, welchen arme Kinder in den Friedrichsstädtischen teutschen Schulen geniessen", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-2", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-3", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-4", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorderdeckel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-5", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-6", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + ], + "label": Object { + "none": Array [ + "Einband", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-7", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Titelblatt", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-8", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "[Dritte Fortsetzung]", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-9", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-10", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-11", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-12", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Rückdeckel", + ], + }, + "type": "Range", + }, + ], + "label": Object { + "none": Array [ + "Einband", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-13", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Farbinformation", + ], + }, + "type": "Range", + }, + ], "label": Object { "none": Array [ - "", + "Kurtze Nachricht von dem freyen Unterricht, welchen arme Kinder in den Friedrichsstädtischen teutschen Schulen geniessen", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-3", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-4", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorderdeckel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-5", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-6", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + ], "label": Object { "none": Array [ - "", + "Einband", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-4", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0001/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Vorderdeckel", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-5", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0002/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Spiegel", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-6", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0003/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0004/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Vorsatz", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-7", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0005/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0006/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Titelblatt", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-8", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0007/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0008/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0009/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0010/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0011/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0012/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "[Dritte Fortsetzung]", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-9", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-10", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Vorsatz", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-11", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Spiegel", + ], + }, + "type": "Range", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-12", + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "type": "Canvas", + }, + ], + "label": Object { + "none": Array [ + "Rückdeckel", + ], + }, + "type": "Range", + }, + ], "label": Object { "none": Array [ - "", + "Einband", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-10", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0013/canvas", + "type": "Canvas", + }, + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0014/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Vorsatz", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-11", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0015/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Spiegel", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-12", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0016/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Rückdeckel", ], }, "type": "Range", }, Object { "id": "https://content.staatsbibliothek-berlin.de/dc/840973497/range/range-13", - "items": Array [], + "items": Array [ + Object { + "id": "https://content.staatsbibliothek-berlin.de/dc/840973497-0017/canvas", + "type": "Canvas", + }, + ], "label": Object { "none": Array [ - "", + "Farbinformation", ], }, "type": "Range", diff --git a/__tests__/presentation-3-parser/compatibility-test.ts b/__tests__/presentation-3-parser/compatibility-test.ts index eff029b6..b732bfb5 100644 --- a/__tests__/presentation-3-parser/compatibility-test.ts +++ b/__tests__/presentation-3-parser/compatibility-test.ts @@ -8,17 +8,6 @@ import { serialiseConfigPresentation3 } from '../../packages/parser/src/serialis import { Validator } from '../../packages/validator/src/validator'; describe('Compatibility', () => { - test('Presentation 2 serialisation from normalised 3', async () => { - const vault = new Vault(); - const manifest = await vault.loadManifest(nlsManifest2['@id'], nlsManifest2); - - const result = serialise(vault.getState(), manifest, serialiseConfigPresentation2); - - expect(result as any).toMatchSnapshot(); - - // No validator exists at the moment. - }); - // This calls out the the network, skip in normal test runs. test.skip('Wellcome - presentation 3', async () => { const vault = new Vault(); @@ -91,20 +80,29 @@ describe('Compatibility', () => { // No validator exists at the moment. }); - test('Presentation 3 serialisation from normalised', async () => { + test('Presentation 2 + 3 serialisation from normalised', async () => { const vault = new Vault(); + const manifest = await vault.loadManifest(nlsManifest2['@id'], nlsManifest2); - const result = serialise(vault.getState(), manifest, serialiseConfigPresentation3); + // Presentation 2 + const resultPresentation2 = serialise(vault.getState(), manifest, serialiseConfigPresentation2); + + expect(resultPresentation2 as any).toMatchSnapshot(); + + // Presentation 3 + const resultPresentation3: any = serialise(vault.getState(), manifest, serialiseConfigPresentation3); + + expect(resultPresentation3.items).not.toHaveLength(0); const validator = new Validator(); - const isValid = await validator.validateManifest(result); + const isValid = await validator.validateManifest(resultPresentation3); expect(validator.validators.manifest.errors).toEqual(null); expect(isValid).toEqual(true); - expect(result as any).toMatchSnapshot(); + expect(resultPresentation3 as any).toMatchSnapshot(); }); }); diff --git a/fixtures/presentation-2/ghent-omeka.json b/fixtures/presentation-2/ghent-omeka.json new file mode 100644 index 00000000..78748b2e --- /dev/null +++ b/fixtures/presentation-2/ghent-omeka.json @@ -0,0 +1,1388 @@ +{ + "@context": "http://iiif.io/api/presentation/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/manifest", + "@type": "sc:Manifest", + "label": "BU29", + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/5adbb9c50f534f6393605b528be2812fb98a0807.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 181, + "height": 200 + }, + "related": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/s/Indo-IranianVirtualLibrary/item/235", + "format": "text/html" + }, + "seeAlso": { "@id": "https://www.omeka.ugent.be/libraries.lw21/api/items/235", "format": "application/ld+json" }, + "metadata": [ + { "label": "Title", "value": "BU29" }, + { "label": "Coverage", "value": "Rivāyāts" }, + { "label": "Owner", "value": "Mumbai University" }, + { "label": "Date", "value": "1760" }, + { "label": "Language", "value": "Persian, Avestan, Pazand, Pahlavi, Gujarati." } + ], + "sequences": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/sequence/normal", + "@type": "sc:Sequence", + "label": "Current Page Order", + "viewingDirection": "left-to-right", + "canvases": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p1", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R2" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/5adbb9c50f534f6393605b528be2812fb98a0807.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 181, + "height": 200 + }, + "width": 1666, + "height": 1843, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0001-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/236/full/723,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1666, + "height": 1843, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/236", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p1" + } + ], + "metadata": [{ "label": "Title", "value": "R2" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p2", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V2" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/0594575676ed7eea0d960b1193d5f5b7b619760d.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 172, + "height": 200 + }, + "width": 1720, + "height": 1996, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0002-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/237/full/689,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1720, + "height": 1996, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/237", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p2" + } + ], + "metadata": [{ "label": "Title", "value": "V2" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p3", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R3" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/7d216975e0faff767266c6a9e53ddc313754f731.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 157, + "height": 200 + }, + "width": 1452, + "height": 1848, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0003-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/238/full/629,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1452, + "height": 1848, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/238", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p3" + } + ], + "metadata": [{ "label": "Title", "value": "R3" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p4", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V3" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/fb0bc6eea00905688c14c166e382030eab804b5a.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 148, + "height": 200 + }, + "width": 1576, + "height": 2128, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0004-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/239/full/592,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1576, + "height": 2128, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/239", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p4" + } + ], + "metadata": [{ "label": "Title", "value": "V3" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p5", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R4" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/61de60db06ee5ca24cfca0556ab0f8d7e035ccc9.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 145, + "height": 200 + }, + "width": 1441, + "height": 1993, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0005-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/240/full/578,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1441, + "height": 1993, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/240", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p5" + } + ], + "metadata": [{ "label": "Title", "value": "R4" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p6", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V4" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/48e33e5b8705d6c1b64649ab6dead1c8e1ba7e82.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 145, + "height": 200 + }, + "width": 1441, + "height": 1993, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0006-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/241/full/578,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1441, + "height": 1993, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/241", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p6" + } + ], + "metadata": [{ "label": "Title", "value": "V4" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p7", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R5" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/9b64490f422accd10135ca5b2e5c58300adb9988.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 152, + "height": 200 + }, + "width": 1399, + "height": 1843, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0007-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/242/full/607,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1399, + "height": 1843, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/242", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p7" + } + ], + "metadata": [{ "label": "Title", "value": "R5" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p8", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V5" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/63895b3e4e97980b480a93403a188d7b5ae43922.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 150, + "height": 200 + }, + "width": 1489, + "height": 1984, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0008-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/243/full/600,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1489, + "height": 1984, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/243", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p8" + } + ], + "metadata": [{ "label": "Title", "value": "V5" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p9", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R6" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/0f44f1e1793e45eda6f8e8f707fabf667e9cad89.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 153, + "height": 200 + }, + "width": 1381, + "height": 1810, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0009-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/244/full/610,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1381, + "height": 1810, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/244", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p9" + } + ], + "metadata": [{ "label": "Title", "value": "R6" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p10", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V6" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/5be9b6f9e3286fc4eb7b59bcc465929029073e42.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 166, + "height": 200 + }, + "width": 1504, + "height": 1816, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0010-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/245/full/663,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1504, + "height": 1816, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/245", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p10" + } + ], + "metadata": [{ "label": "Title", "value": "V6" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p11", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R7" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/ad2e6cb4b356a8a35cc884e48c509bb5e92f58e0.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 149, + "height": 200 + }, + "width": 1402, + "height": 1879, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0011-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/246/full/597,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1402, + "height": 1879, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/246", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p11" + } + ], + "metadata": [{ "label": "Title", "value": "R7" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p12", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V7" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/31e0ee4313acadd81cddd26814972ff6e7926646.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 144, + "height": 200 + }, + "width": 1374, + "height": 1905, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0012-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/247/full/577,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1374, + "height": 1905, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/247", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p12" + } + ], + "metadata": [{ "label": "Title", "value": "V7" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p13", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R8" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/1af2411f97859ed6481ec5bedd4a74a7c18aacba.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 151, + "height": 200 + }, + "width": 1218, + "height": 1611, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0013-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/266/full/605,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1218, + "height": 1611, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/266", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p13" + } + ], + "metadata": [{ "label": "Title", "value": "R8" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p14", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V8" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/0b0446f237b12301772d4b4db742c5d689813599.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 142, + "height": 200 + }, + "width": 1290, + "height": 1815, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0014-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/267/full/569,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1290, + "height": 1815, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/267", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p14" + } + ], + "metadata": [{ "label": "Title", "value": "V8" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p15", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R9" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/9c327033f1bd7af2e73dc578e860414212f674ff.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 168, + "height": 200 + }, + "width": 1578, + "height": 1881, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0015-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/268/full/671,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1578, + "height": 1881, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/268", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p15" + } + ], + "metadata": [{ "label": "Title", "value": "R9" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p16", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V9" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/114cd8f264086ff2cb741e655cecdd6f43f49099.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 150, + "height": 200 + }, + "width": 1365, + "height": 1821, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0016-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/269/full/600,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1365, + "height": 1821, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/269", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p16" + } + ], + "metadata": [{ "label": "Title", "value": "V9" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p17", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R10" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/bf00db756165c7a1132bde9670d5b8df1d190a36.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 148, + "height": 200 + }, + "width": 1254, + "height": 1692, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0017-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/270/full/593,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1254, + "height": 1692, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/270", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p17" + } + ], + "metadata": [{ "label": "Title", "value": "R10" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p18", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V10" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/db7054f475ec895e6e512207541ed70674989ea7.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 168, + "height": 200 + }, + "width": 1557, + "height": 1854, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0018-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/271/full/672,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1557, + "height": 1854, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/271", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p18" + } + ], + "metadata": [{ "label": "Title", "value": "V10" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p19", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R11" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/72a6c7d12f7a17f8f1e8eaf13c307e7e461754fa.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 161, + "height": 200 + }, + "width": 1350, + "height": 1677, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0019-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/272/full/644,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1350, + "height": 1677, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/272", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p19" + } + ], + "metadata": [{ "label": "Title", "value": "R11" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p20", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V11" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/9d5e19c2c314d8780cf529178497bf9795b4a650.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 144, + "height": 200 + }, + "width": 1317, + "height": 1830, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0020-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/273/full/576,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1317, + "height": 1830, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/273", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p20" + } + ], + "metadata": [{ "label": "Title", "value": "V11" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p21", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R12" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/0515d2d0777faab0a0f25fead4117991b2a7b296.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 146, + "height": 200 + }, + "width": 1239, + "height": 1692, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0021-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/274/full/586,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1239, + "height": 1692, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/274", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p21" + } + ], + "metadata": [{ "label": "Title", "value": "R12" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p22", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V12" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/a9e9dfed2f38c01411413921eb0e9f9994faee7d.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 148, + "height": 200 + }, + "width": 1380, + "height": 1860, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0022-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/275/full/594,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1380, + "height": 1860, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/275", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p22" + } + ], + "metadata": [{ "label": "Title", "value": "V12" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p23", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R13" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/4ca2bf940eef8d0903acc4bf4326dda4e7245366.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 149, + "height": 200 + }, + "width": 1266, + "height": 1698, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0023-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/276/full/596,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1266, + "height": 1698, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/276", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p23" + } + ], + "metadata": [{ "label": "Title", "value": "R13" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p24", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V13" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/1c8f0254d3a163da0c98970523a4641c7b35431c.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 162, + "height": 200 + }, + "width": 1419, + "height": 1749, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0024-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/277/full/649,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1419, + "height": 1749, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/277", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p24" + } + ], + "metadata": [{ "label": "Title", "value": "V13" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p25", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R14" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/e61fc41d1e9888973aaf7c84f272d94a434df860.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 164, + "height": 200 + }, + "width": 1332, + "height": 1623, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0025-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/278/full/657,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1332, + "height": 1623, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/278", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p25" + } + ], + "metadata": [{ "label": "Title", "value": "R14" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p26", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V14" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/405d9a9c9274b5f95dc9e8da093a786b1e3440bd.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 167, + "height": 200 + }, + "width": 1428, + "height": 1707, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0026-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/279/full/669,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1428, + "height": 1707, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/279", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p26" + } + ], + "metadata": [{ "label": "Title", "value": "V14" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p27", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R15" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/6fcef7369cf0b1b84c84644948775d7e4b2ce9ef.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 155, + "height": 200 + }, + "width": 1287, + "height": 1665, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0027-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/280/full/618,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1287, + "height": 1665, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/280", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p27" + } + ], + "metadata": [{ "label": "Title", "value": "R15" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p28", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V15" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/22c7314224cf8c5a5613f27fb0c971a8a3067d79.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 145, + "height": 200 + }, + "width": 1368, + "height": 1881, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0028-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/281/full/582,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1368, + "height": 1881, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/281", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p28" + } + ], + "metadata": [{ "label": "Title", "value": "V15" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p29", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R16" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/6b9312ce8638eb8865f1c2034072cc1c882561df.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 161, + "height": 200 + }, + "width": 1551, + "height": 1932, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0029-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/282/full/642,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1551, + "height": 1932, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/282", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p29" + } + ], + "metadata": [{ "label": "Title", "value": "R16" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p30", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V16" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/b945019d648cfcc80328ae5c5e495b2255ed4167.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 161, + "height": 200 + }, + "width": 1551, + "height": 1932, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0030-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/283/full/642,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1551, + "height": 1932, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/283", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p30" + } + ], + "metadata": [{ "label": "Title", "value": "V16" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p31", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R17" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/cb59f5dd2455c66106152a38b25a2aeee6b3b2d6.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 167, + "height": 200 + }, + "width": 1605, + "height": 1926, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0031-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/284/full/667,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1605, + "height": 1926, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/284", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p31" + } + ], + "metadata": [{ "label": "Title", "value": "R17" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p32", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "V17" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/ec81efc1dd3209acdb0594b391a3787968f2181c.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 159, + "height": 200 + }, + "width": 1440, + "height": 1815, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0032-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/285/full/635,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1440, + "height": 1815, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/285", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p32" + } + ], + "metadata": [{ "label": "Title", "value": "V17" }] + }, + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p33", + "@type": "sc:Canvas", + "label": { + "type": "literal", + "property_id": 1, + "property_label": "Title", + "is_public": true, + "@value": "R18" + }, + "thumbnail": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/files/medium/aa0a79ff4f08974ef57c3252c0fcd3cafa415914.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 140, + "height": 200 + }, + "width": 1218, + "height": 1740, + "images": [ + { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/annotation/p0033-image", + "@type": "oa:Annotation", + "motivation": "sc:painting", + "resource": { + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/286/full/560,800/0/default.jpg", + "@type": "dctypes:Image", + "format": "image/jpeg", + "width": 1218, + "height": 1740, + "service": { + "@context": "http://iiif.io/api/image/2/context.json", + "@id": "https://www.omeka.ugent.be/libraries.lw21/iiif-img/2/286", + "profile": "http://iiif.io/api/image/2/level2.json" + } + }, + "on": "https://www.omeka.ugent.be/libraries.lw21/iiif/2/235/canvas/p33" + } + ], + "metadata": [{ "label": "Title", "value": "R18" }] + } + ] + } + ] +} diff --git a/packages/parser/src/serialise-presentation-3.ts b/packages/parser/src/serialise-presentation-3.ts index f8ad1333..02467a6c 100644 --- a/packages/parser/src/serialise-presentation-3.ts +++ b/packages/parser/src/serialise-presentation-3.ts @@ -4,6 +4,8 @@ import { DescriptiveNormalized, LinkingNormalized, AnnotationCollection, + ImageService3, + ImageService2, } from '@hyperion-framework/types'; function technicalProperties(entity: Partial): Array<[keyof TechnicalProperties, any]> { @@ -30,6 +32,28 @@ function filterEmpty(item?: T[]): T[] | undefined { return item; } +function service2compat(service: ImageService3): ImageService2 | ImageService3 { + if (service && service.type && service.type === 'ImageService2') { + const { id, type, profile, ..._service } = service; + return { + '@id': id, + '@type': type, + profile: profile.startsWith('http') ? profile : `http://iiif.io/api/image/2/${profile}.json`, + ..._service, + } as any; + } + + return service; +} + +function filterService2Compat(services?: any[]) { + if (!services || services.length === 0) { + return undefined; + } + + return (services as any[]).map(service2compat); +} + function* descriptiveProperties( entity: Partial ): Generator> { @@ -56,8 +80,8 @@ function* linkingProperties( ): Generator> { return [ ['seeAlso', filterEmpty(yield entity.seeAlso)], - ['service', filterEmpty(entity.service)], - ['services', filterEmpty(entity.services)], + ['service', filterService2Compat(entity.service)], + ['services', filterService2Compat(entity.services)], ['rendering', filterEmpty(yield entity.rendering)], ['supplementary', filterEmpty(yield entity.supplementary)], @@ -108,7 +132,7 @@ export const serialiseConfigPresentation3: SerialiseConfig = { Service: function*(entity) { // Are there other properties on a service? - return [[UNWRAP, entity]]; + return [[UNWRAP, service2compat(entity as any)]]; }, Annotation: function*(entity) { diff --git a/packages/types/services/image-service.d.ts b/packages/types/services/image-service.d.ts index 4181b3d2..f7e3b93a 100644 --- a/packages/types/services/image-service.d.ts +++ b/packages/types/services/image-service.d.ts @@ -61,6 +61,7 @@ export declare type ImageProfile = export interface ImageService2 { '@context'?: string | string[]; '@id': string; + '@type'?: 'ImageService2'; profile: ImageProfile | ImageProfile[]; protocol?: string; width?: number | null; diff --git a/packages/validator/src/schemas/presentation-3.json b/packages/validator/src/schemas/presentation-3.json index 1714ef4d..5a5984f1 100644 --- a/packages/validator/src/schemas/presentation-3.json +++ b/packages/validator/src/schemas/presentation-3.json @@ -9,7 +9,6 @@ "title": "Id must be presesnt and must be a URI" }, "lngString": { - "$id": "#lngString", "title": "Language string, must have a language and value must be an array.", "type": "object", "patternProperties": { @@ -25,7 +24,6 @@ "additionalProperties": false }, "keyValueString": { - "$id": "#keyValueString", "type": "object", "properties": { "label": {"$ref": "#/types/lngString" }, @@ -225,7 +223,7 @@ { "type": "string", "format": "uri", - "pattern": "http://creativecommons.org/publicdomain/mark/.*" + "pattern": "http://creativecommons.org/publicdomain/.*" }, { "type": "string", @@ -371,6 +369,7 @@ "navDate": { "$ref": "#/classes/navDate" }, "provider": { "$ref": "#/classes/provider" }, "seeAlso": { "$ref": "#/classes/seeAlso" }, + "services": { "$ref": "#/classes/service" }, "thumbnail": { "type": "array", "items": { "$ref": "#/classes/resource" } @@ -421,8 +420,8 @@ } ] }, - "id": {}, - "label": {}, + "id": { "$ref": "#/types/id" }, + "label": {"$ref": "#/types/lngString" }, "type": { "type": "string", "pattern": "^Manifest" @@ -432,6 +431,7 @@ "requiredStatement": { "$ref": "#/types/keyValueString" }, "rendering": { "$ref": "#/types/external" }, "service": { "$ref": "#/classes/service" }, + "services": { "$ref": "#/classes/service" }, "viewingDirection": { "$ref": "#/classes/viewingDirection" }, "rights": { "$ref": "#/classes/rights" }, "start": {}, @@ -467,7 +467,8 @@ "$ref": "#/classes/annotationPage" } } - } + }, + "required": ["id", "type", "label"] } ] }, @@ -598,11 +599,13 @@ ] }, "body": { - "oneOf": [ + "anyOf": [ { + "type": "object", "$ref": "#/classes/resource" }, { + "type": "object", "allOf":[ { "$ref": "#/classes/choice" }, { @@ -615,11 +618,18 @@ "required": ["items"] } ] + }, + { + "type": "array", + "items": { + "type": "object" + } } + ] }, "target": { - "oneOf": [ + "anyOf": [ { "$ref": "#/classes/annoTarget" }, { "type": "array", @@ -657,7 +667,17 @@ "format": { "$ref": "#/types/format" }, "accessibility": { "type": "string"}, "source": { "$ref": "#/types/id" }, - "selector": { "$ref": "#/classes/annoSelector" } + "selector": { + "oneOf": [ + { "$ref": "#/classes/annoSelector" }, + { + "type": "array", + "items": { + "$ref": "#/classes/annoSelector" + } + } + ] + } }, "required": ["source", "selector"] }, @@ -723,14 +743,9 @@ } }, "$id": "http://iiif.io/api/presentation/3/schema.json" , - "allOf": [ - { "$ref": "#/types/class" }, - { - "oneOf": [ - { "$ref": "#/classes/manifest" }, - { "$ref": "#/classes/collection" }, - { "$ref": "#/classes/annotationPage" } - ] - } + "oneOf": [ + { "$ref": "#/classes/manifest" }, + { "$ref": "#/classes/collection" }, + { "$ref": "#/classes/annotationPage" } ] }