| 1 | package be.nikiroo.fanfix.data; |
| 2 | |
| 3 | import java.awt.image.BufferedImage; |
| 4 | import java.util.List; |
| 5 | |
| 6 | /** |
| 7 | * The meta data associated to a {@link Story} object. |
| 8 | * |
| 9 | * @author niki |
| 10 | */ |
| 11 | public class MetaData { |
| 12 | private String title; |
| 13 | private String author; |
| 14 | private String date; |
| 15 | private Chapter resume; |
| 16 | private List<String> tags; |
| 17 | private BufferedImage cover; |
| 18 | private String subject; |
| 19 | private String source; |
| 20 | private String uuid; |
| 21 | private String luid; |
| 22 | private String lang; |
| 23 | private String publisher; |
| 24 | private boolean imageDocument; |
| 25 | |
| 26 | /** |
| 27 | * The title of the story. |
| 28 | * |
| 29 | * @return the title |
| 30 | */ |
| 31 | public String getTitle() { |
| 32 | return title; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * The title of the story. |
| 37 | * |
| 38 | * @param title |
| 39 | * the title to set |
| 40 | */ |
| 41 | public void setTitle(String title) { |
| 42 | this.title = title; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * The author of the story. |
| 47 | * |
| 48 | * @return the author |
| 49 | */ |
| 50 | public String getAuthor() { |
| 51 | return author; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * The author of the story. |
| 56 | * |
| 57 | * @param author |
| 58 | * the author to set |
| 59 | */ |
| 60 | public void setAuthor(String author) { |
| 61 | this.author = author; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * The story publication date. |
| 66 | * |
| 67 | * @return the date |
| 68 | */ |
| 69 | public String getDate() { |
| 70 | return date; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * The story publication date. |
| 75 | * |
| 76 | * @param date |
| 77 | * the date to set |
| 78 | */ |
| 79 | public void setDate(String date) { |
| 80 | this.date = date; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * The tags associated with this story. |
| 85 | * |
| 86 | * @return the tags |
| 87 | */ |
| 88 | public List<String> getTags() { |
| 89 | return tags; |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * The tags associated with this story. |
| 94 | * |
| 95 | * @param tags |
| 96 | * the tags to set |
| 97 | */ |
| 98 | public void setTags(List<String> tags) { |
| 99 | this.tags = tags; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * The story resume (a.k.a. description). |
| 104 | * |
| 105 | * @return the resume |
| 106 | */ |
| 107 | public Chapter getResume() { |
| 108 | return resume; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * The story resume (a.k.a. description). |
| 113 | * |
| 114 | * @param resume |
| 115 | * the resume to set |
| 116 | */ |
| 117 | public void setResume(Chapter resume) { |
| 118 | this.resume = resume; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * The cover image of the story if any (can be NULL). |
| 123 | * |
| 124 | * @return the cover |
| 125 | */ |
| 126 | public BufferedImage getCover() { |
| 127 | return cover; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * The cover image of the story if any (can be NULL). |
| 132 | * |
| 133 | * @param cover |
| 134 | * the cover to set |
| 135 | */ |
| 136 | public void setCover(BufferedImage cover) { |
| 137 | this.cover = cover; |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * The subject of the story (or instance, if it is a fanfiction, what is the |
| 142 | * original work; if it is a technical text, what is the technical |
| 143 | * subject...). |
| 144 | * |
| 145 | * @return the subject |
| 146 | */ |
| 147 | public String getSubject() { |
| 148 | return subject; |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * The subject of the story (for instance, if it is a fanfiction, what is |
| 153 | * the original work; if it is a technical text, what is the technical |
| 154 | * subject...). |
| 155 | * |
| 156 | * @param subject |
| 157 | * the subject to set |
| 158 | */ |
| 159 | public void setSubject(String subject) { |
| 160 | this.subject = subject; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * The source of this story (where it was downloaded from). |
| 165 | * |
| 166 | * @return the source |
| 167 | */ |
| 168 | public String getSource() { |
| 169 | return source; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * The source of this story (where it was downloaded from). |
| 174 | * |
| 175 | * @param source |
| 176 | * the source to set |
| 177 | */ |
| 178 | public void setSource(String source) { |
| 179 | this.source = source; |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * A unique value representing the story (it is often an URL). |
| 184 | * |
| 185 | * @return the uuid |
| 186 | */ |
| 187 | public String getUuid() { |
| 188 | return uuid; |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * A unique value representing the story (it is often an URL). |
| 193 | * |
| 194 | * @param uuid |
| 195 | * the uuid to set |
| 196 | */ |
| 197 | public void setUuid(String uuid) { |
| 198 | this.uuid = uuid; |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * A unique value representing the story in the local library. |
| 203 | * |
| 204 | * @return the luid |
| 205 | */ |
| 206 | public String getLuid() { |
| 207 | return luid; |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * A unique value representing the story in the local library. |
| 212 | * |
| 213 | * @param uuid |
| 214 | * the luid to set |
| 215 | */ |
| 216 | public void setLuid(String luid) { |
| 217 | this.luid = luid; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * The 2-letter code language of this story. |
| 222 | * |
| 223 | * @return the lang |
| 224 | */ |
| 225 | public String getLang() { |
| 226 | return lang; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * The 2-letter code language of this story. |
| 231 | * |
| 232 | * @param lang |
| 233 | * the lang to set |
| 234 | */ |
| 235 | public void setLang(String lang) { |
| 236 | this.lang = lang; |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * The story publisher (other the same as the source). |
| 241 | * |
| 242 | * @return the publisher |
| 243 | */ |
| 244 | public String getPublisher() { |
| 245 | return publisher; |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * The story publisher (other the same as the source). |
| 250 | * |
| 251 | * @param publisher |
| 252 | * the publisher to set |
| 253 | */ |
| 254 | public void setPublisher(String publisher) { |
| 255 | this.publisher = publisher; |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Document catering mostly to image files. |
| 260 | * |
| 261 | * @return the imageDocument state |
| 262 | */ |
| 263 | public boolean isImageDocument() { |
| 264 | return imageDocument; |
| 265 | } |
| 266 | |
| 267 | /** |
| 268 | * Document catering mostly to image files. |
| 269 | * |
| 270 | * @param imageDocument |
| 271 | * the imageDocument state to set |
| 272 | */ |
| 273 | public void setImageDocument(boolean imageDocument) { |
| 274 | this.imageDocument = imageDocument; |
| 275 | } |
| 276 | } |