/** The ID of the image. */
private final String id;
+ /** The Sone the image belongs to. */
+ private final Sone sone;
+
/** The key of the image. */
private final String key;
/**
* Creates a new image.
*
+ * @param sone
+ * The Sone the image belongs to
* @param key
* The key of the image
* @param creationTime
* @param height
* The height of the image
*/
- public Image(String key, long creationTime, int width, int height) {
- this(UUID.randomUUID().toString(), key, creationTime, width, height);
+ public Image(Sone sone, String key, long creationTime, int width, int height) {
+ this(UUID.randomUUID().toString(), sone, key, creationTime, width, height);
}
/**
*
* @param id
* The ID of the image
+ * @param sone
+ * The Sone the image belongs to
* @param key
* The key of the image
* @param creationTime
* @param height
* The height of the image
*/
- public Image(String id, String key, long creationTime, int width, int height) {
+ public Image(String id, Sone sone, String key, long creationTime, int width, int height) {
this.id = id;
+ this.sone = sone;
this.key = key;
this.creationTime = creationTime;
this.width = width;
}
/**
+ * Returns the Sone this image belongs to.
+ *
+ * @return The Sone this image belongs to
+ */
+ public Sone getSone() {
+ return sone;
+ }
+
+ /**
* Returns the key of this image.
*
* @return The key of this image