Added Android code
[wl-app.git] / Android / r2-streamer / r2-parser / src / main / java / org / readium / r2_streamer / model / publication / metadata / MetaData.java
1 package org.readium.r2_streamer.model.publication.metadata;
2
3 import org.readium.r2_streamer.model.publication.subject.Subject;
4 import org.readium.r2_streamer.model.publication.contributor.Contributor;
5 import org.readium.r2_streamer.model.publication.rendition.Rendition;
6
7 import java.io.Serializable;
8 import java.util.ArrayList;
9 import java.util.Date;
10 import java.util.List;
11
12 /**
13  * Created by Shrikant Badwaik on 25-Jan-17.
14  */
15
16 public class MetaData implements Serializable {
17     private static final long serialVersionUID = 8526472295622776148L;
18     public String title;
19     public String identifier;
20
21     public List<Contributor> creators;
22     public List<Contributor> translators;
23     public List<Contributor> editors;
24     public List<Contributor> artists;
25     public List<Contributor> illustrators;
26     public List<Contributor> letterers;
27     public List<Contributor> pencilers;
28     public List<Contributor> colorists;
29     public List<Contributor> inkers;
30     public List<Contributor> narrators;
31     public List<Contributor> contributors;
32     public List<Contributor> publishers;
33     public List<Contributor> imprints;
34
35     public List<String> languages;
36     public Date modified;
37     public Date publicationDate;
38     public String description;
39     public String direction;
40     public Rendition rendition;
41     public String source;
42     public List<String> epubType;
43     public List<String> rights;
44     public List<Subject> subjects;
45
46     private List<MetadataItem> otherMetadata;
47
48     public MetaData() {
49         this.rendition = new Rendition();
50         this.creators = new ArrayList<>();
51         this.translators = new ArrayList<>();
52         this.editors = new ArrayList<>();
53         this.artists = new ArrayList<>();
54         this.illustrators = new ArrayList<>();
55         this.letterers = new ArrayList<>();
56         this.pencilers = new ArrayList<>();
57         this.colorists = new ArrayList<>();
58         this.inkers = new ArrayList<>();
59         this.narrators = new ArrayList<>();
60         this.contributors = new ArrayList<>();
61         this.publishers = new ArrayList<>();
62         this.imprints = new ArrayList<>();
63         this.languages = new ArrayList<>();
64         this.epubType = new ArrayList<>();
65         this.rights = new ArrayList<>();
66         this.subjects = new ArrayList<>();
67         this.otherMetadata = new ArrayList<>();
68     }
69
70     public MetaData(String title, String identifier, List<Contributor> creators, List<Contributor> translators, List<Contributor> editors, List<Contributor> artists, List<Contributor> illustrators, List<Contributor> letterers, List<Contributor> pencilers, List<Contributor> colorists, List<Contributor> inkers, List<Contributor> narrators, List<Contributor> contributors, List<Contributor> publishers, List<Contributor> imprints, List<String> languages, Date modified, Date publicationDate, String description, String direction, Rendition rendition, String source, List<String> epubType, List<String> rights, List<Subject> subjects, List<MetadataItem> otherMetadata) {
71         this.title = title;
72         this.identifier = identifier;
73         this.creators = creators;
74         this.translators = translators;
75         this.editors = editors;
76         this.artists = artists;
77         this.illustrators = illustrators;
78         this.letterers = letterers;
79         this.pencilers = pencilers;
80         this.colorists = colorists;
81         this.inkers = inkers;
82         this.narrators = narrators;
83         this.contributors = contributors;
84         this.publishers = publishers;
85         this.imprints = imprints;
86         this.languages = languages;
87         this.modified = modified;
88         this.publicationDate = publicationDate;
89         this.description = description;
90         this.direction = "default";     // = direction;
91         this.rendition = rendition;
92         this.source = source;
93         this.epubType = epubType;
94         this.rights = rights;
95         this.subjects = subjects;
96         this.otherMetadata = otherMetadata;
97     }
98
99     @Override
100     public String toString() {
101         return "MetaData{" +
102                 "title='" + title + '\'' +
103                 ", identifier='" + identifier + '\'' +
104                 ", creators=" + creators +
105                 ", translators=" + translators +
106                 ", editors=" + editors +
107                 ", artists=" + artists +
108                 ", illustrators=" + illustrators +
109                 ", letterers=" + letterers +
110                 ", pencilers=" + pencilers +
111                 ", colorists=" + colorists +
112                 ", inkers=" + inkers +
113                 ", narrators=" + narrators +
114                 ", contributors=" + contributors +
115                 ", publishers=" + publishers +
116                 ", imprints=" + imprints +
117                 ", languages=" + languages +
118                 ", modified=" + modified +
119                 ", publicationDate=" + publicationDate +
120                 ", description='" + description + '\'' +
121                 ", direction='" + direction + '\'' +
122                 ", rendition=" + rendition +
123                 ", source='" + source + '\'' +
124                 ", epubType=" + epubType +
125                 ", rights=" + rights +
126                 ", subjects=" + subjects +
127                 ", otherMetadata=" + otherMetadata +
128                 '}';
129     }
130
131     public String getTitle() {
132         return title;
133     }
134
135     public void setTitle(String title) {
136         this.title = title;
137     }
138
139     public String getIdentifier() {
140         return identifier;
141     }
142
143     public void setIdentifier(String identifier) {
144         this.identifier = identifier;
145     }
146
147     public List<Contributor> getCreators() {
148         return creators;
149     }
150
151     public void setCreators(List<Contributor> creators) {
152         this.creators = creators;
153     }
154
155     public List<Contributor> getTranslators() {
156         return translators;
157     }
158
159     public void setTranslators(List<Contributor> translators) {
160         this.translators = translators;
161     }
162
163     public List<Contributor> getEditors() {
164         return editors;
165     }
166
167     public void setEditors(List<Contributor> editors) {
168         this.editors = editors;
169     }
170
171     public List<Contributor> getArtists() {
172         return artists;
173     }
174
175     public void setArtists(List<Contributor> artists) {
176         this.artists = artists;
177     }
178
179     public List<Contributor> getIllustrators() {
180         return illustrators;
181     }
182
183     public void setIllustrators(List<Contributor> illustrators) {
184         this.illustrators = illustrators;
185     }
186
187     public List<Contributor> getLetterers() {
188         return letterers;
189     }
190
191     public void setLetterers(List<Contributor> letterers) {
192         this.letterers = letterers;
193     }
194
195     public List<Contributor> getPencilers() {
196         return pencilers;
197     }
198
199     public void setPencilers(List<Contributor> pencilers) {
200         this.pencilers = pencilers;
201     }
202
203     public List<Contributor> getColorists() {
204         return colorists;
205     }
206
207     public void setColorists(List<Contributor> colorists) {
208         this.colorists = colorists;
209     }
210
211     public List<Contributor> getInkers() {
212         return inkers;
213     }
214
215     public void setInkers(List<Contributor> inkers) {
216         this.inkers = inkers;
217     }
218
219     public List<Contributor> getNarrators() {
220         return narrators;
221     }
222
223     public void setNarrators(List<Contributor> narrators) {
224         this.narrators = narrators;
225     }
226
227     public List<Contributor> getContributors() {
228         return contributors;
229     }
230
231     public void setContributors(List<Contributor> contributors) {
232         this.contributors = contributors;
233     }
234
235     public List<Contributor> getPublishers() {
236         return publishers;
237     }
238
239     public void setPublishers(List<Contributor> publishers) {
240         this.publishers = publishers;
241     }
242
243     public List<Contributor> getImprints() {
244         return imprints;
245     }
246
247     public void setImprints(List<Contributor> imprints) {
248         this.imprints = imprints;
249     }
250
251     public List<String> getLanguages() {
252         return languages;
253     }
254
255     public void setLanguages(List<String> languages) {
256         this.languages = languages;
257     }
258
259     public Date getModified() {
260         return modified;
261     }
262
263     public void setModified(Date modified) {
264         this.modified = modified;
265     }
266
267     public Date getPublicationDate() {
268         return publicationDate;
269     }
270
271     public void setPublicationDate(Date publicationDate) {
272         this.publicationDate = publicationDate;
273     }
274
275     public String getDescription() {
276         return description;
277     }
278
279     public void setDescription(String description) {
280         this.description = description;
281     }
282
283     public String getDirection() {
284         return direction;
285     }
286
287     public void setDirection(String direction) {
288         this.direction = direction;
289     }
290
291     public Rendition getRendition() {
292         return rendition;
293     }
294
295     public void setRendition(Rendition rendition) {
296         this.rendition = rendition;
297     }
298
299     public String getSource() {
300         return source;
301     }
302
303     public void setSource(String source) {
304         this.source = source;
305     }
306
307     public List<String> getEpubType() {
308         return epubType;
309     }
310
311     public void setEpubType(List<String> epubType) {
312         this.epubType = epubType;
313     }
314
315     public List<String> getRights() {
316         return rights;
317     }
318
319     public void setRights(List<String> rights) {
320         this.rights = rights;
321     }
322
323     public List<Subject> getSubjects() {
324         return subjects;
325     }
326
327     public void setSubjects(List<Subject> subjects) {
328         this.subjects = subjects;
329     }
330
331     public List<MetadataItem> getOtherMetadata() {
332         return otherMetadata;
333     }
334
335     public void setOtherMetadata(List<MetadataItem> otherMetadata) {
336         this.otherMetadata = otherMetadata;
337     }
338 }