翻译者:宋杰
原文链接:https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/
用例
你想在画布上标注一些文字,作为评论或标签。在此配方中,我们对整个画布进行注释,但如果您想针对画布的特定部分或区域进行注释,请参阅简单注释—标签或用非矩形多边形进行注释。
实现说明
画布的注释以注释页对象的形式存储在画布的注释属性中,其中包含符合 W3C 网络注释格式的注释对象列表。
注释页和注释可以嵌入到清单中(如下例),也可以通过提供包含注释页的外部文档的 URI 来引用(参见嵌入或引用注释)。
注释页对象必须具有 AnnotationPage 类型 type、包含唯一 URI(无需解析)的 id 属性和包含一个或多个注释的列表的 items 属性。
注释必须有Annotation类型 type,和一个包含评论或标签文本的body属性。主体本身可以是一个类型type为TextualBody的对象,它在值value属性中包含文本,并在格式属性中指定文本字符串的格式(例如text/plain),在语言属性中指定语言language(例如德语的de)。
注释必须有一个目标target属性,对于一个完整的Canvas注释来说,它只包含Canvas的URI,没有额外的片段或选择器。
注释应该有一个动机motivation属性,该属性可以包含不同的值,指定注释的目的。W3C网络注解规范有一个完整的动机列表。常用的值是评论commenting和标记tagging。在使用其他动机时要注意,IIIF查看器可能只显示具有某些动机的注释。
限制
对整个 Canvas 进行注释的语义,可以通过使用 Canvas URI 而不使用片段或选择器(如本例),或者使用选择 Canvas 全部区域的选择器来指定(参见 “简单注释 - 标记”,了解如何使用片段选择器的简单示例)。使用选择整个 Canvas 区域的选择器是一种更普遍的模式,可能会得到 IIIF 客户端的更好支持。
示例
这个例子包含一个嵌入的注释,其中包含文本 “Göttinger Marktplatz mit Gänseliesel Brunnen”,其动机是针对整个 Canvas 进行评论。注释是 Canvas 的注解属性中包含的注解页的单一内容。
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Picture of Göttingen taken during the 2019 IIIF Conference"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1",
"type": "Canvas",
"height": 3024,
"width": 4032,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-1/anno-1",
"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/0266-full-canvas-annotation/canvas-1"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2/anno-1",
"type": "Annotation",
"motivation": "commenting",
"body": {
"type": "TextualBody",
"language": "de",
"format": "text/plain",
"value": "Göttinger Marktplatz mit Gänseliesel Brunnen"
},
"target": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1"
}
]
}
]
}
]
}
相关专题
- 简单注释—使用片段选择器为注释贴标签
- 使用SVG选择器的注释的非矩形多边形的注释
- 最简单的宣言—图像
- 最简单的宣言—音频
- 最简单的清单—视频
- 嵌入或引用的注释