翻译:Wu Gang
原文地址:https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/
专题主页 | 专题列表

用例

您有一份日语文本,通常会从右到左阅读(在读者的右侧装订);或者一本日记笔记,在纸的长边上书写,那么要从上到下阅读(远离读者装订译者注:即在上方装订)。 通过使用 viewingDirection,您可以将阅读方向传达给符合要求的客户端,允许它分别从右到左和从上到下将内容呈现给读者。
viewDirection 属性告诉展示客户端如何向查看器显示资源序列的一部分。 它允许用于 IIIF Collection(集合)、Manifest(清单)和 Range(范围)资源,但在其他类型的资源上则是无效的属性。当属性是 Collection 或 Manifest 的一部分时,推荐客户端处理它;当属性是 Range 的一部分时可选处理它;如果用于其他资源类型,则推荐忽略它。
viewDirection 的可能值是 left-to-right(未指定该属性时的缺省值)、right-to-left、top-to-bottom 和 bottom-to-top。 请特别注意,这是视图的视觉布局,而不是视图的方向,也不是所表示对象的视图的任何视觉材料的布局或方向。
viewDirection 属性可以告知客户端各种资源安排的适当展示顺序和导航提示。 示例包括手稿中的页面序列、卷轴的所有视图或一套多本书。
尽管下面的示例 Manifest 使用 items 属性来包含表示组成对象的视图的阅读顺序的 Canvas(画布),但 viewingDirection 属性的权重应该大于视图的 Manifest 顺序。

实施说明

除了viewingDirection 之外,您可能还想使用 behavior 属性(另请参阅手册(分页变化)专题),具体取决于查看资源的预期用户体验或物理对象及其数字代理的特性。 一本书最常见的 behavior 值是 paged。 viewDirection 和behavior 之间的交互,尤其是当它们设置在多个和/或分层有序的资源上时,需要特别注意。 建议您仔细阅读展示 3.0 规范的 behavior,并与未来版本保持同步。

限制

未知。

示例 1: viewingDirection right-to-left

本 Manifest 展示了从嘉永2年五月(1849年5月)起,在大阪筑后剧院举行的歌舞伎表演“秋葉権現廻船話”、“双蝶々曲輪日記”和“五大力恋緘”的节目单。译者注:参见https://calisphere.org/item/1c26b425-97c3-42ba-8479-6cf2a6c45861/
JSON-LD | Universal Viewer 内查看 | 在 Mirador 内查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/manifest-rtl.json",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Book with Right-to-Left Viewing Direction"
  8. ]
  9. },
  10. "summary": {
  11. "en": [
  12. "Playbill for \"Akiba gongen kaisen-banashi,\" \"Futatsu chōchō kuruwa nikki\" and \"Godairiki koi no fūjime\" performed at the Chikugo Theater in Osaka from the fifth month of Kaei 2 (May, 1849); main actors: Gadō Kataoka II, Ebizō Ichikawa VI, Kitō Sawamura II, Daigorō Mimasu IV and Karoku Nakamura I; on front cover: producer Mominosuke Ichikawa's crest."
  13. ]
  14. },
  15. "viewingDirection": "right-to-left",
  16. "items": [
  17. {
  18. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p1",
  19. "type": "Canvas",
  20. "label": {
  21. "en": [
  22. "front cover"
  23. ]
  24. },
  25. "width": 3497,
  26. "height": 4823,
  27. "items": [
  28. {
  29. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p1/1",
  30. "type": "AnnotationPage",
  31. "items": [
  32. {
  33. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0001-image",
  34. "type": "Annotation",
  35. "motivation": "painting",
  36. "body": {
  37. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001/full/max/0/default.jpg",
  38. "type": "Image",
  39. "format": "image/jpeg",
  40. "height": 4823,
  41. "width": 3497,
  42. "service": [
  43. {
  44. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001",
  45. "type": "ImageService3",
  46. "profile": "level1"
  47. }
  48. ]
  49. },
  50. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p1"
  51. }
  52. ]
  53. }
  54. ]
  55. },
  56. {
  57. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p2",
  58. "type": "Canvas",
  59. "label": {
  60. "en": [
  61. "pages 1–2"
  62. ]
  63. },
  64. "width": 6062,
  65. "height": 4804,
  66. "items": [
  67. {
  68. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p2/1",
  69. "type": "AnnotationPage",
  70. "items": [
  71. {
  72. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0002-image",
  73. "type": "Annotation",
  74. "motivation": "painting",
  75. "body": {
  76. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_002/full/max/0/default.jpg",
  77. "type": "Image",
  78. "format": "image/jpeg",
  79. "width": 6062,
  80. "height": 4804,
  81. "service": [
  82. {
  83. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_002",
  84. "type": "ImageService3",
  85. "profile": "level1"
  86. }
  87. ]
  88. },
  89. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p2"
  90. }
  91. ]
  92. }
  93. ]
  94. },
  95. {
  96. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p3",
  97. "type": "Canvas",
  98. "label": {
  99. "en": [
  100. "pages 3–4"
  101. ]
  102. },
  103. "width": 6127,
  104. "height": 4776,
  105. "items": [
  106. {
  107. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p3/1",
  108. "type": "AnnotationPage",
  109. "items": [
  110. {
  111. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0003-image",
  112. "type": "Annotation",
  113. "motivation": "painting",
  114. "body": {
  115. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_003/full/max/0/default.jpg",
  116. "type": "Image",
  117. "format": "image/jpeg",
  118. "width": 6127,
  119. "height": 4776,
  120. "service": [
  121. {
  122. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_003",
  123. "type": "ImageService3",
  124. "profile": "level1"
  125. }
  126. ]
  127. },
  128. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p3"
  129. }
  130. ]
  131. }
  132. ]
  133. },
  134. {
  135. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p4",
  136. "type": "Canvas",
  137. "label": {
  138. "en": [
  139. "pages 5–6"
  140. ]
  141. },
  142. "width": 6124,
  143. "height": 4751,
  144. "items": [
  145. {
  146. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p4/1",
  147. "type": "AnnotationPage",
  148. "items": [
  149. {
  150. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0004-image",
  151. "type": "Annotation",
  152. "motivation": "painting",
  153. "body": {
  154. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_004/full/max/0/default.jpg",
  155. "type": "Image",
  156. "format": "image/jpeg",
  157. "width": 6124,
  158. "height": 4751,
  159. "service": [
  160. {
  161. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_004",
  162. "type": "ImageService3",
  163. "profile": "level1"
  164. }
  165. ]
  166. },
  167. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p4"
  168. }
  169. ]
  170. }
  171. ]
  172. },
  173. {
  174. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p5",
  175. "type": "Canvas",
  176. "label": {
  177. "en": [
  178. "back cover"
  179. ]
  180. },
  181. "width": 3510,
  182. "height": 4808,
  183. "items": [
  184. {
  185. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p5/1",
  186. "type": "AnnotationPage",
  187. "items": [
  188. {
  189. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0005-image",
  190. "type": "Annotation",
  191. "motivation": "painting",
  192. "body": {
  193. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_005/full/max/0/default.jpg",
  194. "type": "Image",
  195. "format": "image/jpeg",
  196. "width": 3510,
  197. "height": 4808,
  198. "service": [
  199. {
  200. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_005",
  201. "type": "ImageService3",
  202. "profile": "level1"
  203. }
  204. ]
  205. },
  206. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p5"
  207. }
  208. ]
  209. }
  210. ]
  211. }
  212. ]
  213. }

示例 2: viewingDirection top-to-bottom

本 Manifest 代表了美国长途自行车手威廉·刘易斯·萨赫勒本(William Lewis Sachtleben)日记的一部分,他于 1891 年至 1892 年与华盛顿大学同学小托马斯·盖斯凯尔·艾伦(Thomas Gaskell Allen Jr.)从伊斯坦布尔骑车穿越亚洲到达北京。
JSON-LD | 在 Universal Viewer 中查看 | 在 Mirador 中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/manifest-ttb.json",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Diary with Top-to-Bottom Viewing Direction"
  8. ]
  9. },
  10. "summary": {
  11. "en": [
  12. "William Lewis Sachtleben was an American long-distance cyclist who rode across Asia from Istanbul to Peking in 1891 to 1892 with Thomas Gaskell Allen Jr., his classmate from Washington University. This was part of a longer journey that began the day after they had graduated from college, when they travelled to New York and on to Liverpool; in all they travelled 15,044 miles by bicycle, 'the longest continuous land journey ever made around the world' as reported in their book <cite>Across Asia on a bicycle</cite> (1895). Sachtleben documented his travels with photographs and diaries, the latter of which he numbered sequentially. The diary of notebook 'No. 10' covers a portion of their journey through the Armenian area of Turkey from April 12 to May 9 (there is a 2-page reading list at the end). During this time they rode from Ankara (Angora in the diary) to Sivas, where they stayed for ten days while Allen had a bout of typhoid fever, and the first half of a ten-day excursion to Merzifon (Mersovan in the diary), taken by Sachtleben to give Allen additional time to recover."
  13. ]
  14. },
  15. "viewingDirection": "top-to-bottom",
  16. "items": [
  17. {
  18. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v1",
  19. "type": "Canvas",
  20. "label": {
  21. "en": [
  22. "image 1"
  23. ]
  24. },
  25. "width": 2251,
  26. "height": 3152,
  27. "items": [
  28. {
  29. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v1/1",
  30. "type": "AnnotationPage",
  31. "items": [
  32. {
  33. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0001-image",
  34. "type": "Annotation",
  35. "motivation": "painting",
  36. "body": {
  37. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_02/full/max/0/default.jpg",
  38. "type": "Image",
  39. "format": "image/jpeg",
  40. "width": 2251,
  41. "height": 3152,
  42. "service": [
  43. {
  44. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_02",
  45. "type": "ImageService3",
  46. "profile": "level1"
  47. }
  48. ]
  49. },
  50. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v1"
  51. }
  52. ]
  53. }
  54. ]
  55. },
  56. {
  57. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v2",
  58. "type": "Canvas",
  59. "label": {
  60. "en": [
  61. "image 2"
  62. ]
  63. },
  64. "width": 2268,
  65. "height": 3135,
  66. "items": [
  67. {
  68. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v2/1",
  69. "type": "AnnotationPage",
  70. "items": [
  71. {
  72. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0002-image",
  73. "type": "Annotation",
  74. "motivation": "painting",
  75. "body": {
  76. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_03/full/max/0/default.jpg",
  77. "type": "Image",
  78. "format": "image/jpeg",
  79. "width": 2268,
  80. "height": 3135,
  81. "service": [
  82. {
  83. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_03",
  84. "type": "ImageService3",
  85. "profile": "level1"
  86. }
  87. ]
  88. },
  89. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v2"
  90. }
  91. ]
  92. }
  93. ]
  94. },
  95. {
  96. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v3",
  97. "type": "Canvas",
  98. "label": {
  99. "en": [
  100. "image 3"
  101. ]
  102. },
  103. "width": 2274,
  104. "height": 3135,
  105. "items": [
  106. {
  107. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v3/1",
  108. "type": "AnnotationPage",
  109. "items": [
  110. {
  111. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0003-image",
  112. "type": "Annotation",
  113. "motivation": "painting",
  114. "body": {
  115. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_04/full/max/0/default.jpg",
  116. "type": "Image",
  117. "format": "image/jpeg",
  118. "width": 2274,
  119. "height": 3135,
  120. "service": [
  121. {
  122. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_04",
  123. "type": "ImageService3",
  124. "profile": "level1"
  125. }
  126. ]
  127. },
  128. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v3"
  129. }
  130. ]
  131. }
  132. ]
  133. },
  134. {
  135. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v4",
  136. "type": "Canvas",
  137. "label": {
  138. "en": [
  139. "image 4"
  140. ]
  141. },
  142. "width": 2268,
  143. "height": 3135,
  144. "items": [
  145. {
  146. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v4/1",
  147. "type": "AnnotationPage",
  148. "items": [
  149. {
  150. "id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0004-image",
  151. "type": "Annotation",
  152. "motivation": "painting",
  153. "body": {
  154. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_05/full/max/0/default.jpg",
  155. "type": "Image",
  156. "format": "image/jpeg",
  157. "width": 2268,
  158. "height": 3135,
  159. "service": [
  160. {
  161. "id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_05",
  162. "type": "ImageService3",
  163. "profile": "level1"
  164. }
  165. ]
  166. },
  167. "target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v4"
  168. }
  169. ]
  170. }
  171. ]
  172. }
  173. ]
  174. }

相关专题