翻译者:宋杰

原文链接:https://iiif.io/api/cookbook/recipe/0021-tagging/

译文:

用例

对于一个IIIF资源,你想给该资源添加一个简单的注解。这个注解可能会把图像的一个特定元素或特征作为一个标签叫出来。这样的标签,作为资源的Manifest的一部分,可以被发现,并可能与一个或多个机构的IIIF资源中其他相同或类似的标签聚集在一起。

实现说明

这个专题演示了使用注解来标记 IIIF 资源或 IIIF 资源的一部分的简单方法:一个带有动机motivation属性的注解,其值为标记tagging。IIIF中标签的基础是W3C网络注解数据模型,我们鼓励你参考它。

尽管这里没有演示,但值得注意的是,像标签这样的注解被允许使用值为隐藏hidden的行为behavior属性。在如此设置该属性的情况下,查看器和其它消费客户端不应默认显示该标记,而应允许用户决定该标记的可见性。

限制

未知

示例

在这个Manifest中,我们使用了一张来自2019年IIIF年会的哥廷根照片,这张照片为本专题中的其他一些基本专题提供了资源。我们引入一个注释,通过呼唤喷泉顶部的雕像来演示标记,这是其城市的一个显著的地标。

因为雕像不是照片中唯一或主要的元素,我们使用片段选择器语法将标签定位到照片的一部分。

JSON-LD | 在Mirador中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/manifest.json",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Picture of Göttingen taken during the 2019 IIIF Conference"
  8. ]
  9. },
  10. "items": [
  11. {
  12. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/canvas/p1",
  13. "type": "Canvas",
  14. "height": 3024,
  15. "width": 4032,
  16. "items": [
  17. {
  18. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/page/p1/1",
  19. "type": "AnnotationPage",
  20. "items": [
  21. {
  22. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/annotation/p0001-image",
  23. "type": "Annotation",
  24. "motivation": "painting",
  25. "body": {
  26. "id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen/full/max/0/default.jpg",
  27. "type": "Image",
  28. "format": "image/jpeg",
  29. "height": 3024,
  30. "width": 4032,
  31. "service": [
  32. {
  33. "id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen",
  34. "profile": "level1",
  35. "type": "ImageService3"
  36. }
  37. ]
  38. },
  39. "target": "https://iiif.io/api/cookbook/recipe/0021-tagging/canvas/p1"
  40. }
  41. ]
  42. }
  43. ],
  44. "annotations": [
  45. {
  46. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/page/p2/1",
  47. "type": "AnnotationPage",
  48. "items": [
  49. {
  50. "id": "https://iiif.io/api/cookbook/recipe/0021-tagging/annotation/p0002-tag",
  51. "type": "Annotation",
  52. "motivation": "tagging",
  53. "body": {
  54. "type": "TextualBody",
  55. "value": "Gänseliesel-Brunnen",
  56. "language": "de",
  57. "format": "text/plain"
  58. },
  59. "target": "https://iiif.io/api/cookbook/recipe/0021-tagging/canvas/p1#xywh=265,661,1260,1239"
  60. }
  61. ]
  62. }
  63. ]
  64. }
  65. ]
  66. }

相关专题

  • [片段选择器][0020]