Timeline API
Timeline APIは、IIIF Presentation API 2.1のManifest (http://iiif.io/api/presentation/2.1/#manifest)を拡張した構造を取る。現時点ではIIIF Presentation API 2.1の独自拡張であり、@typeはtl:Manifestとしている。ここでは、この拡張されたManifestをtl:Manifestと呼ぶ。
tl:Manifestの構造は、次のようになる。
-
tl:Manifest-
@context(必須) -
@type(必須) -
@id(必須) -
label(必須) viewingHint-
sequences/cursors(どちらか必須)
-
tl:Manifestでは、ManifestのviewingHintプロパティが取りうる値として、新たにindexとtimeを導入する。以下、tl:ManifestでviewingHint値がtimeであるものをTimelineと呼ぶ。
tl:Manifestでは、sequencesプロパティに代えて、新たに導入したcursorsプロパティを用いて閲覧対象を指定できる。cursorsは、Cursorサービスに関する情報の順序付きリスト(配列)である。これをtl:cursorServiceと呼ぶ。なおCursorサービスについては、Cursor APIを参照のこと。
tl:CursorServiceの構造は、次のようになる。
-
tl:CursorService@id-
service(必須)-
@context(必須) -
@id(必須) profile
-
-
first/last/default(いずれか必須) stepstatus
serviceの@idにはCursorのURIを記載する。このURIは参照解決可能なものでなければならない。
firstは、serviceの@idで指定したCursorが取りうる最初のcursorIndex値、lastは最後のcursorIndex値、defaultはデフォルトのcursorIndex値を記載する。TimelineにおいてはcursorIndex値はUnix time(秒)として解釈される。
stepは、serviceの@idで指定したCursorに含まれるcs:CanvasのcursorIndexプロパティ値が等間隔である場合に、その間隔を記載する。前述Cursorに含まれるcs:CanvasのcursorIndexプロパティ値が等間隔ではない場合は、stepは設定してはならない。Timelineにおいては、step値は秒として解釈される。クライアントは、この値を参考情報として利用してもよい。
statusは、Timelineが固定されたものである場合はfixed、更新される可能性がある場合はupdatingと記載する。クライアントは、この値を参考情報として利用してもよい。
記述例
{
"@context": [
"http://iiif.io/api/presentation/2/context.json",
"http://codh.rois.ac.jp/iiif/timeline/1/context.json"
],
"@type": "tl:Manifest",
"@id": "http://codh.rois.ac.jp/iiif/iiif-curation-viewer/sample/himawari/timeline.json",
"label": [
{
"@value": "デジタル台風:ひまわり8号クリッピング",
"@language": "ja"
},
{
"@value": "Digital Typhoon: Himawari-8 Clipping",
"@language": "en"
}
],
"attribution": "NII \"Digital Typhoon\" / NICT \"Science Cloud\"",
"related": [
{
"format": "text/html",
"@id": "http://agora.ex.nii.ac.jp/digital-typhoon/himawari-3g/clipping/"
}
],
"viewingHint": "time",
"cursors": [
{
"@id": "http://agora.ex.nii.ac.jp/digital-typhoon/service/iiif/Hsfd/cursor",
"service": {
"@context": "http://codh.rois.ac.jp/iiif/cursor/1/context.json",
"@id": "http://agora.ex.nii.ac.jp/digital-typhoon/service/iiif/Hsfd/cursor",
"profile": "http://codh.rois.ac.jp/iiif/cursor/1/level0.json"
},
"first": 1436234400,
"last": 1498867200,
"default": 1498867200,
"step": 600,
"status": "updating"
}
]
}