翻译者:宋杰
原文链接: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中的每个主体都可以独立存在。
目前没有查看器实现这种标记方法。
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Picture of Göttingen taken during the 2019 IIIF Conference"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/canvas/p1",
"type": "Canvas",
"height": 3024,
"width": 4032,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/page/p1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/annotation/p0001-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 3024,
"width": 4032,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen",
"profile": "level1",
"type": "ImageService3"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/canvas/p1"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/page/p2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/annotation/anno/p0002-wikidata",
"type": "Annotation",
"motivation": "tagging",
"body": [
{
"type": "SpecificResource",
"source": "http://www.wikidata.org/entity/Q18624915"
},
{
"type": "TextualBody",
"value": "Gänsenliesel-Brunnen",
"format": "text/plain",
"language": "de"
}
],
"target": "https://iiif.io/api/cookbook/recipe/0258-tagging-external-resource/canvas/p1#xywh=749,1054,338,460"
}
]
}
]
}
]
}
相关专题
- 简单标注
- 简单标注 - 标签