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.ArrayList;
|
14
|
import java.util.Arrays;
|
15
|
import java.util.List;
|
16
|
import java.util.Set;
|
17
|
|
18
|
import org.apache.log4j.Logger;
|
19
|
|
20
|
import eu.etaxonomy.cdm.model.agent.AgentBase;
|
21
|
import eu.etaxonomy.cdm.model.common.Language;
|
22
|
import eu.etaxonomy.cdm.model.description.Feature;
|
23
|
import eu.etaxonomy.cdm.model.media.Rights;
|
24
|
|
25
|
/**
|
26
|
* @author a.mueller
|
27
|
* @date 20.04.2011
|
28
|
*
|
29
|
*/
|
30
|
public class DwcaDescriptionRecord extends DwcaRecordBase {
|
31
|
|
32
|
@SuppressWarnings("unused")
|
33
|
private static final Logger logger = Logger.getLogger(DwcaDescriptionRecord.class);
|
34
|
private Integer coreid;
|
35
|
private String description;
|
36
|
private Feature type;
|
37
|
private String source;
|
38
|
private Language language;
|
39
|
private AgentBase<?> creator;
|
40
|
private AgentBase<?> contributor;
|
41
|
private String audience;
|
42
|
private Set<Rights> license;
|
43
|
private AgentBase<?> rightsHolder;
|
44
|
|
45
|
|
46
|
@Override
|
47
|
public List<String> getHeaderList() {
|
48
|
String[] result = new String[]{"coreid", "description","type","source",
|
49
|
"language", "creator", "contributor", "audience",
|
50
|
"license", "rightsHolder"};
|
51
|
return Arrays.asList(result);
|
52
|
}
|
53
|
|
54
|
public void write(PrintWriter writer) {
|
55
|
print(coreid, writer, IS_FIRST);
|
56
|
print(description, writer, IS_NOT_FIRST);
|
57
|
print(getFeature(type), writer, IS_NOT_FIRST);
|
58
|
print(source, writer, IS_NOT_FIRST);
|
59
|
print(language, writer, IS_NOT_FIRST);
|
60
|
print(creator, writer, IS_NOT_FIRST);
|
61
|
print(contributor, writer, IS_NOT_FIRST);
|
62
|
print(audience, writer, IS_NOT_FIRST);
|
63
|
print(license, writer, IS_NOT_FIRST);
|
64
|
print(rightsHolder, writer, IS_NOT_FIRST);
|
65
|
writer.println();
|
66
|
}
|
67
|
|
68
|
public String getSource() {
|
69
|
return source;
|
70
|
}
|
71
|
public void setSource(String source) {
|
72
|
this.source = source;
|
73
|
}
|
74
|
|
75
|
public Integer getCoreid() {
|
76
|
return coreid;
|
77
|
}
|
78
|
|
79
|
public void setCoreid(Integer coreid) {
|
80
|
this.coreid = coreid;
|
81
|
}
|
82
|
|
83
|
public String getDescription() {
|
84
|
return description;
|
85
|
}
|
86
|
|
87
|
|
88
|
public void setDescription(String description) {
|
89
|
this.description = description;
|
90
|
}
|
91
|
|
92
|
|
93
|
public Feature getType() {
|
94
|
return type;
|
95
|
}
|
96
|
|
97
|
|
98
|
public void setType(Feature type) {
|
99
|
this.type = type;
|
100
|
}
|
101
|
|
102
|
|
103
|
public Language getLanguage() {
|
104
|
return language;
|
105
|
}
|
106
|
|
107
|
|
108
|
public void setLanguage(Language language) {
|
109
|
this.language = language;
|
110
|
}
|
111
|
|
112
|
|
113
|
public AgentBase<?> getCreator() {
|
114
|
return creator;
|
115
|
}
|
116
|
|
117
|
|
118
|
public void setCreator(AgentBase<?> creator) {
|
119
|
this.creator = creator;
|
120
|
}
|
121
|
|
122
|
|
123
|
public AgentBase<?> getContributor() {
|
124
|
return contributor;
|
125
|
}
|
126
|
|
127
|
|
128
|
public void setContributor(AgentBase<?> contributor) {
|
129
|
this.contributor = contributor;
|
130
|
}
|
131
|
|
132
|
|
133
|
public String getAudience() {
|
134
|
return audience;
|
135
|
}
|
136
|
|
137
|
|
138
|
public void setAudience(String audience) {
|
139
|
this.audience = audience;
|
140
|
}
|
141
|
|
142
|
|
143
|
public Set<Rights> getLicense() {
|
144
|
return license;
|
145
|
}
|
146
|
|
147
|
|
148
|
public void setLicense(Set<Rights> license) {
|
149
|
this.license = license;
|
150
|
}
|
151
|
|
152
|
|
153
|
public AgentBase<?> getRightsHolder() {
|
154
|
return rightsHolder;
|
155
|
}
|
156
|
|
157
|
|
158
|
public void setRightsHolder(AgentBase<?> rightsHolder) {
|
159
|
this.rightsHolder = rightsHolder;
|
160
|
}
|
161
|
|
162
|
|
163
|
|
164
|
}
|