-public class Album implements Fingerprintable {
-
- /** The ID of this album. */
- private final String id;
-
- /** The Sone this album belongs to. */
- private Sone sone;
-
- /** Nested albums. */
- private final List<Album> albums = new ArrayList<Album>();
-
- /** The images in this album. */
- private final List<Image> images = new ArrayList<Image>();
-
- /** The parent album. */
- private Album parent;
-
- /** The title of this album. */
- private String title;
-
- /** The description of this album. */
- private String description;
-
- /** The index of the album picture. */
- private int albumImage = -1;
-
- /**
- * Creates a new album with a random ID.
- */
- public Album() {
- this(UUID.randomUUID().toString());
- }
-
- /**
- * Creates a new album with the given ID.
- *
- * @param id
- * The ID of the album
- */
- public Album(String id) {
- Validation.begin().isNotNull("Album ID", id).check();
- this.id = id;
- }
-
- //
- // ACCESSORS
- //