mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
Added classes for parsing the info.json object.
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
package org.dspace.app.rest.iiif.model.info;
|
||||||
|
|
||||||
|
public class AnnotationModel {
|
||||||
|
|
||||||
|
private String motivation;
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
public void setMotivation(String motivation) {
|
||||||
|
this.motivation = motivation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMotivation() {
|
||||||
|
return motivation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setID(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
package org.dspace.app.rest.iiif.model.info;
|
||||||
|
|
||||||
|
public class CanvasModel {
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
private int width;
|
||||||
|
private int height;
|
||||||
|
private int pos;
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWidth(int width) {
|
||||||
|
this.width = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(int height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: These can be removed.
|
||||||
|
public void setPos(int pos) {
|
||||||
|
this.pos = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPos() {
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
package org.dspace.app.rest.iiif.model.info;
|
||||||
|
|
||||||
|
public class GlobalDefaults {
|
||||||
|
|
||||||
|
private boolean activated;
|
||||||
|
private String label;
|
||||||
|
private int width;
|
||||||
|
private int height;
|
||||||
|
|
||||||
|
public boolean isActivated() {
|
||||||
|
return activated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivated(boolean activated) {
|
||||||
|
this.activated = activated;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWidth(int width) {
|
||||||
|
this.width = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(int height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
package org.dspace.app.rest.iiif.model.info;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Info {
|
||||||
|
|
||||||
|
private List<CanvasModel> canvases;
|
||||||
|
private List<RangeModel> structures;
|
||||||
|
private GlobalDefaults globalDefaults;
|
||||||
|
|
||||||
|
public GlobalDefaults getGlobalDefaults() {
|
||||||
|
return globalDefaults;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGlobalDefaults(GlobalDefaults globalDefaults) {
|
||||||
|
this.globalDefaults = globalDefaults;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanvases(List<CanvasModel> canvases) {
|
||||||
|
this.canvases = canvases;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CanvasModel> getCanvases() {
|
||||||
|
return this.canvases;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStructures(List<RangeModel> structures) {
|
||||||
|
this.structures = structures;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RangeModel> getStructures() {
|
||||||
|
return structures;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* The contents of this file are subject to the license and copyright
|
||||||
|
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||||
|
* tree and available online at
|
||||||
|
*
|
||||||
|
* http://www.dspace.org/license/
|
||||||
|
*/
|
||||||
|
package org.dspace.app.rest.iiif.model.info;
|
||||||
|
|
||||||
|
public class RangeModel {
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
private int start;
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStart(int start) {
|
||||||
|
this.start = start;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStart() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user