Add album description.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Album.java
1 /*
2  * Sone - Album.java - Copyright © 2011 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.sone.data;
19
20 import java.util.ArrayList;
21 import java.util.List;
22
23 /**
24  * Container for images that can also contain nested {@link Album}s.
25  *
26  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
27  */
28 public class Album {
29
30         /** Nested albums. */
31         private final List<Album> albums = new ArrayList<Album>();
32
33         /** The images in this album. */
34         private final List<Image> images = new ArrayList<Image>();
35
36         /** The name of this album. */
37         private String name;
38
39         /** The description of this album. */
40         private String description;
41
42         //
43         // ACCESSORS
44         //
45
46         /**
47          * Returns the nested albums.
48          *
49          * @return The nested albums
50          */
51         public List<Album> getNestedAlbums() {
52                 return new ArrayList<Album>(albums);
53         }
54
55         /**
56          * Returns the images in this album.
57          *
58          * @return The images in this album
59          */
60         public List<Image> getImages() {
61                 return new ArrayList<Image>(images);
62         }
63
64         /**
65          * Returns the name of this album.
66          *
67          * @return The name of this album
68          */
69         public String getName() {
70                 return name;
71         }
72
73         /**
74          * Sets the name of this album.
75          *
76          * @param name
77          *            The name of this album
78          * @return This album
79          */
80         public Album setName(String name) {
81                 this.name = name;
82                 return this;
83         }
84
85         /**
86          * Returns the description of this album.
87          *
88          * @return The description of this album
89          */
90         public String getDescription() {
91                 return description;
92         }
93
94         /**
95          * Sets the description of this album.
96          *
97          * @param description
98          *            The description of this album
99          * @return This album
100          */
101         public Album setDescription(String description) {
102                 this.description = description;
103                 return this;
104         }
105
106 }