Skip to content

Commit

Permalink
more complete version.
Browse files Browse the repository at this point in the history
  • Loading branch information
robcast committed Oct 3, 2024
1 parent 15ce65e commit 363c005
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
1 change: 0 additions & 1 deletion recipe/0309-annotation-collection/anno_coll.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
"total": 8,
"first": "{{ id.path }}/anno_p1.json",
"last": "{{ id.path }}/anno_p2.json"

}
5 changes: 4 additions & 1 deletion recipe/0309-annotation-collection/anno_p1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "AnnotationPage",
"partOf": "{{ id.path }}/anno_coll.json",
"partOf": [{
"id": "{{ id.path }}/anno_coll.json",
"type": "AnnotationCollection"
}],
"next": "{{ id.path }}/anno_p2.json",
"items": [
{
Expand Down
5 changes: 4 additions & 1 deletion recipe/0309-annotation-collection/anno_p2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "AnnotationPage",
"partOf": "{{ id.path }}/anno_coll.json",
"partOf": [{
"id": "{{ id.path }}/anno_coll.json",
"type": "AnnotationCollection"
}],
"items": [
{
"id": "{{ id.url }}-1",
Expand Down
31 changes: 16 additions & 15 deletions recipe/0309-annotation-collection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,55 @@ topic:

## Use Case

You have a large number of Annotations covering multiple Canvases in a Manifest that should be displayed in a viewer ideally as a recognizable group like a colored layer over the document.
You have a large number of Annotations covering multiple Canvases in a Manifest, for example crowd-sourced transcriptions or the output from a layout analysis algorithm and you want the Annotations to be displayed in a viewer as a recognizable group over the document with a label and a common color.

## Implementation Notes

The [IIIF Presentation API 3](https://iiif.io/api/presentation/3.0/#58-annotation-collection) presents the AnnotationCollection to represent groupings of Annotation Pages that should be managed as a single whole, regardless of which Canvas or resource they target. The AnnotationCollection is a separate document that references one or more AnnotationPages containing the Annotations. The AnnotationPages contain a reference to the parent AnnotationCollection.

A large collection can be divided into multiple pages. The AnnotationCollection contains references to the first and last AnnotationPage and each AnnotationPage contains a reference to the next page in the chain.
The [IIIF Presentation API 3](https://iiif.io/api/presentation/3.0/#58-annotation-collection) defines the AnnotationCollection as a mechanism to represent groupings of AnnotationPages that should be managed as a single whole, regardless of which Canvas or resource they target. The AnnotationCollection is a separate document that references a chain of one or more separate AnnotationPages containing the Annotations. The AnnotationPages contain a reference to the parent AnnotationCollection and a reference to the next page in the chain.

The AnnotationCollection should have a `label` property that can be shown to the user and it can optionally contain additional properties as specified in the [IIIF Presentation API 3](https://iiif.io/api/presentation/3.0/#a-summary-of-property-requirements).

The AnnotationCollection has a `first` property that contains the URI of the first AnnotationPage in the sequence, a `last` property that contains the URI of the last AnnotationPage and it should have a `total` property that contains the total number of Annotations in the collection.

The IIIF Manifest requires that Annotations that should be shown on a Canvas are contained in AnnotationPages referenced in the `annotations` property of that Canvas. This means that all Annotations need to be grouped by Canvas and put into one or more AnnotationPages per Canvas. An AnnotationPage can not contain Annotations for more than one Canvas.

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.
The AnnotationPages are separate documents that have an `items` property containing the list of Annotations, 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 has to load all AnnotationPages from all Canvases if it wants to present a list of all AnnotationCollections in the Manifest to the user.
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. The indirect way from the Manifest to the AnnotationCollection means that a viewer has to load all AnnotationPages from all Canvases if it wants to present a complete list of all AnnotationCollections in the Manifest to the user.

issues:
- partOf in Prezi3 wants a list with id and type https://iiif.io/api/presentation/3.0/#partof
- partOf in Prezi3 wants a list https://iiif.io/api/presentation/3.0/#partof but example https://iiif.io/api/presentation/3.0/#58-annotation-collection doesn't
- what to do with the viewer links? annotations show fine but the collection doesn't

## Restrictions
## Example

???
We use a Manifest containing two pages from a newspaper (Berliner Tageblatt, February 16, 1925, from Staatsbibliothek Berlin via Europeana) and a set of Annotations concerning layout and reading order.

## Example
The Annotations select rectangular regions on the Canvases in the Manifest and add textual tags describing layout elements. They are contained in two AnnotationPages "anno_p1.json" for Annotations on the first Canvas and "anno_p2.json" for Annotations on the second Canvas. "anno_p1.json" contains a `next` reference to "anno_p2.json" and both pages contain `partOf` references to the AnnotationCollection.

We use a Manifest containing two pages from a newspaper (Berliner Tageblatt, February 16, 1925, from Staatsbibliothek Berlin via Europeana) and a set of Annotations concerning layout elements.
The AnnotationCollection is in the file "anno_coll.json". It has a `label` and references "anno_p1.json" as the `first` and "anno_p2.json" as the `last` page and contains the `total` number of Annotations.

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

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

AnnotationPage with Annotations on the first Canvas.
First AnnotationPage with Annotations on the first Canvas.

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

AnnotationPage with Annotations on the second Canvas.
Second AnnotationPage with Annotations on the second Canvas.

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

AnnotationCollection referencing the AnnotationPages.
The AnnotationCollection referencing the AnnotationPages.

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

## Related Recipes

Provide a bulleted list of related recipes and why they are relevant.
* [Embedded or Referenced Annotations][0269] for referencing Annotations in external AnnotationPages
* [Simple Annotation — Tagging][0021] annotating a rectangular Canvas region
* [Annotation with a Non-Rectangular Polygon][0261] annotating an irregular shape on a Canvas

{% include acronyms.md %}
{% include links.md %}
Expand Down

0 comments on commit 363c005

Please sign in to comment.