de.digitalcollections.iiif.bookshelf.model.IiifImageApiVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iiif-bookshelf-webapp Show documentation
Show all versions of iiif-bookshelf-webapp Show documentation
The bookshelf is a webapp for collecting IIIF representations of books. It is based on the functionality of the IIIF Presentation API for modelling books. You can add books to your bookshelf loading the manifest.json of the book by its web-address.
package de.digitalcollections.iiif.bookshelf.model;
/**
* TODO move to Image API library (model api)
*/
public enum IiifImageApiVersion {
V1_1, V2;
public static IiifImageApiVersion getVersion(String context) {
if (context == null) {
return null;
}
switch (context) {
case "http://library.stanford.edu/iiif/image-api/1.1/context.json":
return V1_1;
case "http://iiif.io/api/image/1/context.json":
return V1_1;
case "http://iiif.io/api/image/2/context.json":
return V2;
default:
return null;
}
}
}