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