翻译者:宋杰

原文链接:https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/

译文:

用例

当你用一个标签来注释一个资源时,你想把这个标签连接到一个外部来源,无论是一个权威文件、一个链接数据节点,还是其他一些明确表示你想与注释的资源相关联的数据的东西。

实现说明

IIIF Presentation 3.0 API本身并没有讨论在注释中链接到外部网络资源,而是通过引用从W3C网络注释数据模型中吸收了这些资源。关于这一点以及IIIF注释中使用的数据模型的其他部分的完整描述,我们建议你阅读该文件。

为了使IIIF资源和外部网络资源之间的链接成为可能,相关的注释必须至少有一个主体 body ,它是一个特定资源,其源属性包含适当的URI作为其值。该源 source 值必须是解析的,也就是说,在创建注释时它必须是一个真实的URI。

最后,请确保你在你的注释中编写了有效的值形式。在 Web Annotation 数据模型中,Annotation 中使用时,值 value 属性有不同的模式。例如,TextualBody 或 FragmentSelector 的值 value 是一个字符串而不是一个JSON对象。也请参见 Presentation API v3.0。

限制

未知

示例

在这个例子中,我们继续使用一张德国哥廷根广场的照片,其中包括一个喷泉,上面有一个女孩的雕塑和两只陪伴的鹅。虽然指向该喷泉的维基数据条目的注释主体 body 单独有效,但我们又增加了一个主体 body ,为浏览者提供自然语言的文本标签,以显示给使用该浏览者。

使用多个主体 body 属性,如这里所示,不会对查看器处理数据产生任何可预测的后果。考虑到这一点,这个Manifest中的每个主体都可以独立存在。

目前没有查看器实现这种标记方法。

JSON-LD

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/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/0258-tagging-external-resource/canvas/p1",
  13. "type": "Canvas",
  14. "height": 3024,
  15. "width": 4032,
  16. "items": [
  17. {
  18. "id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/page/p1/1",
  19. "type": "AnnotationPage",
  20. "items": [
  21. {
  22. "id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/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/0258-tagging-external-resource/canvas/p1"
  40. }
  41. ]
  42. }
  43. ],
  44. "annotations": [
  45. {
  46. "id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/page/p2/1",
  47. "type": "AnnotationPage",
  48. "items": [
  49. {
  50. "id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/annotation/anno/p0002-wikidata",
  51. "type": "Annotation",
  52. "motivation": "tagging",
  53. "body": [
  54. {
  55. "type": "SpecificResource",
  56. "source": "http://www.wikidata.org/entity/Q18624915"
  57. },
  58. {
  59. "type": "TextualBody",
  60. "value": "Gänsenliesel-Brunnen",
  61. "format": "text/plain",
  62. "language": "de"
  63. }
  64. ],
  65. "target": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/canvas/p1#xywh=749,1054,338,460"
  66. }
  67. ]
  68. }
  69. ]
  70. }
  71. ]
  72. }

相关专题

  • 简单标注
  • 简单标注 - 标签