1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.io.dwca.out;
|
11
|
|
12
|
import java.io.PrintWriter;
|
13
|
import java.util.Arrays;
|
14
|
import java.util.List;
|
15
|
|
16
|
import org.apache.log4j.Logger;
|
17
|
|
18
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
19
|
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase;
|
20
|
import eu.etaxonomy.cdm.model.description.Stage;
|
21
|
|
22
|
/**
|
23
|
* @author a.mueller
|
24
|
* @date 20.04.2011
|
25
|
*
|
26
|
*/
|
27
|
public class DwcaDistributionRecord extends DwcaRecordBase implements IDwcaAreaRecord{
|
28
|
@SuppressWarnings("unused")
|
29
|
private static final Logger logger = Logger.getLogger(DwcaDistributionRecord.class);
|
30
|
private Integer coreid;
|
31
|
private Integer locationId;
|
32
|
private String locality;
|
33
|
private String countryCode;
|
34
|
private Stage lifeStage;
|
35
|
private PresenceAbsenceTermBase occurrenceStatus;
|
36
|
private String threadStatus;
|
37
|
|
38
|
private String establishmentMeans;
|
39
|
private String appendixCITES;
|
40
|
private TimePeriod eventDate;
|
41
|
|
42
|
private TimePeriod seasonalDate; //startDayOfYear and endDayOfYear
|
43
|
private String source;
|
44
|
private String occurrenceRemarks;
|
45
|
|
46
|
@Override
|
47
|
public List<String> getHeaderList() {
|
48
|
String[] result = new String[]{"coreid", "locationId","locality","countryCode",
|
49
|
"lifeStage", "occurrenceStatus", "threadStatus", "establishmentMeans",
|
50
|
"appendixCITES", "eventDate", "startDayOfYear", "endDayOfYear", "source", "occurrenceRemarks"};
|
51
|
return Arrays.asList(result);
|
52
|
}
|
53
|
|
54
|
public void write(PrintWriter writer) {
|
55
|
print(coreid, writer, IS_FIRST);
|
56
|
print(locationId, writer, IS_NOT_FIRST);
|
57
|
print(locality, writer, IS_NOT_FIRST);
|
58
|
print(countryCode, writer, IS_NOT_FIRST);
|
59
|
print(getLifeStage(lifeStage), writer, IS_NOT_FIRST);
|
60
|
print(getOccurrenceStatus(occurrenceStatus), writer, IS_NOT_FIRST);
|
61
|
print(threadStatus, writer, IS_NOT_FIRST);
|
62
|
print(establishmentMeans, writer, IS_NOT_FIRST);
|
63
|
print(appendixCITES, writer, IS_NOT_FIRST);
|
64
|
print(getTimePeriod(eventDate),writer, IS_NOT_FIRST);
|
65
|
print(getTimePeriodPart(seasonalDate, false),writer, IS_NOT_FIRST);
|
66
|
print(getTimePeriodPart(seasonalDate, true),writer, IS_NOT_FIRST);
|
67
|
print(source, writer, IS_NOT_FIRST);
|
68
|
print(occurrenceRemarks, writer, IS_NOT_FIRST);
|
69
|
writer.println();
|
70
|
}
|
71
|
|
72
|
|
73
|
public String getSource() {
|
74
|
return source;
|
75
|
}
|
76
|
public void setSource(String source) {
|
77
|
this.source = source;
|
78
|
}
|
79
|
|
80
|
public Integer getCoreid() {
|
81
|
return coreid;
|
82
|
}
|
83
|
|
84
|
public void setCoreid(Integer coreid) {
|
85
|
this.coreid = coreid;
|
86
|
}
|
87
|
|
88
|
public String getLocality() {
|
89
|
return locality;
|
90
|
}
|
91
|
|
92
|
|
93
|
public void setLocality(String locality) {
|
94
|
this.locality = locality;
|
95
|
}
|
96
|
|
97
|
|
98
|
public String getCountryCode() {
|
99
|
return countryCode;
|
100
|
}
|
101
|
|
102
|
|
103
|
public void setCountryCode(String countryCode) {
|
104
|
this.countryCode = countryCode;
|
105
|
}
|
106
|
|
107
|
|
108
|
public Stage getLifeStage() {
|
109
|
return lifeStage;
|
110
|
}
|
111
|
|
112
|
|
113
|
public void setLifeStage(Stage lifeStage) {
|
114
|
this.lifeStage = lifeStage;
|
115
|
}
|
116
|
|
117
|
|
118
|
public Integer getLocationId() {
|
119
|
return locationId;
|
120
|
}
|
121
|
|
122
|
|
123
|
public void setLocationId(Integer locationId) {
|
124
|
this.locationId = locationId;
|
125
|
}
|
126
|
|
127
|
|
128
|
public PresenceAbsenceTermBase getOccurrenceStatus() {
|
129
|
return occurrenceStatus;
|
130
|
}
|
131
|
|
132
|
|
133
|
public void setOccurrenceStatus(PresenceAbsenceTermBase occurrenceStatus) {
|
134
|
this.occurrenceStatus = occurrenceStatus;
|
135
|
}
|
136
|
|
137
|
|
138
|
public String getThreadStatus() {
|
139
|
return threadStatus;
|
140
|
}
|
141
|
|
142
|
|
143
|
public void setThreadStatus(String threadStatus) {
|
144
|
this.threadStatus = threadStatus;
|
145
|
}
|
146
|
|
147
|
|
148
|
public String getEstablishmentMeans() {
|
149
|
return establishmentMeans;
|
150
|
}
|
151
|
|
152
|
|
153
|
public void setEstablishmentMeans(String establishmentMeans) {
|
154
|
this.establishmentMeans = establishmentMeans;
|
155
|
}
|
156
|
|
157
|
|
158
|
public String getAppendixCITES() {
|
159
|
return appendixCITES;
|
160
|
}
|
161
|
|
162
|
|
163
|
public void setAppendixCITES(String appendixCITES) {
|
164
|
this.appendixCITES = appendixCITES;
|
165
|
}
|
166
|
|
167
|
|
168
|
public TimePeriod getEventDate() {
|
169
|
return eventDate;
|
170
|
}
|
171
|
|
172
|
|
173
|
public void setEventDate(TimePeriod eventDate) {
|
174
|
this.eventDate = eventDate;
|
175
|
}
|
176
|
|
177
|
|
178
|
public TimePeriod getSeasonalDate() {
|
179
|
return seasonalDate;
|
180
|
}
|
181
|
|
182
|
|
183
|
public void setSeasonalDate(TimePeriod seasonalDate) {
|
184
|
this.seasonalDate = seasonalDate;
|
185
|
}
|
186
|
|
187
|
|
188
|
public String getOccurrenceRemarks() {
|
189
|
return occurrenceRemarks;
|
190
|
}
|
191
|
|
192
|
|
193
|
public void setOccurrenceRemarks(String occurrenceRemarks) {
|
194
|
this.occurrenceRemarks = occurrenceRemarks;
|
195
|
}
|
196
|
|
197
|
|
198
|
}
|