Skip to content

Neon Manifest

Juliette Regimbal edited this page Aug 23, 2019 · 1 revision

Neon Manifest Files

Neon loads from and exports to manifest files that describe where to find the resources for editing and how they are related. It does this in the form of a JSON-LD (JSON Linked Data) file that makes use of the Web Annotation Data Model. Annotations are used to associate MEI files to images of pages either in the form of an image file or a IIIF canvas.

Manifest Contents

Manifest files must contain five fields:

  • @context - A description of the context the file is used in and the meanings of each field in a parseable way;
  • @id - An IRI that identifies the manifest itself as either a URL to the manifest if it is hosted somewhere or a UUID in the form urn:uuid:[UUID];
  • title - A user-readable title for the manifest;
  • timestamp - An ISO 8601 timestamp representing when the manifest was last modified;
  • image - An IRI either to a single image file or to a IIIF manifest; and
  • mei_annotations - An array of annotation objects relating MEI files to images or IIIF canvases.

Web Annotations in Neon

Web annotations contain three fields that must be IRIs: id, body, and target. Since these annotations are embedded within the manifest and are not accessible by a URL, a UUID is used as the id.

The body describes the content of the annotation &em; in this case an MEI file &em; that is applied to the target. The body and target are links if possible. However if modifications are made to the MEI file and the file is not able to be updated using an HTTP PUT request, Neon will replace the URL to the MEI file with a data URI. The media type will be application/mei+xml.

The @context

Currently Neon supports writing out the context field or a URL to the expected context. At the time of writing, the context must be:

[
    "http://www.w3.org/ns/anno.jsonld",
    {
        "schema": "http://schema.org/",
        "title": "schema:name",
        "timestamp": "schema:dateModified",
        "image": {
            "@id": "schema:image",
            "@type": "@id"
        },
        "mei_annotations": {
            "@id": "Annotation",
            "@type": "@id",
            "@container": "@list"
        }
    }
]

or far more succinctly https://ddmal.music.mcgill.ca/Neon/contexts/1/manifest.jsonld.

Manifest Example

{
    "@context": "https://ddmal.music.mcgill.ca/Neon/contexts/1/manifest.jsonld",
    "@id": "https://ddmal.github.io/Neon/manifests/Salzinnes.jsonld",
    "title": "Salzinnes, CDN-Hsmu M2149.L4",
    "timestamp": "2019-06-27T13:01:25-0400",
    "image": "https://images.simssa.ca/iiif/manuscripts/cdn-hsmu-m2149l4/manifest.json",
    "mei_annotations": [
        {
            "id": "urn:uuid:bbe41692-7a51-4f88-9c5d-a090751c1c03",
            "type": "Annotation",
            "body": "https://ddmal.github.io/Neon/mei/CF-014.mei",
            "target": "https://images.simssa.ca/iiif/manuscripts/cdn-hsmu-m2149l4/canvas/folio-001r.json"
        },
        {
            "id": "urn:uuid:128daba9-58cb-48d7-9116-53549e7d94fc",
            "type": "Annotation",
            "body": "https://ddmal.github.io/Neon/mei/CF-522.mei",
            "target": "https://images.simssa.ca/iiif/manuscripts/cdn-hsmu-m2149l4/canvas/folio-001v.json"
        }
    ]
}