-public class Album {
-
- /** The ID of this album. */
- private final String id;
-
- /** The Sone this album belongs to. */
- private final 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 name of this album. */
- private String name;
-
- /** The description of this album. */
- private String description;
-
- /**
- * Creates a new album with a random ID.
- *
- * @param sone
- * The Sone this album belongs to
- */
- public Album(Sone sone) {
- this(UUID.randomUUID().toString(), sone);
- }
-
- /**
- * Creates a new album with the given ID.
- *
- * @param id
- * The ID of the album
- * @param sone
- * The Sone this album belongs to
- */
- public Album(String id, Sone sone) {
- Validation.begin().isNotNull("Album ID", id).isNotNull("Album Owner", sone).check();
- this.id = id;
- this.sone = sone;
- }
-
- //
- // ACCESSORS
- //