翻译者:ginkgo
原文链接:https://iiif.io/api/cookbook/recipe/0024-book-4-toc/
用例
许多书籍都有一个逻辑结构,可以通过目录 (Table of Contents, ToC) 或其他寻路方法(如章、节,再如一本选集或装订手稿中包含的多部作品)进行导航。IIIF使用范围(Ranges)来表示书籍的结构,并且 IIIF 查看器可以在索引面板中将此结构显示为 ToC,以帮助用户按章、节、作品等浏览书籍。
实现说明
范围(Ranges)用于通过将画布分组在一起和/或通过提供与清单(Manifest)的items属性中显示的顺序不同的画布顺序来表示一个书籍对象的内部结构。范围可以包括画布、画布的一部分或其他范围,从而创建像目录一样的树结构。
范围包含在structures属性中,并且需要一个label属性以在ToC中显示(labels不是从引用的 Canvas 继承的,因此您需要在范围中显式包含label属性)。在一个范围中,资源作为一个使用items属性的资源数组被包含在内。只需将一个items数组嵌套在另一个items数组中,就可以使这些结构分层。当章可能被进一步细分或在多作品(其中每一单个作品可能也会分章)的情况下,这很有用。这与之前版本的IIIF展示API 定义的方法不同。
behavior属性也可以应用于范围。有关behavior如何影响范围中的导航的更多信息,请参阅IIIF展示API的范围部分和 [范围和behavior属性][229] 专题。
限制
示例
在此示例中,一份埃塞俄比亚手稿包含多部作品,其中一部作品包含多个小节。清单(Manifest)包含一个范围(Range)来表示顶级结构(从第 247-254 行开始),以及另一个嵌入的范围来表示第二部作品Arede’et(从第275-282行开始)的内容部分。这将导致像这样的分层 ToC:
- Tabiba Tabiban [ጠቢበ ጠቢባን]
- Arede’et [አርድዕት]
- 周一
- 周二
JSON-LD | 在Universal Viewer中查看 | 在Mirador中查看
{"@context": "http://iiif.io/api/presentation/3/context.json","id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/manifest.json","type": "Manifest","label": {"en": ["Ethiopic Ms 10"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1","type": "Canvas","label": {"en": ["f. 1r"]},"height": 2504,"width": 1768,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p1/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0001-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-1-21198-zz001d8m41_774608_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2504,"width": 1768,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-1-21198-zz001d8m41_774608_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1"}]}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2","type": "Canvas","label": {"en": ["f. 1v"]},"height": 2512,"width": 1792,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p2/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0002-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-2-21198-zz001d8m5j_774612_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2512,"width": 1792,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-2-21198-zz001d8m5j_774612_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2"}]}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3","type": "Canvas","label": {"en": ["f. 2r"]},"height": 2456,"width": 1792,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p3/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0003-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-3-21198-zz001d8tm5_775004_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2456,"width": 1792,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-3-21198-zz001d8tm5_775004_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3"}]}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4","type": "Canvas","label": {"en": ["f. 2v"]},"height": 2440,"width": 1760,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p4/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0004-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-4-21198-zz001d8tnp_775007_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2440,"width": 1760,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-4-21198-zz001d8tnp_775007_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4"}]}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5","type": "Canvas","label": {"en": ["f. 3r"]},"height": 2416,"width": 1776,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p5/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0005-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-5-21198-zz001d8v6f_775077_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2416,"width": 1776,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-5-21198-zz001d8v6f_775077_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5"}]}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6","type": "Canvas","label": {"en": ["f. 3v"]},"height": 2416,"width": 1776,"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p6/1","type": "AnnotationPage","items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0006-image","type": "Annotation","motivation": "painting","body": {"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-6-21198-zz001d8v7z_775085_master/full/max/0/default.jpg","type": "Image","format": "image/jpeg","height": 2416,"width": 1776,"service": [{"id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-6-21198-zz001d8v7z_775085_master","type": "ImageService3","profile": "level1"}]},"target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6"}]}]}],"structures": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r0","type": "Range","label": {"en": ["Table of Contents"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r1","type": "Range","label": {"gez": ["Tabiba Tabiban [ጠቢበ ጠቢባን]"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1","type": "Canvas"},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2","type": "Canvas"}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2","type": "Range","label": {"gez": ["Arede'et [አርድዕት]"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2/1","type": "Range","label": {"en": ["Monday"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3","type": "Canvas"},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4","type": "Canvas"}]},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2/2","type": "Range","label": {"en": ["Tuesday"]},"items": [{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5","type": "Canvas"},{"id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6","type": "Canvas"}]}]}]}]}
