All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.digitalcollections.iiif.bookshelf.model.IiifImageApiVersion Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 4.0.0
Show newest version
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;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy