ROIS-DS人文学オープンデータ共同利用センター(CODH)

Curation API 1.0

Curation API

Curation APIは、IIIF Presentation API 2.1のCollection (http://iiif.io/api/presentation/2.1/#collection)に類似した構造を取る。現時点ではIIIF Presentation API 2.1の独自拡張であり、@typecr:Curationとしている。以下、この構造をCurationと呼ぶ。

Collectionが物理的なオブジェクト(一冊の図書など)に対応したManifestを最小粒度としてグループ化したものとして想定されているのに対し、Curationは、Canvasに含まれる矩形領域を最小粒度として、Manifest横断的にグループ化可能なものとして想定している。

Curationの構造は以下のようになる。

  • Curation
    • @context(必須)
    • @type(必須)
    • @id(必須)
    • label(必須)
    • selections(必須)
      • Range
        • canvases/members(どちらか必須)
        • within(必須)

Curationでは、新たに導入したselectionsプロパティを用いて閲覧対象Canvasを指定する。selectionsは、Range (http://iiif.io/api/presentation/2.1/#range)の順序付きリスト(配列)である。Rangeでは、canvasesプロパティ等を用いてCanvasまたはCanvasの部分矩形領域を指定し、Canvasが属するManifestの情報はwithinプロパティを用いて記述する。

Canvasの部分矩形領域を指定する場合は、Canvas@id#xywh=(http://iiif.io/api/presentation/2.1/#segments)形式のフラグメントを付加する。

記述例

{
 "@context": [
 "http://iiif.io/api/presentation/2/context.json",
 "http://codh.rois.ac.jp/iiif/curation/1/context.json"
 ],
 "@type": "cr:Curation",
 "@id": "http://codh.rois.ac.jp/iiif/iiif-curation-viewer/sample/curation.json",
 "label": "Curated NIJL Data set",
 "attribution": "Provided by CODH (ROIS) and NIJL NW Project.",
 "related": {
 "@id": "http://codh.rois.ac.jp/pmjt/book/",
 "format": "text/html"
 },
 "selections": [
 {
 "@id": "http://codh.rois.ac.jp/pmjt/book/200014778/range/r1",
 "@type": "sc:Range",
 "label": "Curated contents from 『画本虫撰』",
 "canvases": [
 "http://codh.rois.ac.jp/pmjt/iiif/200014778/canvas/00000",
 "http://codh.rois.ac.jp/pmjt/iiif/200014778/canvas/00011",
 "http://codh.rois.ac.jp/pmjt/iiif/200014778/canvas/00023",
 "http://codh.rois.ac.jp/pmjt/iiif/200014778/canvas/00023#xywh=3435,2487,840,750"
 ],
 "within": "http://codh.rois.ac.jp/pmjt/book/200014778/manifest.json"
 },
 {
 "@id": "http://codh.rois.ac.jp/pmjt/book/200003067/range/r1",
 "@type": "sc:Range",
 "label": "Curated contents from 『唐糸草紙』",
 "members": [
 {
 "@id": "http://codh.rois.ac.jp/pmjt/iiif/200003067/canvas/00000",
 "@type": "sc:Canvas",
 "label": "p.1"
 },
 {
 "@id": "http://codh.rois.ac.jp/pmjt/iiif/200003067/canvas/00008",
 "@type": "sc:Canvas",
 "label": "p.9"
 },
 {
 "@id": "http://codh.rois.ac.jp/pmjt/iiif/200003067/canvas/00010",
 "@type": "sc:Canvas",
 "label": "p.11"
 },
 {
 "@id": "http://codh.rois.ac.jp/pmjt/iiif/200003067/canvas/00010#xywh=2850,1000,730,680",
 "@type": "sc:Canvas",
 "label": "p.11"
 }
 ],
 "within": {
 "@id": "http://codh.rois.ac.jp/pmjt/book/200003067/manifest.json",
 "@type": "sc:Manifest",
 "label": "唐糸草紙"
 }
 }
 ]
}

Timeline APIとCuration APIの組み合わせ

Curation APIをTimeline APIと組み合せて使えば、時系列画像からのキュレーションも可能となる。

Curationにおいて、Timelineに属するcs:Canvasを指定する場合には、selectionsプロパティのmembersを用いて対象を記述する。membersプロパティでのcs:Canvasの記述においては、cursorIndexプロパティの記載を必須とする。within@idにはTimeline@idを記載し、@typeプロパティ値はtl:Manifestとする。

記述例

{
 "@context": [
 "http://iiif.io/api/presentation/2/context.json",
 "http://codh.rois.ac.jp/iiif/curation/1/context.json"
 ],
 "@type": "cr:Curation",
 "@id": "http://codh.rois.ac.jp/iiif/iiif-curation-viewer/sample/himawari/curation.json",
 "label": [
 {
 "@value": "ひまわり8号ギャラリー",
 "@language": "ja"
 },
 {
 "@value": "Himawari-8 Gallery",
 "@language": "en"
 }
 ],
 "attribution": "NII \"Digital Typhoon\" / NICT \"Science Cloud\"",
 "related": {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/himawari-3g/gallery/",
 "format": "text/html"
 },
 "selections": [
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/range/r1",
 "@type": "sc:Range",
 "label": "Curated contents from 『デジタル台風:ひまわり8号クリッピング』",
 "members": [
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2015/07/07/20150707020000",
 "@type": "cs:Canvas",
 "label": "2015-07-07T02:00:00Z",
 "cursorIndex": 1436234400
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2015/09/29/20150929025000",
 "@type": "cs:Canvas",
 "label": "2015-09-29T02:50:00Z",
 "cursorIndex": 1443495000
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2015/09/29/20150929025000#xywh=828,1840,1318,592",
 "@type": "cs:Canvas",
 "label": "2015-09-29T02:50:00Z",
 "cursorIndex": 1443495000
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2016/08/07/20160807032000",
 "@type": "cs:Canvas",
 "label": "2016-08-07T03:20:00Z",
 "cursorIndex": 1470540000
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2016/08/07/20160807032000#xywh=5072,1530,2126,1520",
 "@type": "cs:Canvas",
 "label": "2016-08-07T03:20:00Z",
 "cursorIndex": 1470540000
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2016/08/27/20160827033000",
 "@type": "cs:Canvas",
 "label": "2016-08-27T03:30:00Z",
 "cursorIndex": 1472268600
 },
 {
 "@id": "http://agora.ex.nii.ac.jp/digital-typhoon/iiif/2016/08/27/20160827033000#xywh=2784,1109,4176,3028",
 "@type": "cs:Canvas",
 "label": "2016-08-27T03:30:00Z",
 "cursorIndex": 1472268600
 }
 ],
 "within": {
 "@id": "http://codh.rois.ac.jp/iiif/iiif-curation-viewer/sample/himawari/timeline.json",
 "@type": "tl:Manifest",
 "label": "デジタル台風:ひまわり8号クリッピング"
 }
 }
 ]
}

仕様

ontology.xml

context.json

IIIF拡張仕様

Curation API

Timeline API

Cursor API

ソフトウェア実装

IIIF Curation Viewer

IIIF Curation Viewer for Timeline

AltStyle によって変換されたページ (->オリジナル) /