翻译者:宋杰
原文链接:https://iiif.io/api/cookbook/recipe/0021-tagging/
用例
对于一个IIIF资源,你想给该资源添加一个简单的注解。这个注解可能会把图像的一个特定元素或特征作为一个标签叫出来。这样的标签,作为资源的Manifest的一部分,可以被发现,并可能与一个或多个机构的IIIF资源中其他相同或类似的标签聚集在一起。
实现说明
这个专题演示了使用注解来标记 IIIF 资源或 IIIF 资源的一部分的简单方法:一个带有动机motivation属性的注解,其值为标记tagging。IIIF中标签的基础是W3C网络注解数据模型,我们鼓励你参考它。
尽管这里没有演示,但值得注意的是,像标签这样的注解被允许使用值为隐藏hidden的行为behavior属性。在如此设置该属性的情况下,查看器和其它消费客户端不应默认显示该标记,而应允许用户决定该标记的可见性。
限制
示例
在这个Manifest中,我们使用了一张来自2019年IIIF年会的哥廷根照片,这张照片为本专题中的其他一些基本专题提供了资源。我们引入一个注释,通过呼唤喷泉顶部的雕像来演示标记,这是其城市的一个显著的地标。
因为雕像不是照片中唯一或主要的元素,我们使用片段选择器语法将标签定位到照片的一部分。
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Picture of Göttingen taken during the 2019 IIIF Conference"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/canvas/p1",
"type": "Canvas",
"height": 3024,
"width": 4032,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/page/p1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/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/0021-tagging/canvas/p1"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/page/p2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0021-tagging/annotation/p0002-tag",
"type": "Annotation",
"motivation": "tagging",
"body": {
"type": "TextualBody",
"value": "Gänseliesel-Brunnen",
"language": "de",
"format": "text/plain"
},
"target": "https://iiif.io/api/cookbook/recipe/0021-tagging/canvas/p1#xywh=265,661,1260,1239"
}
]
}
]
}
]
}
相关专题
- [片段选择器][0020]