f45fe521f3a8457e8a0d0d87bcba5ab5192aec1e
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / excel / taxa / NormalExplicitRow.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.io.excel.taxa;
11
12 import java.util.ArrayList;
13 import java.util.List;
14 import java.util.TreeMap;
15
16 import eu.etaxonomy.cdm.io.excel.common.ExcelRowBase;
17
18 /**
19 * @author a.babadshanjan
20 * @since 13.01.2009
21 * @version 1.0
22 */
23 public class NormalExplicitRow extends ExcelRowBase {
24
25
26 private String id;
27 private String parentId;
28 private String rank;
29 private String scientificName;
30 private String author;
31 private String basionymAuthor;
32 private String publishingAuthor;
33 private String nameStatus;
34 private String commonName;
35 private String language;
36 private String reference;
37 private String date;
38 private String family;
39 private String infraFamily;
40 private String genus;
41 private String infraGenus;
42 private String species;
43 private String infraSpecies;
44 private String infraSpecies_rank;
45
46 private String collation;
47 private String page;
48 private String publicationYear;
49 private String remarks;
50
51 private String synonym;
52 private String basionym;
53 private String accepted_id;
54 private String taxonomicStatus;
55
56 private String version;
57
58
59 private String ipni_id;
60 private String source;
61 private String source_Id;
62 //Sets
63 private TreeMap<Integer, String> distributions = new TreeMap<Integer, String>();
64
65 private TreeMap<Integer, String> protologues = new TreeMap<Integer, String>();
66
67 private TreeMap<Integer, String> images = new TreeMap<Integer, String>();
68
69 public NormalExplicitRow() {
70
71 this.id = "0";
72 this.parentId = "0";
73
74 this.rank = "";
75 this.scientificName = "";
76 this.author = "";
77 this.nameStatus = "";
78 this.commonName = "";
79 this.language = "";
80 this.reference = "";
81 this.setDate("");
82 this.setFamily("");
83 }
84
85 public NormalExplicitRow(String name, String parentId) {
86 this(name, parentId, null);
87 }
88
89 public NormalExplicitRow(String scientificName, String parentId, String reference) {
90 this.parentId = parentId;
91 this.scientificName = scientificName;
92 this.reference = reference;
93 }
94
95 // **************************** GETTER / SETTER *********************************/
96
97 /**
98 * @return the parentId
99 */
100 public String getParentId() {
101 return parentId;
102 }
103 /**
104 * @param parentId the parentId to set
105 */
106 public void setParentId(String parentId) {
107 this.parentId = parentId;
108 }
109 /**
110 * @return the name
111 */
112 public String getScientificName() {
113 return scientificName;
114 }
115 /**
116 * @param name the name to set
117 */
118 public void setScientificName(String scientificName) {
119 this.scientificName = scientificName;
120 }
121 /**
122 * @return the reference
123 */
124 public String getReference() {
125 return reference;
126 }
127 /**
128 * @param reference the reference to set
129 */
130 public void setReference(String reference) {
131 this.reference = reference;
132 }
133
134 /**
135 * @return the id
136 */
137 public String getId() {
138 return id;
139 }
140
141 /**
142 * @param id the id to set
143 */
144 public void setId(String id) {
145 this.id = id;
146 }
147
148 /**
149 * @return the rank
150 */
151 public String getRank() {
152 return rank;
153 }
154
155 /**
156 * @param rank the rank to set
157 */
158 public void setRank(String rank) {
159 this.rank = rank;
160 }
161
162 /**
163 * @return the author
164 */
165 public String getAuthor() {
166 return author;
167 }
168
169 /**
170 * @param author the author to set
171 */
172 public void setAuthor(String author) {
173 this.author = author;
174 }
175
176 /**
177 * @return the nameStatus
178 */
179 public String getNameStatus() {
180 return nameStatus;
181 }
182
183 /**
184 * @param nameStatus the nameStatus to set
185 */
186 public void setNameStatus(String nameStatus) {
187 this.nameStatus = nameStatus;
188 }
189
190 /**
191 * @return the commonName
192 */
193 public String getCommonName() {
194 return commonName;
195 }
196
197 /**
198 * @param commonName the commonName to set
199 */
200 public void setCommonName(String commonName) {
201 this.commonName = commonName;
202 }
203
204 /**
205 * @return the language
206 */
207 public String getLanguage() {
208 return language;
209 }
210
211 /**
212 * @param language the language to set
213 */
214 public void setLanguage(String language) {
215 this.language = language;
216 }
217
218 public void putDistribution(int key, String distribution){
219 this.distributions.put(key, distribution);
220 }
221
222 public List<String> getDistributions() {
223 return getOrdered(distributions);
224 }
225
226 public void putProtologue(int key, String protologue){
227 this.protologues.put(key, protologue);
228 }
229
230 public List<String> getProtologues() {
231 return getOrdered(protologues);
232 }
233
234 public void putImage(int key, String image){
235 this.images.put(key, image);
236 }
237
238 public List<String> getImages() {
239 return getOrdered(images);
240 }
241
242
243 private List<String> getOrdered(TreeMap<Integer, String> tree) {
244 List<String> result = new ArrayList<String>();
245 for (String distribution : tree.values()){
246 result.add(distribution);
247 }
248 return result;
249 }
250
251 /**
252 * @return the date
253 */
254 public String getDate() {
255 return date;
256 }
257
258 /**
259 * @param date the date to set
260 */
261 public void setDate(String date) {
262 this.date = date;
263 }
264
265 /**
266 * @return the family
267 */
268 public String getFamily() {
269 return family;
270 }
271
272 /**
273 * @param family the family to set
274 */
275 public void setFamily(String family) {
276 this.family = family;
277 }
278
279 /**
280 * @return the basionymAuthor
281 */
282 public String getBasionymAuthor() {
283 return basionymAuthor;
284 }
285
286 /**
287 * @param basionymAuthor the basionymAuthor to set
288 */
289 public void setBasionymAuthor(String basionymAuthor) {
290 this.basionymAuthor = basionymAuthor;
291 }
292
293 /**
294 * @return the infraFamily
295 */
296 public String getInfraFamily() {
297 return infraFamily;
298 }
299
300 /**
301 * @param infraFamily the infraFamily to set
302 */
303 public void setInfraFamily(String infraFamily) {
304 this.infraFamily = infraFamily;
305 }
306
307 /**
308 * @return the genus
309 */
310 public String getGenus() {
311 return genus;
312 }
313
314 /**
315 * @param genus the genus to set
316 */
317 public void setGenus(String genus) {
318 this.genus = genus;
319 }
320
321 /**
322 * @return the infraGenus
323 */
324 public String getInfraGenus() {
325 return infraGenus;
326 }
327
328 /**
329 * @param infraGenus the infraGenus to set
330 */
331 public void setInfraGenus(String infraGenus) {
332 this.infraGenus = infraGenus;
333 }
334
335 /**
336 * @return the species
337 */
338 public String getSpecies() {
339 return species;
340 }
341
342 /**
343 * @param species the species to set
344 */
345 public void setSpecies(String species) {
346 this.species = species;
347 }
348
349 /**
350 * @return the infraSpecies
351 */
352 public String getInfraSpecies() {
353 return infraSpecies;
354 }
355
356 /**
357 * @param infraSpecies the infraSpecies to set
358 */
359 public void setInfraSpecies(String infraSpecies) {
360 this.infraSpecies = infraSpecies;
361 }
362
363 /**
364 * @return the collation
365 */
366 public String getCollation() {
367 return collation;
368 }
369
370 /**
371 * @param collation the collation to set
372 */
373 public void setCollation(String collation) {
374 this.collation = collation;
375 }
376
377 /**
378 * @return the publicationYear
379 */
380 public String getPublicationYear() {
381 return publicationYear;
382 }
383
384 /**
385 * @param publicationYear the publicationYear to set
386 */
387 public void setPublicationYear(String publicationYear) {
388 this.publicationYear = publicationYear;
389 }
390
391 /**
392 * @return the remarks
393 */
394 public String getRemarks() {
395 return remarks;
396 }
397
398 /**
399 * @param remarks the remarks to set
400 */
401 public void setRemarks(String remarks) {
402 this.remarks = remarks;
403 }
404
405 /**
406 * @return the synonym
407 */
408 public String getSynonym() {
409 return synonym;
410 }
411
412 /**
413 * @param synonym the synonym to set
414 */
415 public void setSynonym(String synonym) {
416 this.synonym = synonym;
417 }
418
419 /**
420 * @return the basionym
421 */
422 public String getBasionym() {
423 return basionym;
424 }
425
426 /**
427 * @param basionym the basionym to set
428 */
429 public void setBasionym(String basionym) {
430 this.basionym = basionym;
431 }
432
433 /**
434 * @return the publishingAuthor
435 */
436 public String getPublishingAuthor() {
437 return publishingAuthor;
438 }
439
440 /**
441 * @param publishingAuthor the publishingAuthor to set
442 */
443 public void setPublishingAuthor(String publishingAuthor) {
444 this.publishingAuthor = publishingAuthor;
445 }
446
447 /**
448 * @return the version
449 */
450 public String getVersion() {
451 return version;
452 }
453
454 /**
455 * @param version the version to set
456 */
457 public void setVersion(String version) {
458 this.version = version;
459 }
460
461
462 public void setPage(String value) {
463 this.page = value;
464
465 }
466 public String getPage() {
467 return this.page;
468
469 }
470
471
472 public void setAccepted_id(String value) {
473 this.accepted_id = value;
474 }
475
476 public String getAccepted_id(){
477 return accepted_id;
478 }
479
480 public void setInfraSpecies_Rank(String value) {
481 this.infraSpecies_rank = value;
482 }
483
484 public String getInfraSpecies_Rank() {
485 return this.infraSpecies_rank;
486 }
487
488 public String getTaxonomicStatus() {
489 return this.taxonomicStatus;
490 }
491
492 public void setTaxonomicStatus(String value) {
493 this.taxonomicStatus = value;
494 }
495
496 public String getIpni_id() {
497 return ipni_id;
498 }
499
500 public void setIpni_id(String ipni_id) {
501 this.ipni_id = ipni_id;
502 }
503
504 public void setSource(String value) {
505 this.source = value;
506
507 }
508 public String getSource() {
509 return this.source ;
510
511 }
512 public void setSource_Id(String value) {
513 this.source_Id= value;
514 }
515 public String getSource_Id() {
516 return this.source_Id;
517 }
518
519
520 }