Skip to content

Commit 6099dca

Browse files
authored
Merge pull request #2457 from IIIF/add_anno_examples
Adding example anno-page and anno-collection
2 parents e015192 + 0529a76 commit 6099dca

1 file changed

Lines changed: 4 additions & 51 deletions

File tree

source/presentation/4.0/index.md

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -255,70 +255,23 @@ Annotations are grouped within the [`items`][prezi-40-model-items] property of a
255255

256256
The required properties of Annotations, as used in IIIF, are [`id`][prezi-40-model-id], [`type`][prezi-40-model-type], [`target`][prezi-40-model-target] and [`motivation`][prezi-40-model-motivation]. Most Annotations also have the [`body`][prezi-40-model-body]. See the [Annotation Documentation](model/#Annotation) for more detail.
257257

258-
259-
> TODO: JSON examples for Anno, Anno Page and Anno Coll'n ?
260-
{: .warning}
261-
262-
<!--
263-
264-
```json
265-
{
266-
"id": "https://example.org/iiif/book1/annocoll/transcription",
267-
"type": "AnnotationCollection",
268-
"label": {"en": ["Diplomatic Transcription"]},
269-
"total": 112,
270-
"first": { "id": "https://example.org/iiif/book1/annopage/l1", "type": "AnnotationPage" },
271-
"last": { "id": "https://example.org/iiif/book1/annopage/l112", "type": "AnnotationPage" }
272-
}
273-
```
274-
275-
```jsonc
276-
{
277-
"id": "https://example.org/iiif/book1/annopage/l2",
278-
"type": "AnnotationPage",
279-
"prev": "https://example.org/iiif/book1/annopage/l1",
280-
"next": "https://example.org/iiif/book1/annopage/l3",
281-
"items": [
282-
{
283-
"id": "https://example.org/iiif/book1/annopage/l2/a1",
284-
"type": "Annotation"
285-
// ...
286-
},
287-
{
288-
"id": "https://example.org/iiif/book1/annopage/l2/a2",
289-
"type": "Annotation"
290-
// ...
291-
}
292-
],
293-
"partOf": [
294-
{
295-
"id": "https://example.org/iiif/book1/annocoll/transcription",
296-
"type": "AnnotationCollection",
297-
}
298-
]
299-
}
300-
```
301-
302-
-->
303-
304-
<!--
305-
use totalItems? https://iiif.io/api/discovery/1.0/#totalitems
306-
https://github.com/IIIF/api/issues/2118
307-
-->
308-
258+
{% include code_example.html src="09_anno_page_1.json" from=14 to=28 %}
309259

310260
### Annotation Page
311261

312262
Annotation Pages are used to group Annotations. In cases where many annotations are present, such as when transcription, translation, and commentary are associated with a manuscript, it can be useful to separate these annotations into groups that can facilitate improved user interactions in a client.
313263

314264
Each Annotation Page can be embedded or externally referenced. Clients should process the Annotation Pages and their items in the order given in the Container. Publishers may choose to expedite the processing of embedded Annotation Pages by ordering them before external pages, which will need to be dereferenced by the client. Order can be significant, however. Annotations are assigned an ascending [z-index](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index) from the first annotation encountered. Annotations with a higher z-index will render in front of those with a lower z-index when displayed on a Canvas.
315265

266+
{% include code_example.html src="09_anno_page_1.json" %}
267+
316268
### Annotation Collection
317269

318270
Annotation Collections represent groupings of Annotation Pages that should be managed as a single whole, regardless of which Container or resource they target. This allows, for example, all of the Annotations that make up a particular translation of the text of a book to be collected together. A client might then present a user interface that allows all of the Annotations in an Annotation Collection to be displayed or hidden according to the user’s preference.
319271

320272
For Annotation Collections with many Annotations, there will be many pages. The Annotation Collection refers to the first and last page, and then the pages refer to the previous and next pages in the ordered list. Each page is part of the Annotation Collection.
321273

274+
{% include code_example.html src="09_anno_collection.json" %}
322275

323276
## Content Resources
324277

0 commit comments

Comments
 (0)