Project

General

Profile

Download (10.4 KB) Statistics
| Branch: | Revision:
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.pesi.faunaEuropaea;
11

    
12
import java.util.UUID;
13

    
14
/**
15
 * @author a.babadshanjan
16
 * @created 26.05.2009
17
 * @version 1.0
18
 */
19
public class FaunaEuropaeaTaxon {
20
	
21
	private UUID uuid;
22
	private UUID parentUuid;
23
	private int id;
24
	private int rankId;
25
	private int parentId;
26
	private int parentRankId;
27
	private int grandParentId;
28
	private int grandParentRankId;
29
	private int greatGrandParentId;
30
	private int greatGrandParentRankId;
31
	private int greatGreatGrandParentId;
32
	private int greatGreatGrandParentRankId;
33
	private int greatGreatGreatGrandParentRankId;
34
	private int greatGreatGreatGrandParentId;
35
	private int originalGenusId;
36
	private Integer year;
37
	private String localName;
38
	private String parentName;
39
	private String grandParentName;
40
	private String greatGrandParentName;
41
	private String greatGreatGrandParentName;
42
	private String greatGreatGreatGrandParentName;
43
	private String originalGenusName;
44
	private String authorName;
45
	private boolean parenthesis = false;
46
	private boolean valid = false;
47
//	private int authorId;
48
//	private UUID nameUuid;
49
	
50
	/**
51
	 * @return the authorName
52
	 */
53
	public String getAuthorName() {
54
		return authorName;
55
	}
56

    
57
	/**
58
	 * @param authorName the authorName to set
59
	 */
60
	public void setAuthorName(String authorName) {
61
		this.authorName = NullToEmpty(authorName);
62
	}
63

    
64
	/**
65
	 * @return the parenthesis
66
	 */
67
	public boolean isParenthesis() {
68
		return parenthesis;
69
	}
70

    
71
	/**
72
	 * @param parenthesis the parenthesis to set
73
	 */
74
	public void setParenthesis(boolean parenthesis) {
75
		this.parenthesis = parenthesis;
76
	}
77

    
78
	public FaunaEuropaeaTaxon() {
79
		this.localName = "";
80
		this.parentName = "";
81
		this.grandParentName = "";
82
		this.greatGrandParentName = "";
83
		this.originalGenusName = "";
84
		this.authorName = "";
85
	}
86
	
87
//	public FaunaEuropaeaTaxon(String name, int parentId) {
88
//		this(name, parentId, null);
89
//	}
90
	
91
//	public FaunaEuropaeaTaxon(String scientificName, int parentId, String reference) {
92
//		this.parentId = parentId;
93
//		this.localName = scientificName;
94
//	}
95
	
96
	/**
97
	 * @return the greatGreatGrandParentRankId
98
	 */
99
	protected int getGreatGreatGrandParentRankId() {
100
		return greatGreatGrandParentRankId;
101
	}
102

    
103
	/**
104
	 * @param greatGreatGrandParentRankId the greatGreatGrandParentRankId to set
105
	 */
106
	protected void setGreatGreatGrandParentRankId(int greatGreatGrandParentRankId) {
107
		this.greatGreatGrandParentRankId = greatGreatGrandParentRankId;
108
	}
109

    
110
	/**
111
	 * @return the greatGreatGreatGrandParentRankId
112
	 */
113
	protected int getGreatGreatGreatGrandParentRankId() {
114
		return greatGreatGreatGrandParentRankId;
115
	}
116

    
117
	/**
118
	 * @param greatGreatGreatGrandParentRankId the greatGreatGreatGrandParentRankId to set
119
	 */
120
	protected void setGreatGreatGreatGrandParentRankId(
121
			int greatGreatGreatGrandParentRankId) {
122
		this.greatGreatGreatGrandParentRankId = greatGreatGreatGrandParentRankId;
123
	}
124

    
125
	/**
126
	 * @return the greatGreatGreatGrandParentId
127
	 */
128
	protected int getGreatGreatGreatGrandParentId() {
129
		return greatGreatGreatGrandParentId;
130
	}
131

    
132
	/**
133
	 * @param greatGreatGreatGrandParentId the greatGreatGreatGrandParentId to set
134
	 */
135
	protected void setGreatGreatGreatGrandParentId(int greatGreatGreatGrandParentId) {
136
		this.greatGreatGreatGrandParentId = greatGreatGreatGrandParentId;
137
	}
138

    
139
	/**
140
	 * @return the parentId
141
	 */
142
	public int getParentId() {
143
		return parentId;
144
	}
145

    
146
	/**
147
	 * @param parentId the parentId to set
148
	 */
149
	public void setParentId(int parentId) {
150
		this.parentId = parentId;
151
	}
152
	
153
	/**
154
	 * @return the name
155
	 */
156
	public String getLocalName() {
157
		return localName;
158
	}
159
	/**
160
	 * @param name the name to set
161
	 */
162
	public void setLocalName(String scientificName) {
163
		this.localName = NullToEmpty(scientificName);
164
	}
165

    
166
	/**
167
	 * @return the id
168
	 */
169
	public int getId() {
170
		return id;
171
	}
172

    
173
	/**
174
	 * @param id the id to set
175
	 */
176
	public void setId(int id) {
177
		this.id = id;
178
	}
179

    
180
	/**
181
	 * @return the rankId
182
	 */
183
	public int getRankId() {
184
		return rankId;
185
	}
186

    
187
	/**
188
	 * @param rankId the rankId to set
189
	 */
190
	public void setRankId(int rankId) {
191
		this.rankId = rankId;
192
	}
193

    
194
	/**
195
	 * @return the uuid
196
	 */
197
	public UUID getUuid() {
198
		return uuid;
199
	}
200

    
201
	/**
202
	 * @param uuid the uuid to set
203
	 */
204
	public void setUuid(UUID uuid) {
205
		this.uuid = uuid;
206
	}
207

    
208
//	/**
209
//	 * @return the nameUuid
210
//	 */
211
//	public UUID getNameUuid() {
212
//		return nameUuid;
213
//	}
214
//
215
//	/**
216
//	 * @param nameUuid the nameUuid to set
217
//	 */
218
//	public void setNameUuid(UUID nameUuid) {
219
//		this.nameUuid = nameUuid;
220
//	}
221

    
222
	/**
223
	 * @return the year
224
	 */
225
	public Integer getYear() {
226
		return year;
227
	}
228

    
229
	/**
230
	 * @param year the year to set
231
	 */
232
	public void setYear(Integer year) {
233
		if (year != null && year.intValue() == 0) {
234
			year = null;
235
		}
236
		this.year = year;
237
	}
238

    
239
	/**
240
	 * @return the author
241
	 */
242
	public String getAuthor() {
243
		return authorName;
244
	}
245

    
246
	/**
247
	 * @param author the author to set
248
	 */
249
	public void setAuthor(String author) {
250
		this.authorName = NullToEmpty(author);
251
	}
252

    
253
	/**
254
	 * @return the valid
255
	 */
256
	public boolean isValid() {
257
		return valid;
258
	}
259

    
260
	/**
261
	 * @param valid the valid to set
262
	 */
263
	public void setValid(boolean valid) {
264
		this.valid = valid;
265
	}
266

    
267
	/**
268
	 * @return the originalGenusId
269
	 */
270
	public int getOriginalGenusId() {
271
		return originalGenusId;
272
	}
273

    
274
	/**
275
	 * @param originalGenusId the originalGenusId to set
276
	 */
277
	public void setOriginalGenusId(int originalGenusId) {
278
		this.originalGenusId = originalGenusId;
279
	}
280

    
281
	/**
282
	 * @return the originalGenusName
283
	 */
284
	public String getOriginalGenusName() {
285
		return originalGenusName;
286
	}
287

    
288
	/**
289
	 * @param originalGenusName the originalGenusName to set
290
	 */
291
	public void setOriginalGenusName(String originalGenusName) {
292
		this.originalGenusName = NullToEmpty(originalGenusName);
293
	}
294

    
295
	/**
296
	 * @return the parentName
297
	 */
298
	public String getParentName() {
299
		return parentName;
300
	}
301

    
302
	/**
303
	 * @param parentName the parentName to set
304
	 */
305
	public void setParentName(String parentName) {
306
		this.parentName = NullToEmpty(parentName);
307
	}
308

    
309
	/**
310
	 * @return the grandParentName
311
	 */
312
	public String getGrandParentName() {
313
		return grandParentName;
314
	}
315

    
316
	/**
317
	 * @param grandParentName the grandParentName to set
318
	 */
319
	public void setGrandParentName(String grandParentName) {
320
		this.grandParentName = NullToEmpty(grandParentName);
321
	}
322

    
323
	/**
324
	 * @return the greatGrandParentName
325
	 */
326
	public String getGreatGrandParentName() {
327
		return greatGrandParentName;
328
	}
329

    
330
	/**
331
	 * @param greatGrandParentName the greatGrandParentName to set
332
	 */
333
	public void setGreatGrandParentName(String greatGrandParentName) {
334
		this.greatGrandParentName = NullToEmpty(greatGrandParentName);
335
	}
336

    
337
	/**
338
	 * @return the greatGreatGreatGrandParentName
339
	 */
340
	protected String getGreatGreatGreatGrandParentName() {
341
		return greatGreatGreatGrandParentName;
342
	}
343

    
344
	/**
345
	 * @param greatGreatGreatGrandParentName the greatGreatGreatGrandParentName to set
346
	 */
347
	protected void setGreatGreatGreatGrandParentName(
348
			String greatGreatGreatGrandParentName) {
349
		this.greatGreatGreatGrandParentName = greatGreatGreatGrandParentName;
350
	}
351

    
352
	/**
353
	 * @return the parentRankId
354
	 */
355
	public int getParentRankId() {
356
		return parentRankId;
357
	}
358

    
359
	/**
360
	 * @param parentRankId the parentRankId to set
361
	 */
362
	public void setParentRankId(int parentRankId) {
363
		this.parentRankId = parentRankId;
364
	}
365

    
366
	/**
367
	 * @return the grandParentRankId
368
	 */
369
	public int getGrandParentRankId() {
370
		return grandParentRankId;
371
	}
372

    
373
	/**
374
	 * @param grandParentRankId the grandParentRankId to set
375
	 */
376
	public void setGrandParentRankId(int grandParentRankId) {
377
		this.grandParentRankId = grandParentRankId;
378
	}
379

    
380
	/**
381
	 * @return the greatGrandParentRankId
382
	 */
383
	public int getGreatGrandParentRankId() {
384
		return greatGrandParentRankId;
385
	}
386

    
387
	/**
388
	 * @param greatGrandParentRankId the greatGrandParentRankId to set
389
	 */
390
	public void setGreatGrandParentRankId(int greatGrandParentRankId) {
391
		this.greatGrandParentRankId = greatGrandParentRankId;
392
	}
393

    
394
	/**
395
	 * @return the greatGreatGrandParentName
396
	 */
397
	public String getGreatGreatGrandParentName() {
398
		return greatGreatGrandParentName;
399
	}
400

    
401
	/**
402
	 * @param greatGreatGrandParentName the greatGreatGrandParentName to set
403
	 */
404
	public void setGreatGreatGrandParentName(String greatGreatGrandParentName) {
405
		this.greatGreatGrandParentName = NullToEmpty(greatGreatGrandParentName);
406
	}
407

    
408
	/**
409
	 * @return the grandParentId
410
	 */
411
	public int getGrandParentId() {
412
		return grandParentId;
413
	}
414

    
415
	/**
416
	 * @param grandParentId the grandParentId to set
417
	 */
418
	public void setGrandParentId(int grandParentId) {
419
		this.grandParentId = grandParentId;
420
	}
421

    
422
	/**
423
	 * @return the greatGrandParentId
424
	 */
425
	public int getGreatGrandParentId() {
426
		return greatGrandParentId;
427
	}
428

    
429
	/**
430
	 * @param greatGrandParentId the greatGrandParentId to set
431
	 */
432
	public void setGreatGrandParentId(int greatGrandParentId) {
433
		this.greatGrandParentId = greatGrandParentId;
434
	}
435

    
436
	/**
437
	 * @return the greatGreatGrandParentId
438
	 */
439
	public int getGreatGreatGrandParentId() {
440
		return greatGreatGrandParentId;
441
	}
442

    
443
	/**
444
	 * @param greatGreatGrandParentId the greatGreatGrandParentId to set
445
	 */
446
	public void setGreatGreatGrandParentId(int greatGreatGrandParentId) {
447
		this.greatGreatGrandParentId = greatGreatGrandParentId;
448
	}
449

    
450
	/**
451
	 * @return the parentUuid
452
	 */
453
	public UUID getParentUuid() {
454
		return parentUuid;
455
	}
456

    
457
	/**
458
	 * @param parentUuid the parentUuid to set
459
	 */
460
	public void setParentUuid(UUID parentUuid) {
461
		this.parentUuid = parentUuid;
462
	}
463

    
464
	/**
465
	 * Returns an empty string in case of a null string.
466
	 * This avoids having the string "null" when using StringBuilder.append(null);
467
	 * @param string
468
	 * @return
469
	 */
470
	private String NullToEmpty(String string) {
471
		if (string == null) {
472
			return "";
473
		} else {
474
			return string;
475
		}
476
	}
477
//	/**
478
//	 * @return the authorId
479
//	 */
480
//	public int getAuthorId() {
481
//		return authorId;
482
//	}
483
//
484
//	/**
485
//	 * @param authorId the authorId to set
486
//	 */
487
//	public void setAuthorId(int authorId) {
488
//		this.authorId = authorId;
489
//	}
490

    
491
}
(14-14/20)