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
|
package eu.etaxonomy.cdm.io.dwca.out;
|
10
|
|
11
|
import java.io.PrintWriter;
|
12
|
import java.util.ArrayList;
|
13
|
import java.util.List;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
|
17
|
import org.joda.time.DateTime;
|
18
|
|
19
|
import eu.etaxonomy.cdm.common.URI;
|
20
|
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
|
21
|
import eu.etaxonomy.cdm.model.common.Language;
|
22
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
23
|
import eu.etaxonomy.cdm.model.location.Point;
|
24
|
import eu.etaxonomy.cdm.model.media.Rights;
|
25
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
26
|
|
27
|
/**
|
28
|
* @author a.mueller
|
29
|
* @since 20.04.2011
|
30
|
*/
|
31
|
public class DwcaEmlRecord extends DwcaRecordBase {
|
32
|
|
33
|
@SuppressWarnings("unused")
|
34
|
private static final Logger logger = LogManager.getLogger(DwcaEmlRecord.class);
|
35
|
|
36
|
// BASIC
|
37
|
private String identifier;
|
38
|
private String title;
|
39
|
private DateTime publicationDate;
|
40
|
private String expectedCitation;
|
41
|
private String abstractInfo;
|
42
|
private String additionalInformation;
|
43
|
private Language resourceLanguage;
|
44
|
private URI resourceUrl;
|
45
|
private Rights creativeCommonsLicensing;
|
46
|
private Language metaDataLanguage;
|
47
|
private URI resourceLogoUri;
|
48
|
|
49
|
// Research Project
|
50
|
private String projectTitle;
|
51
|
private String projectLead;
|
52
|
private String projectDescription;
|
53
|
|
54
|
// People
|
55
|
private InstitutionalMembership resourceCreator;
|
56
|
private InstitutionalMembership metaDataAuthor;
|
57
|
private InstitutionalMembership contact;
|
58
|
private List<InstitutionalMembership> authors = new ArrayList<>();
|
59
|
|
60
|
// Keywords / Coverage
|
61
|
private String regionalScope;
|
62
|
private List<String> keywords = new ArrayList<>();
|
63
|
private String keywordThesaurus; //maybe a URI
|
64
|
private TimePeriod date;
|
65
|
private List<String> taxonomicKeywords = new ArrayList<>();
|
66
|
|
67
|
private Point upperLeftCorner;
|
68
|
private Point lowerRightCorner;
|
69
|
|
70
|
private List<Reference> references = new ArrayList<>();
|
71
|
|
72
|
|
73
|
@Override
|
74
|
protected void registerKnownFields() {
|
75
|
//not needed
|
76
|
}
|
77
|
|
78
|
public DwcaEmlRecord() {
|
79
|
super(new DwcaMetaDataRecord(false, null, null), null);
|
80
|
}
|
81
|
|
82
|
@Override
|
83
|
public void write(DwcaTaxExportState state, PrintWriter writer) {
|
84
|
//not needed
|
85
|
}
|
86
|
@Override
|
87
|
protected void doWrite(DwcaTaxExportState state, PrintWriter writer) {
|
88
|
//not needed
|
89
|
}
|
90
|
|
91
|
public String getIdentifier() {
|
92
|
if (identifier == null){
|
93
|
identifier = UUID.randomUUID().toString();
|
94
|
}
|
95
|
return identifier;
|
96
|
}
|
97
|
|
98
|
public void setIdentifier(String identifier) {
|
99
|
this.identifier = identifier;
|
100
|
}
|
101
|
|
102
|
public String getTitle() {
|
103
|
return title;
|
104
|
}
|
105
|
|
106
|
public void setTitle(String title) {
|
107
|
this.title = title;
|
108
|
}
|
109
|
|
110
|
public DateTime getPublicationDate() {
|
111
|
return publicationDate;
|
112
|
}
|
113
|
|
114
|
public void setPublicationDate(DateTime publicationDate) {
|
115
|
this.publicationDate = publicationDate;
|
116
|
}
|
117
|
|
118
|
public String getExpectedCitation() {
|
119
|
return expectedCitation;
|
120
|
}
|
121
|
|
122
|
public void setExpectedCitation(String expectedCitation) {
|
123
|
this.expectedCitation = expectedCitation;
|
124
|
}
|
125
|
|
126
|
public String getAbstractInfo() {
|
127
|
return abstractInfo;
|
128
|
}
|
129
|
|
130
|
public void setAbstractInfo(String abstractInfo) {
|
131
|
this.abstractInfo = abstractInfo;
|
132
|
}
|
133
|
|
134
|
public String getAdditionalInformation() {
|
135
|
return additionalInformation;
|
136
|
}
|
137
|
|
138
|
public void setAdditionalInformation(String additionalInformation) {
|
139
|
this.additionalInformation = additionalInformation;
|
140
|
}
|
141
|
|
142
|
public Language getResourceLanguage() {
|
143
|
return resourceLanguage;
|
144
|
}
|
145
|
|
146
|
public void setResourceLanguage(Language resourceLanguage) {
|
147
|
this.resourceLanguage = resourceLanguage;
|
148
|
}
|
149
|
|
150
|
public URI getResourceUrl() {
|
151
|
return resourceUrl;
|
152
|
}
|
153
|
|
154
|
public void setResourceUrl(URI resourceUrl) {
|
155
|
this.resourceUrl = resourceUrl;
|
156
|
}
|
157
|
|
158
|
public Rights getCreativeCommonsLicensing() {
|
159
|
return creativeCommonsLicensing;
|
160
|
}
|
161
|
|
162
|
public void setCreativeCommonsLicensing(Rights creativeCommonsLicensing) {
|
163
|
this.creativeCommonsLicensing = creativeCommonsLicensing;
|
164
|
}
|
165
|
|
166
|
public Language getMetaDataLanguage() {
|
167
|
return metaDataLanguage;
|
168
|
}
|
169
|
|
170
|
public void setMetaDataLanguage(Language metaDataLanguage) {
|
171
|
this.metaDataLanguage = metaDataLanguage;
|
172
|
}
|
173
|
|
174
|
public URI getResourceLogoUri() {
|
175
|
return resourceLogoUri;
|
176
|
}
|
177
|
|
178
|
public void setResourceLogoUri(URI resourceLogoUri) {
|
179
|
this.resourceLogoUri = resourceLogoUri;
|
180
|
}
|
181
|
|
182
|
public String getProjectTitle() {
|
183
|
return projectTitle;
|
184
|
}
|
185
|
|
186
|
public void setProjectTitle(String projectTitle) {
|
187
|
this.projectTitle = projectTitle;
|
188
|
}
|
189
|
|
190
|
public String getProjectLead() {
|
191
|
return projectLead;
|
192
|
}
|
193
|
|
194
|
public void setProjectLead(String projectLead) {
|
195
|
this.projectLead = projectLead;
|
196
|
}
|
197
|
|
198
|
public String getProjectDescription() {
|
199
|
return projectDescription;
|
200
|
}
|
201
|
|
202
|
public void setProjectDescription(String projectDescription) {
|
203
|
this.projectDescription = projectDescription;
|
204
|
}
|
205
|
|
206
|
public InstitutionalMembership getResourceCreator() {
|
207
|
return resourceCreator;
|
208
|
}
|
209
|
|
210
|
public void setResourceCreator(InstitutionalMembership resourceCreator) {
|
211
|
this.resourceCreator = resourceCreator;
|
212
|
}
|
213
|
|
214
|
public InstitutionalMembership getMetaDataAuthor() {
|
215
|
return metaDataAuthor;
|
216
|
}
|
217
|
|
218
|
public void setMetaDataAuthor(InstitutionalMembership metaDataAuthor) {
|
219
|
this.metaDataAuthor = metaDataAuthor;
|
220
|
}
|
221
|
|
222
|
|
223
|
|
224
|
public InstitutionalMembership getContact() {
|
225
|
return contact;
|
226
|
}
|
227
|
|
228
|
public void setContact(InstitutionalMembership contact) {
|
229
|
this.contact = contact;
|
230
|
}
|
231
|
|
232
|
|
233
|
public List<InstitutionalMembership> getAuthors() {
|
234
|
return authors != null ? authors : new ArrayList<>();
|
235
|
}
|
236
|
|
237
|
public void setAuthors(List<InstitutionalMembership> authors) {
|
238
|
this.authors = authors;
|
239
|
}
|
240
|
|
241
|
public String getRegionalScope() {
|
242
|
return regionalScope;
|
243
|
}
|
244
|
|
245
|
public void setRegionalScope(String regionalScope) {
|
246
|
this.regionalScope = regionalScope;
|
247
|
}
|
248
|
|
249
|
public List<String> getKeywords() {
|
250
|
return keywords != null ? keywords : new ArrayList<>();
|
251
|
}
|
252
|
|
253
|
public void setKeywords(List<String> keywords) {
|
254
|
this.keywords = keywords;
|
255
|
}
|
256
|
|
257
|
public String getKeywordThesaurus() {
|
258
|
return keywordThesaurus;
|
259
|
}
|
260
|
|
261
|
public void setKeywordThesaurus(String keywordThesaurus) {
|
262
|
this.keywordThesaurus = keywordThesaurus;
|
263
|
}
|
264
|
|
265
|
public TimePeriod getDate() {
|
266
|
return date;
|
267
|
}
|
268
|
|
269
|
public void setDate(TimePeriod date) {
|
270
|
this.date = date;
|
271
|
}
|
272
|
|
273
|
public List<String> getTaxonomicKeywords() {
|
274
|
return taxonomicKeywords != null ? taxonomicKeywords : new ArrayList<>();
|
275
|
}
|
276
|
|
277
|
public void setTaxonomicKeywords(List<String> taxonomicKeywords) {
|
278
|
this.taxonomicKeywords = taxonomicKeywords;
|
279
|
}
|
280
|
|
281
|
public Point getUpperLeftCorner() {
|
282
|
return upperLeftCorner;
|
283
|
}
|
284
|
|
285
|
public void setUpperLeftCorner(Point upperLeftCorner) {
|
286
|
this.upperLeftCorner = upperLeftCorner;
|
287
|
}
|
288
|
|
289
|
public Point getLowerRightCorner() {
|
290
|
return lowerRightCorner;
|
291
|
}
|
292
|
|
293
|
public void setLowerRightCorner(Point lowerRightCorner) {
|
294
|
this.lowerRightCorner = lowerRightCorner;
|
295
|
}
|
296
|
|
297
|
public List<Reference> getReferences() {
|
298
|
return references != null ? references : new ArrayList<>();
|
299
|
}
|
300
|
|
301
|
public void setReferences(List<Reference> references) {
|
302
|
this.references = references;
|
303
|
}
|
304
|
|
305
|
}
|