2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.io
.dwca
.out
;
11 import java
.io
.PrintWriter
;
13 import java
.util
.ArrayList
;
14 import java
.util
.List
;
15 import java
.util
.UUID
;
17 import org
.apache
.log4j
.Logger
;
18 import org
.joda
.time
.DateTime
;
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
;
31 public class DwcaEmlRecord
extends DwcaRecordBase
{
33 @SuppressWarnings("unused")
34 private static final Logger logger
= Logger
.getLogger(DwcaEmlRecord
.class);
37 private String identifier
;
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
;
50 private String projectTitle
;
51 private String projectLead
;
52 private String projectDescription
;
55 private InstitutionalMembership resourceCreator
;
56 private InstitutionalMembership metaDataAuthor
;
57 private InstitutionalMembership contact
;
58 private List
<InstitutionalMembership
> authors
= new ArrayList
<>();
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
<>();
67 private Point upperLeftCorner
;
68 private Point lowerRightCorner
;
70 private List
<Reference
> references
= new ArrayList
<>();
74 protected void registerKnownFields() {
78 public DwcaEmlRecord() {
79 super(new DwcaMetaDataRecord(false, null, null), null);
83 public void write(DwcaTaxExportState state
, PrintWriter writer
) {
87 protected void doWrite(DwcaTaxExportState state
, PrintWriter writer
) {
91 public String
getIdentifier() {
92 if (identifier
== null){
93 identifier
= UUID
.randomUUID().toString();
98 public void setIdentifier(String identifier
) {
99 this.identifier
= identifier
;
102 public String
getTitle() {
106 public void setTitle(String title
) {
110 public DateTime
getPublicationDate() {
111 return publicationDate
;
114 public void setPublicationDate(DateTime publicationDate
) {
115 this.publicationDate
= publicationDate
;
118 public String
getExpectedCitation() {
119 return expectedCitation
;
122 public void setExpectedCitation(String expectedCitation
) {
123 this.expectedCitation
= expectedCitation
;
126 public String
getAbstractInfo() {
130 public void setAbstractInfo(String abstractInfo
) {
131 this.abstractInfo
= abstractInfo
;
134 public String
getAdditionalInformation() {
135 return additionalInformation
;
138 public void setAdditionalInformation(String additionalInformation
) {
139 this.additionalInformation
= additionalInformation
;
142 public Language
getResourceLanguage() {
143 return resourceLanguage
;
146 public void setResourceLanguage(Language resourceLanguage
) {
147 this.resourceLanguage
= resourceLanguage
;
150 public URI
getResourceUrl() {
154 public void setResourceUrl(URI resourceUrl
) {
155 this.resourceUrl
= resourceUrl
;
158 public Rights
getCreativeCommonsLicensing() {
159 return creativeCommonsLicensing
;
162 public void setCreativeCommonsLicensing(Rights creativeCommonsLicensing
) {
163 this.creativeCommonsLicensing
= creativeCommonsLicensing
;
166 public Language
getMetaDataLanguage() {
167 return metaDataLanguage
;
170 public void setMetaDataLanguage(Language metaDataLanguage
) {
171 this.metaDataLanguage
= metaDataLanguage
;
174 public URI
getResourceLogoUri() {
175 return resourceLogoUri
;
178 public void setResourceLogoUri(URI resourceLogoUri
) {
179 this.resourceLogoUri
= resourceLogoUri
;
182 public String
getProjectTitle() {
186 public void setProjectTitle(String projectTitle
) {
187 this.projectTitle
= projectTitle
;
190 public String
getProjectLead() {
194 public void setProjectLead(String projectLead
) {
195 this.projectLead
= projectLead
;
198 public String
getProjectDescription() {
199 return projectDescription
;
202 public void setProjectDescription(String projectDescription
) {
203 this.projectDescription
= projectDescription
;
206 public InstitutionalMembership
getResourceCreator() {
207 return resourceCreator
;
210 public void setResourceCreator(InstitutionalMembership resourceCreator
) {
211 this.resourceCreator
= resourceCreator
;
214 public InstitutionalMembership
getMetaDataAuthor() {
215 return metaDataAuthor
;
218 public void setMetaDataAuthor(InstitutionalMembership metaDataAuthor
) {
219 this.metaDataAuthor
= metaDataAuthor
;
224 public InstitutionalMembership
getContact() {
228 public void setContact(InstitutionalMembership contact
) {
229 this.contact
= contact
;
233 public List
<InstitutionalMembership
> getAuthors() {
234 return authors
!= null ? authors
: new ArrayList
<>();
237 public void setAuthors(List
<InstitutionalMembership
> authors
) {
238 this.authors
= authors
;
241 public String
getRegionalScope() {
242 return regionalScope
;
245 public void setRegionalScope(String regionalScope
) {
246 this.regionalScope
= regionalScope
;
249 public List
<String
> getKeywords() {
250 return keywords
!= null ? keywords
: new ArrayList
<>();
253 public void setKeywords(List
<String
> keywords
) {
254 this.keywords
= keywords
;
257 public String
getKeywordThesaurus() {
258 return keywordThesaurus
;
261 public void setKeywordThesaurus(String keywordThesaurus
) {
262 this.keywordThesaurus
= keywordThesaurus
;
265 public TimePeriod
getDate() {
269 public void setDate(TimePeriod date
) {
273 public List
<String
> getTaxonomicKeywords() {
274 return taxonomicKeywords
!= null ? taxonomicKeywords
: new ArrayList
<>();
277 public void setTaxonomicKeywords(List
<String
> taxonomicKeywords
) {
278 this.taxonomicKeywords
= taxonomicKeywords
;
281 public Point
getUpperLeftCorner() {
282 return upperLeftCorner
;
285 public void setUpperLeftCorner(Point upperLeftCorner
) {
286 this.upperLeftCorner
= upperLeftCorner
;
289 public Point
getLowerRightCorner() {
290 return lowerRightCorner
;
293 public void setLowerRightCorner(Point lowerRightCorner
) {
294 this.lowerRightCorner
= lowerRightCorner
;
297 public List
<Reference
> getReferences() {
298 return references
!= null ? references
: new ArrayList
<>();
301 public void setReferences(List
<Reference
> references
) {
302 this.references
= references
;