VlaamseKunstcollectie / Imagehub

A IIIF Presentation API compliant aggregator and web service
GNU General Public License v3.0
1 stars 2 forks source link

Create a top-level IIIF Collection for discoverability #17

Closed Hobbesball closed 5 years ago

Hobbesball commented 5 years ago

Detailed description of the issue. Having a page that lists all the available IIIF manifests in the imagehub enhances the discoverability of the imagehub manifests. In the same way that datahub has the ListRecords command to show all available LIDO records, a similar function for imagehub is needed.

Possible implementation This can be implemented in several different ways, but following the possibilities of the IIIF spec seems like the most elegant solution. a top-level IIIF Collection is a JSON file that gives a list of manifests. cfr. IIIF v.1. spec about Collections.

an example Collection JSON file would look like this:


{
  "@context": "http://iiif.io/api/presentation/2/context.json",
  "@id": "https://imagehub.vlaamsekunstcollectie.be/iiif/2/collection/top",
  "@type": "sc:Collection",
  "label": "Top Level Collection for Imagehub",
  "viewingHint": "top",
  "description": "This collection lists all the IIIF manifests available in this Imagehub instance",
  "manifests": [
    {
      "@id": "https://imagehub.vlaamsekunstcollectie.be/iiif/2/kmska.be:410/manifest.json",
      "@type": "sc:Manifest",
      "label": "Heilige Barbara van Nicomedië"
    },
 {
      "@id": "https://imagehub.vlaamsekunstcollectie.be/iiif/2/mskgent.be:1998-B-112/manifest.json",
      "@type": "sc:Manifest",
      "label": "De wraak van Hop-Frog"
    }
  ]
}
Hobbesball commented 5 years ago

other possible implementation implement as above, but don't create a separate command and instead run this at the end of ETL5

Kitania commented 5 years ago

Added in 2306938861d0b4b49ffa34825310431c1867b0c9

The top-level collection is also validated the same way as the manifests (using the same 'validate_manifests' toggle). The collection passes validation, but for some reason the validator returns the following warning: WARNING: 'top' not a known viewing hint for type 'sc:Collection': individuals multi-part

Despite the IIIF presentation API documentation example having a 'viewingHint: top', the python implementation of the validator expects either 'individuals' or 'multi-part' as viewingHint. See also: https://github.com/iiif-prezi/iiif-prezi/blob/master/iiif_prezi/factory.py, COLL_VIEWINGHINTS = ['individuals', 'multi-part']

Hobbesball commented 5 years ago

the viewinghint:top is technically only valid for ranges, and a top-level collection is not a range. That said, looking at other top-level collections from other organisations they also use viewinghint:top. I would disregard this warning, thanks for flagging it!