Skip to content

Commit

Permalink
first example with json.
Browse files Browse the repository at this point in the history
  • Loading branch information
robcast committed Sep 27, 2024
1 parent fae2109 commit c002dc6
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 9 deletions.
14 changes: 14 additions & 0 deletions recipe/0309-annotation-collection/anno_coll.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "AnnotationCollection",
"label": {
"en": [
"Newspaper layout markup"
]
},
"total": 12,
"first": "{{ id.path }}/anno_p1.json",
"last": "{{ id.path }}/anno_p2.json"

}
36 changes: 36 additions & 0 deletions recipe/0309-annotation-collection/anno_p1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "AnnotationPage",
"partOf": "{{ id.path }}/anno_coll.json",
"next": "{{ id.path }}/anno_p2.json",
"items": [
{
"id": "{{ id.url }}-1",
"type": "Annotation",
"motivation": "supplementing",
"body": {
"type": "TextualBody",
"format": "text/plain",
"language": "de",
"value": "I. 54. Jahrgang"
},
"target": {
"type": "SpecificResource",
"source": {
"id": "{{ id.path }}/canvas/p1",
"type": "Canvas",
"partOf": [{
"id": "{{ id.path }}/manifest.json",
"type": "Manifest"
}]
},
"selector": {
"type": "FragmentSelector",
"conformsTo": "http://www.w3.org/TR/media-frags/",
"value": "xywh=0,376,399,53"
}
}
}
]
}
34 changes: 34 additions & 0 deletions recipe/0309-annotation-collection/anno_p2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "AnnotationPage",
"items": [
{
"id": "{{ id.url }}-1",
"type": "Annotation",
"motivation": "supplementing",
"body": {
"type": "TextualBody",
"format": "text/plain",
"language": "de",
"value": "I. 54. Jahrgang"
},
"target": {
"type": "SpecificResource",
"source": {
"id": "{{ id.path }}/canvas/p2",
"type": "Canvas",
"partOf": [{
"id": "{{ id.path }}/manifest.json",
"type": "Manifest"
}]
},
"selector": {
"type": "FragmentSelector",
"conformsTo": "http://www.w3.org/TR/media-frags/",
"value": "xywh=0,376,399,53"
}
}
}
]
}
13 changes: 9 additions & 4 deletions recipe/0309-annotation-collection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,32 @@ The IIIF Manifest requires that Annotations that should be shown on a Canvas are

All AnnotationPages are separate documents that have an `items` property containing the list of Annotation objects and a `partOf` property that contains the URI of the parent AnnotationCollection and a `next` property that contains the URI of the next AnnotationCollection in the sequence.

A IIIF viewer that displays Annotations on a Canvas follows the URIs in the `annotations` property of the Canvas and loads the Annotations in the referenced AnnotationPages. If the viewer wants to indicate that these Annotations belong to one or more AnnotationCollections it has to follow the URI in the `partOf` property of the AnnotationPages to identify the AnnotationCollection and display its label and choose a common color for the Annotations. This means that a viewer would have to load all AnnotationPages from all Canvases to present a list of all AnnotationCollections in the Manifest.
A IIIF viewer that displays Annotations on a Canvas follows the URIs in the `annotations` property of the Canvas and loads the Annotations in the referenced AnnotationPages. If the viewer wants to indicate that these Annotations belong to one or more AnnotationCollections it has to follow the URI in the `partOf` property of the AnnotationPages to identify the AnnotationCollection and display its label and choose a common color for the Annotations. This means that a viewer has to load all AnnotationPages from all Canvases if it wants to present a list of all AnnotationCollections in the Manifest to the user.



ISSUES
- mention `supplementary` property of Range? seems very specialized
- can a viewer find the AnnotationCollection from the Manifest? seeAlso?
- images from https://fixtures.iiif.io/

## Restrictions

???

## Example

Describe the solution in prose and provide an example.
The example json document must be an external document, and imported with the following:
We use a Manifest containing two pages from a newspaper (Berliner Tageblatt, February 16, 1925, from Europeana) and a set of Annotations concerning layout elements.

{% include manifest_links.html viewers="UV, Mirador, Curation" manifest="manifest.json" %}

{% include jsonviewer.html src="manifest.json" %}

The direct link to the fixture is a useful convenience.
{% include jsonviewer.html src="anno_p1.json" %}

{% include jsonviewer.html src="anno_p2.json" %}

{% include jsonviewer.html src="anno_coll.json" %}

## Related Recipes

Expand Down
129 changes: 124 additions & 5 deletions recipe/0309-annotation-collection/manifest.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,127 @@
{
"@context": [ "http://iiif.io/api/presentation/3/context.json" ],
"id": "{{ id.url }} ",
"type": "Manifest",
"label": {
"none": [""]
"@context": [
"http://iiif.io/api/presentation/3/context.json"
],
"id": "{{ id.url }}",
"type": "Manifest",
"label": {
"de": [
"Berliner Tageblatt - 1925-02-16"
]
},
"rights": "http://creativecommons.org/publicdomain/mark/1.0/",
"requiredStatement": {
"label": {
"en": [
"Attribution"
]
},
"value": {
"en": [
"<p><a href='https://www.europeana.eu/portal/record/9200355/BibliographicResource_3000096302605.html'>Berliner Tageblatt</a> - Staatsbibliothek zu Berlin - Preußischer Kulturbesitz. Public Domain Mark - http://creativecommons.org/publicdomain/mark/1.0/</p>"
]
}
},
"provider": [{
"id": "https://www.europeana.eu/",
"type": "Agent",
"label": { "en": [ "Europeana" ] },
"logo": [
{
"id": "https://style.europeana.eu/images/europeana-logo-default.png",
"type": "Image",
"format": "image/png",
"height": 310,
"width": 100
}
]
}],
"items": [
{
"id": "{{ id.path }}/canvas/p1",
"type": "Canvas",
"label": {
"none": [
"p. 1"
]
},
"height": 5000,
"width": 3602,
"items": [
{
"id": "{{ id.path }}/annotation_page_painting/ap1",
"type": "AnnotationPage",
"items": [
{
"id": "{{ id.path }}/annotation/p1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "{{ id.path }}/canvas/p1"
}
]
}
],
"annotations": [
{
"id": "{{ id.path }}/anno_p1.json",
"type": "AnnotationPage"
}
]
},
{
"id": "{{ id.path }}/canvas/p2",
"type": "Canvas",
"label": {
"none": [
"p. 2"
]
},
"height": 5000,
"width": 3602,
"items": [
{
"id": "{{ id.path }}/annotation_page_painting/ap2",
"type": "AnnotationPage",
"items": [
{
"id": "{{ id.path }}/annotation/p2",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p2/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p2",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "{{ id.path }}/canvas/p2"
}
]
}
],
"annotations": [
{
"id": "{{ id.path }}/anno_p2.json",
"type": "AnnotationPage"
}
]
}
]
}

0 comments on commit c002dc6

Please sign in to comment.