View Javadoc
1   /*
2    * This file is part of ***  M y C o R e  ***
3    * See http://www.mycore.de/ for details.
4    *
5    * MyCoRe is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    *
10   * MyCoRe is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with MyCoRe.  If not, see <http://www.gnu.org/licenses/>.
17   */
18  
19  package org.mycore.iiif.image.model;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  
24  import org.mycore.iiif.model.MCRIIIFBase;
25  
26  public class MCRIIIFImageInformation extends MCRIIIFBase {
27  
28      /**
29       * Required!
30       * Defines the protocol. Should be: <a href="http://iiif.io/api/image">http://iiif.io/api/image/2/context.json</a>
31       */
32      public String protocol;
33  
34      /**
35       * Required!
36       * width of image in pixels
37       */
38      public int width;
39  
40      /**
41       * Required!
42       * height of image in pixels
43       */
44      public int height;
45  
46      /**
47       * Required for caching.
48       */
49      public transient long lastModified;
50  
51      /**
52       * Required!
53       * A array of profiles, first entry is always a <i>compliance level URI</i> like http://iiif.io/api/image/2/level2.json.
54       */
55      public List<Object> profile;
56  
57      /**
58       * Optional!
59       */
60      public List<MCRIIIFImageTileInformation> tiles;
61  
62      public MCRIIIFImageInformation(String context, String id, String protocol, int width, int height,
63          long lastModified) {
64          super(id, null, context);
65          this.protocol = protocol;
66          this.width = width;
67          this.height = height;
68          this.tiles = new ArrayList<>();
69          this.profile = new ArrayList<>();
70          this.lastModified = lastModified;
71      }
72  }