1
|
/**
|
2
|
* Copyright (C) 2007 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.remote.dto.tdwg;
|
10
|
|
11
|
import java.net.URI;
|
12
|
import java.util.Set;
|
13
|
|
14
|
import javax.xml.bind.annotation.XmlAccessType;
|
15
|
import javax.xml.bind.annotation.XmlAccessorType;
|
16
|
import javax.xml.bind.annotation.XmlElement;
|
17
|
import javax.xml.bind.annotation.XmlType;
|
18
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
19
|
|
20
|
import org.joda.time.DateTime;
|
21
|
|
22
|
import eu.etaxonomy.cdm.jaxb.DateTimeAdapter;
|
23
|
import eu.etaxonomy.cdm.remote.dto.dc.Relation;
|
24
|
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.LinkType;
|
25
|
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.PublicationCitation;
|
26
|
|
27
|
@XmlAccessorType(XmlAccessType.FIELD)
|
28
|
@XmlType(name = "BaseThing", propOrder = {
|
29
|
"title",
|
30
|
"sameAs",
|
31
|
"identifier",
|
32
|
"created",
|
33
|
"creator",
|
34
|
"date",
|
35
|
"contributor",
|
36
|
"relation",
|
37
|
"abcdEquivalence",
|
38
|
"berlinModelEquivalence",
|
39
|
"darwinCoreEquivalence",
|
40
|
"deprecated",
|
41
|
"restricted",
|
42
|
"microReference",
|
43
|
"notes",
|
44
|
"publishedIn",
|
45
|
"taxonomicPlacementFormal",
|
46
|
"taxonomicPlacementInformal",
|
47
|
"tcsEquivalence",
|
48
|
"publishedInCitation"
|
49
|
})
|
50
|
public abstract class BaseThing {
|
51
|
|
52
|
@XmlElement(namespace = "http://purl.org/dc/elements/1.1/")
|
53
|
private String title;
|
54
|
|
55
|
@XmlElement(namespace = "http://www.w3.org/2002/07/owl#")
|
56
|
private String sameAs;
|
57
|
|
58
|
@XmlElement(namespace = "http://purl.org/dc/elements/1.1/")
|
59
|
private URI identifier;
|
60
|
|
61
|
@XmlElement(namespace = "http://purl.org/dc/terms/")
|
62
|
@XmlJavaTypeAdapter(DateTimeAdapter.class)
|
63
|
private DateTime created;
|
64
|
|
65
|
@XmlElement(namespace = "http://purl.org/dc/terms/")
|
66
|
@XmlJavaTypeAdapter(DateTimeAdapter.class)
|
67
|
private DateTime date;
|
68
|
|
69
|
@XmlElement(namespace = "http://purl.org/dc/elements/1.1/")
|
70
|
private String creator;
|
71
|
|
72
|
@XmlElement(namespace = "http://purl.org/dc/elements/1.1/")
|
73
|
private String contributor;
|
74
|
|
75
|
@XmlElement(name = "relation", namespace = "http://purl.org/dc/elements/1.1/")
|
76
|
private Relation relation;
|
77
|
|
78
|
@XmlElement
|
79
|
private String abcdEquivalence;
|
80
|
|
81
|
@XmlElement
|
82
|
private String berlinModelEquivalence;
|
83
|
|
84
|
@XmlElement
|
85
|
private String darwinCoreEquivalence;
|
86
|
|
87
|
@XmlElement(name = "isDeprecated")
|
88
|
private Boolean deprecated;
|
89
|
|
90
|
@XmlElement(name = "isRestricted")
|
91
|
private Boolean restricted;
|
92
|
|
93
|
@XmlElement
|
94
|
private String microReference;
|
95
|
|
96
|
@XmlElement
|
97
|
private Set<String> notes;
|
98
|
|
99
|
@XmlElement
|
100
|
private String publishedIn;
|
101
|
|
102
|
@XmlElement
|
103
|
private String taxonomicPlacementFormal;
|
104
|
|
105
|
@XmlElement
|
106
|
private String taxonomicPlacementInformal;
|
107
|
|
108
|
@XmlElement
|
109
|
private String tcsEquivalence;
|
110
|
|
111
|
@XmlElement(name = "publishedInCitation")
|
112
|
private PublishedInCitation publishedInCitation;
|
113
|
|
114
|
public DateTime getDate() {
|
115
|
return date;
|
116
|
}
|
117
|
|
118
|
public void setDate(DateTime date) {
|
119
|
this.date = date;
|
120
|
}
|
121
|
|
122
|
public String getCreator() {
|
123
|
return creator;
|
124
|
}
|
125
|
|
126
|
public void setCreator(String creator) {
|
127
|
this.creator = creator;
|
128
|
}
|
129
|
|
130
|
public String getContributor() {
|
131
|
return contributor;
|
132
|
}
|
133
|
|
134
|
public void setContributor(String contributor) {
|
135
|
this.contributor = contributor;
|
136
|
}
|
137
|
|
138
|
public String getAbcdEquivalence() {
|
139
|
return abcdEquivalence;
|
140
|
}
|
141
|
|
142
|
public String getBerlinModelEquivalence() {
|
143
|
return berlinModelEquivalence;
|
144
|
}
|
145
|
|
146
|
//dcterms:created
|
147
|
public DateTime getCreated() {
|
148
|
return created;
|
149
|
}
|
150
|
|
151
|
public String getDarwinCoreEquivalence() {
|
152
|
return darwinCoreEquivalence;
|
153
|
}
|
154
|
|
155
|
//dc:identifier
|
156
|
public URI getIdentifier() {
|
157
|
return identifier;
|
158
|
}
|
159
|
|
160
|
public String getMicroReference() {
|
161
|
return microReference;
|
162
|
}
|
163
|
|
164
|
public Set<String> getNotes() {
|
165
|
return notes;
|
166
|
}
|
167
|
|
168
|
public String getPublishedIn() {
|
169
|
return publishedIn;
|
170
|
}
|
171
|
|
172
|
//owl:sameAs
|
173
|
public String getSameAs() {
|
174
|
return sameAs;
|
175
|
}
|
176
|
|
177
|
public String getTaxonomicPlacementFormal() {
|
178
|
return taxonomicPlacementFormal;
|
179
|
}
|
180
|
|
181
|
public String getTaxonomicPlacementInformal() {
|
182
|
return taxonomicPlacementInformal;
|
183
|
}
|
184
|
|
185
|
public String getTcsEquivalence() {
|
186
|
return tcsEquivalence;
|
187
|
}
|
188
|
|
189
|
//dc:title
|
190
|
public String getTitle() {
|
191
|
return title;
|
192
|
}
|
193
|
|
194
|
public Boolean isDeprecated() {
|
195
|
return deprecated;
|
196
|
}
|
197
|
|
198
|
public Boolean isRestricted() {
|
199
|
return restricted;
|
200
|
}
|
201
|
|
202
|
public void setDeprecated(Boolean deprecated) {
|
203
|
this.deprecated = deprecated;
|
204
|
}
|
205
|
|
206
|
public void setIdentifier(URI identifier) {
|
207
|
this.identifier = identifier;
|
208
|
}
|
209
|
|
210
|
public void setMicroReference(String microReference) {
|
211
|
this.microReference = microReference;
|
212
|
}
|
213
|
|
214
|
public void setNotes(Set<String> notes) {
|
215
|
this.notes = notes;
|
216
|
}
|
217
|
|
218
|
public void setPublishedIn(String publishedIn) {
|
219
|
this.publishedIn = publishedIn;
|
220
|
}
|
221
|
|
222
|
public void setRestricted(Boolean restricted) {
|
223
|
this.restricted = restricted;
|
224
|
}
|
225
|
|
226
|
public void setSameAs(String sameAs) {
|
227
|
this.sameAs = sameAs;
|
228
|
}
|
229
|
|
230
|
public void setTaxonomicPlacementFormal(String taxonomicPlacementFormal) {
|
231
|
this.taxonomicPlacementFormal = taxonomicPlacementFormal;
|
232
|
}
|
233
|
|
234
|
public void setTaxonomicPlacementInformal(String taxonomicPlacementInformal) {
|
235
|
this.taxonomicPlacementInformal = taxonomicPlacementInformal;
|
236
|
}
|
237
|
|
238
|
public void setTcsEquivalence(String tcsEquivalence) {
|
239
|
this.tcsEquivalence = tcsEquivalence;
|
240
|
}
|
241
|
|
242
|
public void setTitle(String title) {
|
243
|
this.title = title;
|
244
|
}
|
245
|
|
246
|
public void setCreated(DateTime created) {
|
247
|
this.created = created;
|
248
|
}
|
249
|
|
250
|
public void setPublishedInCitation(PublicationCitation publicationCitation) {
|
251
|
this.publishedInCitation = new PublishedInCitation(publicationCitation, false);
|
252
|
}
|
253
|
|
254
|
public PublicationCitation getPublishedInCitation() {
|
255
|
return publishedInCitation != null ? publishedInCitation.getPublicationCitation() : null;
|
256
|
}
|
257
|
|
258
|
public void setPublishedInCitationRelation(PublicationCitation publicationCitation) {
|
259
|
this.publishedInCitation = new PublishedInCitation(publicationCitation, true);
|
260
|
}
|
261
|
|
262
|
public PublicationCitation getPublishedInCitationRelation() {
|
263
|
return publishedInCitation != null ? publishedInCitation.getPublicationCitation() : null;
|
264
|
}
|
265
|
|
266
|
public void setRelation(Relation relation) {
|
267
|
this.relation = relation;
|
268
|
}
|
269
|
|
270
|
public Relation getRelation() {
|
271
|
return relation;
|
272
|
}
|
273
|
|
274
|
@XmlAccessorType(XmlAccessType.FIELD)
|
275
|
@XmlType(name = "", propOrder = {
|
276
|
"publicationCitation"
|
277
|
})
|
278
|
public static class PublishedInCitation extends LinkType {
|
279
|
|
280
|
@XmlElement(name = "PublicationCitation", namespace = "http://rs.tdwg.org/ontology/voc/PublicationCitation#")
|
281
|
private PublicationCitation publicationCitation;
|
282
|
|
283
|
protected PublishedInCitation() {}
|
284
|
|
285
|
protected PublishedInCitation(PublicationCitation publicationCitation, boolean useRelation) {
|
286
|
if(useRelation) {
|
287
|
if(publicationCitation != null && publicationCitation.getIdentifier() != null) {
|
288
|
this.setResource(publicationCitation.getIdentifier());
|
289
|
} else {
|
290
|
this.publicationCitation = publicationCitation;
|
291
|
}
|
292
|
} else {
|
293
|
this.publicationCitation = publicationCitation;
|
294
|
}
|
295
|
}
|
296
|
|
297
|
protected void setPublicationCitation(PublicationCitation publicationCitation) {
|
298
|
this.publicationCitation = publicationCitation;
|
299
|
}
|
300
|
|
301
|
protected PublicationCitation getPublicationCitation() {
|
302
|
return publicationCitation;
|
303
|
}
|
304
|
|
305
|
}
|
306
|
}
|