This is a Japanese translation of the manual on how to add table of contents information in the Omeka S IIIF Server module. The official manual is available below.
I hope this serves as a reference when adding table of contents information to IIIF manifests using this module.
Config options for manifest
Input format of the property for structures (table of contents)
The default structure is a simple sequential list of IIIF media.
To build the structure of a complex document using a table of contents, use a specific property to enter the required JSON as the value, or enter a literal value in the following format. Each line is part of the structure (table of contents).
{id}, {label}, {canvasIndexOrRangeId1}; {canvasIndexOrRangeId2}; ...; {canvasIndexOrRangeIdN}
Example:
cover, Front Cover, 1
r1, Introduction, 2; 3; 4; 5
backCover, Back Cover, 6
The Range ID (the first part of the line) is the name of the Range used to create the URI. It must not be a number to avoid collisions with other indices. It should be a simple alphanumeric name without spaces, diacritics, or other special characters (very stable across all coding conventions). It cannot contain “/”. In any case, this name will be URL-encoded in the final URI.
Furthermore, the Range ID must be unique across all items.
If the input is omitted, the line number will be used. In that case, leave the first comma to indicate that there is no specific Range name. For example, if r1 is not specified above, the Range ID will be r2, composed of r indicating a Range and 2 indicating the second line. However, this method is not recommended because the URI will change when new lines are inserted.
The second part of each line is the label for the Range, such as a chapter name. If empty, it will be included in the IIIF manifest content but will not be displayed in IIIF-compatible viewers.
The last part of each line is a list of the parent Canvases or parent Ranges included in the current range, so it is essentially a list of images and subsections.
In most cases, the Canvas index is the position of the media. Note that only media used in IIIF are listed, and specific media such as PDFs or XML files attached to items are not listed, so it may differ from the Omeka internal position in the list of attached media. Other indices are managed as Range indices if they are in the list of Range IDs (the first part of each line). Otherwise, they become alphanumeric names for Canvases.
The first Range ID of the first line is the root of the tree. There is only one root. If there are multiple roots (see below), a main range is added with all roots as branches.
Therefore, it is possible to create a complex hierarchical table of contents from this literal value. The following uses an incomplete and incorrect example.
toc, Table of Contents, cover; intro; r1; r2; backcover
cover, Front cover, cover
intro, Introduction, 2-5
r1, First chapter, 6; r1-1; r1-2; 12
r1-1, First section, r1-1-1; r1-1-2; illustration1; illus2
r1-1-1, First sub-section, 8-9
r1-1-2, Second sub-section, 9-10
r2, Second chapter, 13
backcover, Back cover, "backcover"
illustration1, First illustration non paginated, illus1
illustration3, Third illustration non paginated, illus3
Example JSON output for IIIF v2:
[
{
"@id": "https://example.org/iiif/book1/range/toc",
"@type": "sc:Range",
"label": "Table of Contents",
"ranges": [
{
"@id": "https://example.org/iiif/book1/range/cover",
"@type": "sc:Range",
"label": "Front cover",
"ranges": [
{
"@id": "https://example.org/iiif/book1/range/cover",
"@type": "sc:Range",
"label": "Front cover"
}
]
},
{
"@id": "https://example.org/iiif/book1/range/intro",
"@type": "sc:Range",
"label": "Introduction",
"canvases": [
"https://example.org/iiif/book1/canvas/p2",
"https://example.org/iiif/book1/canvas/p3",
"https://example.org/iiif/book1/canvas/p4",
"https://example.org/iiif/book1/canvas/p5"
]
},
{
"@id": "https://example.org/iiif/book1/range/r1",
"@type": "sc:Range",
"label": "First chapter",
"members": [
{
"@id": "https://example.org/iiif/book1/canvas/p6",
"@type": "sc:Canvas",
"label": "[6]"
},
{
"@id": "https://example.org/iiif/book1/range/r1-1",
"@type": "sc:Range",
"label": "First section",
"members": [
{
"@id": "https://example.org/iiif/book1/range/r1-1-1",
"@type": "sc:Range",
"label": "First sub-section",
"canvases": [
"https://example.org/iiif/book1/canvas/p8",
"https://example.org/iiif/book1/canvas/p9"
]
},
{
"@id": "https://example.org/iiif/book1/range/r1-1-2",
"@type": "sc:Range",
"label": "Second sub-section",
"canvases": [
"https://example.org/iiif/book1/canvas/p9",
"https://example.org/iiif/book1/canvas/p10"
]
},
{
"@id": "https://example.org/iiif/book1/range/illustration1",
"@type": "sc:Range",
"label": "First illustration non paginated",
"canvases": [
"https://example.org/iiif/book1/canvas/illus1"
]
},
{
"@id": "https://example.org/iiif/book1/canvas/illus2",
"@type": "sc:Canvas",
"label": "illus2"
}
]
},
{
"@id": "https://example.org/iiif/book1/canvas/r1-2",
"@type": "sc:Canvas",
"label": "r1-2"
},
{
"@id": "https://example.org/iiif/book1/canvas/p12",
"@type": "sc:Canvas",
"label": "[12]"
}
]
},
{
"@id": "https://example.org/iiif/book1/range/r2",
"@type": "sc:Range",
"label": "Second chapter",
"canvases": [
"https://example.org/iiif/book1/canvas/p13"
]
},
{
"@id": "https://example.org/iiif/book1/range/backcover",
"@type": "sc:Range",
"label": "Back cover",
"canvases": [
"https://example.org/iiif/book1/canvas/backcover"
]
}
]
},
{
"@id": "https://example.org/iiif/book1/range/illustration3",
"@type": "sc:Range",
"label": "Third illustration non paginated",
"canvases": [
"https://example.org/iiif/book1/canvas/illus3"
]
}
]
Or, an example JSON output for IIIF v3. In this case, it becomes slightly more verbose.
[
{
"id": "https://example.org/iiif/book1/range/rstructure1",
"type": "Range",
"label": { "none": [ "Content" ] },
"items": [
{
"id": "https://example.org/iiif/book1/range/toc",
"type": "Range",
"label": { "none": [ "Table of Contents" ] },
"items": [
{
"id": "https://example.org/iiif/book1/range/cover",
"type": "Range",
"label": { "none": [ "Front cover" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/cover", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/intro",
"type": "Range",
"label": { "none": [ "Introduction" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/p2", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p3", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p4", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p5", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/r1",
"type": "Range",
"label": { "none": [ "First chapter" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/p6", "type": "Canvas" },
{
"id": "https://example.org/iiif/book1/range/r1-1",
"type": "Range",
"label": { "none": [ "First section" ] },
"items": [
{
"id": "https://example.org/iiif/book1/range/r1-1-1",
"type": "Range",
"label": { "none": [ "First sub-section" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/p8", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p9", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/r1-1-2",
"type": "Range",
"label": { "none": [ "Second sub-section" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/p9", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p10", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/illustration1",
"type": "Range",
"label": { "none": [ "First illustration non paginated" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/illus1", "type": "Canvas" }
]
},
{ "id": "https://example.org/iiif/book1/canvas/illus2", "type": "Canvas" }
]
},
{ "id": "https://example.org/iiif/book1/canvas/r1-2", "type": "Canvas" },
{ "id": "https://example.org/iiif/book1/canvas/p12", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/r2",
"type": "Range",
"label": { "none": [ "Second chapter" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/p13", "type": "Canvas" }
]
},
{
"id": "https://example.org/iiif/book1/range/backcover",
"type": "Range",
"label": { "none": [ "Back cover" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/backcover", "type": "Canvas" }
]
}
]
},
{
"id": "https://example.org/iiif/book1/range/illustration3",
"type": "Range",
"label": { "none": [ "Third illustration non paginated" ] },
"items": [
{ "id": "https://example.org/iiif/book1/canvas/illus3", "type": "Canvas" }
]
}
]
}
]
Notes for understanding the conversion method and fixing issues from literal data:
- Named canvases may not be supported, so you may need to avoid them.
- Indentation is not required but improves readability.
- Lines should be ordered as a table of contents or index so that the parser can understand the structure.
- Since only Ranges are displayed to users, each line becomes a Range even if it references a single Canvas. In other words, Front Cover, Second chapter, and illustration are Ranges containing a single item called Canvas.
- There are some missing pages (perhaps not scanned or lost).
- In this example, meaningful names are given (e.g., “r1-1-1”), but this is not required.
- “cover” references itself, so it is a named Canvas within a Range. This is not possible in IIIF v2, so it is enclosed in double quotes.
- “backcover” is enclosed in double quotes to force it to be treated as a Canvas.
- The sub-sections share one page (the 9th Canvas).
- The Range ID “r1-2” in the First chapter is missing, so it is treated as a named Canvas.
- Index “12” is a Canvas, so it is added to the list in the IIIF manifest but is not displayed in IIIF-compatible viewers.
- Since “illus1” is not a Range, “illustration1” is given a named Canvas.
- The index “illustration1” in the First section is a Range, but it is not in the direct child list of the First section. Therefore, it is added directly to the appropriate location and removed from the end.
- Illustration3 is not used as a Range, so it is a root. Since there are multiple roots, a range is added to wrap all structures.
Be careful with nested structures. Items must not belong to themselves. Otherwise, items will be managed as Canvases.
Of course, if the literal structure is properly formed, these corrections do not need to be considered.
Otherwise, in IIIF v3, multiple structures (tables of contents) are added when an item has multiple values. For example, a newspaper can have a page-by-page structure like a general table of contents and an article-by-article structure. In practice, articles can span multiple non-consecutive pages, and pages can contain many articles, illustrations, advertisements, etc. When there are multiple structures (tables of contents), Range names must have the same meaning across each structure (for example, the index “cover” must be the front cover across all structures). This is because their URIs will be the same.
For more details, please refer to the structure information in the IIIF Presentation 2.1 and IIIF Presentation 3.0 specifications.