翻译者: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中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/manifest.json",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Ethiopic Ms 10"
  8. ]
  9. },
  10. "items": [
  11. {
  12. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1",
  13. "type": "Canvas",
  14. "label": {
  15. "en": [
  16. "f. 1r"
  17. ]
  18. },
  19. "height": 2504,
  20. "width": 1768,
  21. "items": [
  22. {
  23. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p1/1",
  24. "type": "AnnotationPage",
  25. "items": [
  26. {
  27. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0001-image",
  28. "type": "Annotation",
  29. "motivation": "painting",
  30. "body": {
  31. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-1-21198-zz001d8m41_774608_master/full/max/0/default.jpg",
  32. "type": "Image",
  33. "format": "image/jpeg",
  34. "height": 2504,
  35. "width": 1768,
  36. "service": [
  37. {
  38. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-1-21198-zz001d8m41_774608_master",
  39. "type": "ImageService3",
  40. "profile": "level1"
  41. }
  42. ]
  43. },
  44. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1"
  45. }
  46. ]
  47. }
  48. ]
  49. },
  50. {
  51. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2",
  52. "type": "Canvas",
  53. "label": {
  54. "en": [
  55. "f. 1v"
  56. ]
  57. },
  58. "height": 2512,
  59. "width": 1792,
  60. "items": [
  61. {
  62. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p2/1",
  63. "type": "AnnotationPage",
  64. "items": [
  65. {
  66. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0002-image",
  67. "type": "Annotation",
  68. "motivation": "painting",
  69. "body": {
  70. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-2-21198-zz001d8m5j_774612_master/full/max/0/default.jpg",
  71. "type": "Image",
  72. "format": "image/jpeg",
  73. "height": 2512,
  74. "width": 1792,
  75. "service": [
  76. {
  77. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-2-21198-zz001d8m5j_774612_master",
  78. "type": "ImageService3",
  79. "profile": "level1"
  80. }
  81. ]
  82. },
  83. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2"
  84. }
  85. ]
  86. }
  87. ]
  88. },
  89. {
  90. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3",
  91. "type": "Canvas",
  92. "label": {
  93. "en": [
  94. "f. 2r"
  95. ]
  96. },
  97. "height": 2456,
  98. "width": 1792,
  99. "items": [
  100. {
  101. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p3/1",
  102. "type": "AnnotationPage",
  103. "items": [
  104. {
  105. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0003-image",
  106. "type": "Annotation",
  107. "motivation": "painting",
  108. "body": {
  109. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-3-21198-zz001d8tm5_775004_master/full/max/0/default.jpg",
  110. "type": "Image",
  111. "format": "image/jpeg",
  112. "height": 2456,
  113. "width": 1792,
  114. "service": [
  115. {
  116. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-3-21198-zz001d8tm5_775004_master",
  117. "type": "ImageService3",
  118. "profile": "level1"
  119. }
  120. ]
  121. },
  122. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3"
  123. }
  124. ]
  125. }
  126. ]
  127. },
  128. {
  129. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4",
  130. "type": "Canvas",
  131. "label": {
  132. "en": [
  133. "f. 2v"
  134. ]
  135. },
  136. "height": 2440,
  137. "width": 1760,
  138. "items": [
  139. {
  140. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p4/1",
  141. "type": "AnnotationPage",
  142. "items": [
  143. {
  144. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0004-image",
  145. "type": "Annotation",
  146. "motivation": "painting",
  147. "body": {
  148. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-4-21198-zz001d8tnp_775007_master/full/max/0/default.jpg",
  149. "type": "Image",
  150. "format": "image/jpeg",
  151. "height": 2440,
  152. "width": 1760,
  153. "service": [
  154. {
  155. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-4-21198-zz001d8tnp_775007_master",
  156. "type": "ImageService3",
  157. "profile": "level1"
  158. }
  159. ]
  160. },
  161. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4"
  162. }
  163. ]
  164. }
  165. ]
  166. },
  167. {
  168. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5",
  169. "type": "Canvas",
  170. "label": {
  171. "en": [
  172. "f. 3r"
  173. ]
  174. },
  175. "height": 2416,
  176. "width": 1776,
  177. "items": [
  178. {
  179. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p5/1",
  180. "type": "AnnotationPage",
  181. "items": [
  182. {
  183. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0005-image",
  184. "type": "Annotation",
  185. "motivation": "painting",
  186. "body": {
  187. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-5-21198-zz001d8v6f_775077_master/full/max/0/default.jpg",
  188. "type": "Image",
  189. "format": "image/jpeg",
  190. "height": 2416,
  191. "width": 1776,
  192. "service": [
  193. {
  194. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-5-21198-zz001d8v6f_775077_master",
  195. "type": "ImageService3",
  196. "profile": "level1"
  197. }
  198. ]
  199. },
  200. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5"
  201. }
  202. ]
  203. }
  204. ]
  205. },
  206. {
  207. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6",
  208. "type": "Canvas",
  209. "label": {
  210. "en": [
  211. "f. 3v"
  212. ]
  213. },
  214. "height": 2416,
  215. "width": 1776,
  216. "items": [
  217. {
  218. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/page/p6/1",
  219. "type": "AnnotationPage",
  220. "items": [
  221. {
  222. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/annotation/p0006-image",
  223. "type": "Annotation",
  224. "motivation": "painting",
  225. "body": {
  226. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-6-21198-zz001d8v7z_775085_master/full/max/0/default.jpg",
  227. "type": "Image",
  228. "format": "image/jpeg",
  229. "height": 2416,
  230. "width": 1776,
  231. "service": [
  232. {
  233. "id": "https://iiif.io/api/image/3.0/example/reference/d3bbf5397c6df6b894c5991195c912ab-6-21198-zz001d8v7z_775085_master",
  234. "type": "ImageService3",
  235. "profile": "level1"
  236. }
  237. ]
  238. },
  239. "target": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6"
  240. }
  241. ]
  242. }
  243. ]
  244. }
  245. ],
  246. "structures": [
  247. {
  248. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r0",
  249. "type": "Range",
  250. "label": {
  251. "en": [
  252. "Table of Contents"
  253. ]
  254. },
  255. "items": [
  256. {
  257. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r1",
  258. "type": "Range",
  259. "label": {
  260. "gez": [
  261. "Tabiba Tabiban [ጠቢበ ጠቢባን]"
  262. ]
  263. },
  264. "items": [
  265. {
  266. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p1",
  267. "type": "Canvas"
  268. },
  269. {
  270. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p2",
  271. "type": "Canvas"
  272. }
  273. ]
  274. },
  275. {
  276. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2",
  277. "type": "Range",
  278. "label": {
  279. "gez": [
  280. "Arede'et [አርድዕት]"
  281. ]
  282. },
  283. "items": [
  284. {
  285. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2/1",
  286. "type": "Range",
  287. "label": {
  288. "en": [
  289. "Monday"
  290. ]
  291. },
  292. "items": [
  293. {
  294. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p3",
  295. "type": "Canvas"
  296. },
  297. {
  298. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p4",
  299. "type": "Canvas"
  300. }
  301. ]
  302. },
  303. {
  304. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/range/r2/2",
  305. "type": "Range",
  306. "label": {
  307. "en": [
  308. "Tuesday"
  309. ]
  310. },
  311. "items": [
  312. {
  313. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p5",
  314. "type": "Canvas"
  315. },
  316. {
  317. "id": "https://iiif.io/api/cookbook/recipe/0024-book-4-toc/canvas/p6",
  318. "type": "Canvas"
  319. }
  320. ]
  321. }
  322. ]
  323. }
  324. ]
  325. }
  326. ]
  327. }

相关专题