IIIFImagePlug.V3.InfoRequestMetadata (IIIFImagePlug v0.7.0)

View Source

A struct used to inject values from your application into the plug when responding to information request (info.json).

See also IIIFImagePlug.V3.info_metadata/1.

Fields

  • :path (required) your local file system path to the image file.
  • :rights (optional) the rights statement for the given image.
  • :part_of (optional) the partOf linking property for the image.
  • :see_also (optional) the seeAlso linking property for the image.
  • :service (optional) the service linking property for the image.
  • :response_headers (optional), a list of key-value tuples that should be set as response headers for the request.

Example

%InfoRequestMetadata{
  path: "test/images/my_image.jpg",
  rights: "https://creativecommons.org/publicdomain/zero/1.0/",
  see_also: [
    %{
      id: "https://example.org/image1.xml",
      label: %{en: ["Technical image metadata"]},
      type: "Dataset",
      format: "text/xml",
      profile: "https://example.org/profiles/imagedata"
    }
  ],
  part_of: [
    %{
      id: "https://example.org/manifest/1",
      type: "Manifest",
      label: %{en: ["A Book"]}
    }
  ],
  service: [
    %{
      "@id": "https://example.org/auth/login",
      "@type": "AuthCookieService1",
      profile: "http://iiif.io/api/auth/1/login",
      label: "Login to Example Institution"
    }
  ],
  response_headers: [
    {"cache-control", "public, max-age=31536000, immutable"}
  ]
}

Summary

Types

t()

@type t() :: %IIIFImagePlug.V3.InfoRequestMetadata{
  part_of: list(),
  path: String.t(),
  response_headers: [tuple()],
  rights: String.t() | nil,
  see_also: list(),
  service: list()
}