TAMULib / IRIIIFService

IIIF manifest generator for DSpace RDF and/or Fedora PCDM
MIT License
9 stars 3 forks source link
dspace dspace-rdf fedora fedora-pcdm iiif pcdm rdf

Build Status Coverage Status

Institutional Repository International Image Interoperability Framework Service

A Spring backend for the Institutional Repository International Image Interoperability Framework (IRIIIF) Service developed and maintained by Texas A&M University Libraries.

This service provides IIIF manifest generation from DSpace RDF and/or Fedora PCDM.

Table of contents - [Requirements:](#requirements) - [External Requirements:](#external-requirements) - [IIIF Server](#iiif-server) - [DSpace](#dspace) - [Fedora](#fedora) - [Developer Documentation](#developer-documentation) - [Additional Resources](#additional-resources)

Requirements:

(back to top)

External Requirements:

(back to top)

IIIF Server

Example Cantaloupe custom delegate ``` require 'base64' class CustomDelegate ## # Returns one of the following: # # 1. String URI # 2. Hash with the following keys: # * `uri` [String] (required) # * `username` [String] For HTTP Basic authentication (optional). # * `secret` [String] For HTTP Basic authentication (optional). # * `headers` [Hash] Hash of request headers (optional). # 3. nil if not found. # # @param options [Hash] Empty hash. # @return See above. # def httpsource_resource_info(options = {}) id = context['identifier'] puts id if ( id =~ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ ) uri = '<%= @iiif_service_url %>resources/' + id + '/redirect' elsif irid = Base64.decode64(id) puts irid if irid.include? ":" parts = irid.split(':') ir = parts[0] path = parts[1] if ir == 'fedora' uri = '<%= @fedora_url %>' + path elsif ir == 'dspace' uri = '<%= @dspace_url %>' + path else uri = irid end else uri = id end end puts uri return uri end end ```
(back to top)

DSpace

(back to top)

Fedora

Fedora PCDM RDF Example The following series of Fedora requests for PCDM RDF https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457 ``` . . . "Fancy Paper Company"^^ . "fedoraAdmin"^^ . . "reformatted digital"^^ . "In copyright; For more information see: http://rightsstatements.org/vocab/InC/1.0/"^^ . "Surface application; Sprinkled; M5.D2.F5; Machine made; Section(s) from the Decorated and Decorative Paper Terms Thesaurus: VIII.I.1; Not signed; Not stamped; Not stickered; Not embossed; Paper darkened; somewhat brittle and fragile; slightly torn"^^ . "Berger-Cloonan #466"^^ . "1 sheet of red, gray, black and light brown sprinkled paper; 21.00 x 22.50 in."^^ . "Decorative papers"^^ . "sprinkling"^^ . "fedoraAdmin"^^ . "2022-01-27T18:18:54.551Z"^^ . "2022-01-27T18:18:54.551Z"^^ . "Paper"^^ . "466"^^ . "M5.D2.F5.A"^^ . "StillImage"^^ . "art reproduction"^^ . "decorated papers"^^ . "Multi-colored sprinkled papers"^^ . . . . "false"^^ . . . . . ``` https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/orderProxies/page_0_proxy/fcr:metadata ``` . . . "fedoraAdmin"^^ . "fedoraAdmin"^^ . "2022-01-27T18:18:54.551Z"^^ . "2022-01-27T18:18:54.551Z"^^ . . . . . "false"^^ . . . ``` https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0/fcr:metadata ``` . . . "fedoraAdmin"^^ . "fedoraAdmin"^^ . "2022-01-27T18:18:54.551Z"^^ . "2022-01-27T18:18:54.551Z"^^ . . . "false"^^ . . . . ``` https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0/files/fcr:metadata ``` . . . . "fedoraAdmin"^^ . "fedoraAdmin"^^ . "2022-01-27T18:18:54.551Z"^^ . "2022-01-27T18:18:54.551Z"^^ . . . . . "false"^^ . . . ``` https://api-pre.library.tamu.edu/fcrepo/rest/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0/files/00466.jpg/fcr:metadata ``` . . . "00466.jpg"^^ . "fedoraAdmin"^^ . "22601344"^^ . "image/jpeg"^^ . "fedoraAdmin"^^ . "2022-01-27T18:18:54.551Z"^^ . . "2022-01-27T18:18:54.551Z"^^ . "00466.jpg"^^ . . "false"^^ . . . . ``` Will result in IIIF v2 presentation manifest ``` { "@context" : "http://iiif.io/api/presentation/2/context.json", "@id" : "https://api-pre.library.tamu.edu/iiif-service/fedora/presentation/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457", "@type" : "sc:Manifest", "attribution" : [ "Fancy Paper Company", "In copyright; For more information see: http://rightsstatements.org/vocab/InC/1.0/" ], "label" : [ "Berger-Cloonan #466", "466" ], "logo" : "https://library.tamu.edu/assets/images/tamu-logos/TAM-PrimaryMarkB.png", "metadata" : [ { "label" : "identifier", "value" : "466" }, { "label" : "contributor", "value" : "Fancy Paper Company" }, { "label" : "subject", "value" : [ "Decorative papers", "sprinkling" ] }, { "label" : "rights", "value" : "In copyright; For more information see: http://rightsstatements.org/vocab/InC/1.0/" }, { "label" : "format", "value" : "reformatted digital" }, { "label" : "type", "value" : [ "Multi-colored sprinkled papers", "art reproduction", "decorated papers" ] }, { "label" : "title", "value" : "Berger-Cloonan #466" }, { "label" : "relation", "value" : "M5.D2.F5.A" }, { "label" : "extent", "value" : "1 sheet of red, gray, black and light brown sprinkled paper; 21.00 x 22.50 in." }, { "label" : "medium", "value" : "Paper" }, { "label" : "type", "value" : "StillImage" }, { "label" : "context", "value" : "bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457" } ], "sequences" : [ { "@id" : "https://api-pre.library.tamu.edu/iiif-service/fedora/sequence/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457", "@type" : "sc:Sequence", "canvases" : [ { "@id" : "https://api-pre.library.tamu.edu/iiif-service/fedora/canvas/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0", "@type" : "sc:Canvas", "height" : 9430, "images" : [ { "@id" : "https://api-pre.library.tamu.edu/iiif/2/8cabeecc-d4b6-3365-a075-bacc30d082e3/info.json", "@type" : "oa:Annotation", "motivation" : "sc:painting", "on" : "https://api-pre.library.tamu.edu/iiif-service/fedora/canvas/bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0", "resource" : { "@id" : "https://api-pre.library.tamu.edu/iiif/2/8cabeecc-d4b6-3365-a075-bacc30d082e3/full/full/0/default.jpg", "@type" : "dctypes:Image", "format" : "image/jpeg", "height" : 9430, "service" : { "label" : "Fedora IIIF Image Resource Service", "profile" : "http://iiif.io/api/image/2/level0.json", "@context" : "http://iiif.io/api/image/2/context.json", "@id" : "https://api-pre.library.tamu.edu/iiif/2/8cabeecc-d4b6-3365-a075-bacc30d082e3" }, "width" : 8590 } } ], "label" : "fedora:bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0", "metadata" : [ { "label" : "context", "value" : "bb/97/f2/3e/bb97f23e-803a-4bd6-8406-06802623554c/20/d5/bc/11/20d5bc11-1f51-487c-8ef6-00a5ece451aa/berger_cloonan_batch_5_objects/457/pages/page_0" } ], "width" : 8590 } ], "label" : [ "Berger-Cloonan #466", "466" ] } ], "thumbnail" : { "@id" : "https://api-pre.library.tamu.edu/iiif/2/8cabeecc-d4b6-3365-a075-bacc30d082e3/full/!100,100/0/default.jpg", "service" : { "label" : "Fedora IIIF Image Resource Service", "profile" : "http://iiif.io/api/image/2/level0.json", "@context" : "http://iiif.io/api/image/2/context.json", "@id" : "https://api-pre.library.tamu.edu/iiif/2/8cabeecc-d4b6-3365-a075-bacc30d082e3" } } } ```

Please see Mock Fedora PCDM RDF and IIIF JSON for additional examples.

(back to top)

Developer Documentation

(back to top)

Additional Resources

Please feel free to file any issues concerning Ecosystem Identifier Service to the issues section of the repository.

Any questions concerning Ecosystem Identifier Service can be directed to helpdesk@library.tamu.edu.

Copyright © 2022 Texas A&M University Libraries under the MIT License.

(back to top)