Project

General

Profile

Download (26.3 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.jaxb;
2

    
3
import java.util.ArrayList;
4
import java.util.Collection;
5
import java.util.HashSet;
6
import java.util.List;
7
import java.util.Set;
8

    
9
import javax.xml.bind.annotation.XmlAccessType;
10
import javax.xml.bind.annotation.XmlAccessorType;
11
import javax.xml.bind.annotation.XmlElement;
12
import javax.xml.bind.annotation.XmlElementWrapper;
13
import javax.xml.bind.annotation.XmlElements;
14
import javax.xml.bind.annotation.XmlRootElement;
15
import javax.xml.bind.annotation.XmlType;
16

    
17
import eu.etaxonomy.cdm.model.agent.Address;
18
import eu.etaxonomy.cdm.model.agent.Agent;
19
import eu.etaxonomy.cdm.model.agent.Contact;
20
import eu.etaxonomy.cdm.model.agent.Institution;
21
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
22
import eu.etaxonomy.cdm.model.agent.Person;
23
import eu.etaxonomy.cdm.model.agent.Team;
24
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
25
import eu.etaxonomy.cdm.model.common.Keyword;
26
import eu.etaxonomy.cdm.model.common.Language;
27
import eu.etaxonomy.cdm.model.common.MarkerType;
28
import eu.etaxonomy.cdm.model.common.MultilanguageText;
29
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
30
import eu.etaxonomy.cdm.model.common.RelationshipBase;
31
import eu.etaxonomy.cdm.model.common.TermBase;
32
import eu.etaxonomy.cdm.model.common.TermVocabulary;
33
import eu.etaxonomy.cdm.model.common.VersionableEntity;
34
import eu.etaxonomy.cdm.model.description.Feature;
35
import eu.etaxonomy.cdm.model.description.FeatureNode;
36
import eu.etaxonomy.cdm.model.description.FeatureTree;
37
import eu.etaxonomy.cdm.model.location.Continent;
38
import eu.etaxonomy.cdm.model.location.NamedArea;
39
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
40
import eu.etaxonomy.cdm.model.location.NamedAreaType;
41
import eu.etaxonomy.cdm.model.location.TdwgArea;
42
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;
43
import eu.etaxonomy.cdm.model.media.Media;
44
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
45
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
46
import eu.etaxonomy.cdm.model.molecular.DnaSample;
47
import eu.etaxonomy.cdm.model.name.BotanicalName;
48
import eu.etaxonomy.cdm.model.name.CultivarPlantName;
49
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
50
import eu.etaxonomy.cdm.model.name.HybridRelationship;
51
import eu.etaxonomy.cdm.model.name.HybridRelationshipType;
52
import eu.etaxonomy.cdm.model.name.NameRelationship;
53
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
54
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
55
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
56
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
57
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
58
import eu.etaxonomy.cdm.model.name.Rank;
59
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
60
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
61
import eu.etaxonomy.cdm.model.name.TypeDesignationStatus;
62
import eu.etaxonomy.cdm.model.name.ZoologicalName;
63
import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
64
import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
65
import eu.etaxonomy.cdm.model.occurrence.Fossil;
66
import eu.etaxonomy.cdm.model.occurrence.LivingBeing;
67
import eu.etaxonomy.cdm.model.occurrence.Observation;
68
import eu.etaxonomy.cdm.model.occurrence.Specimen;
69
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
70
import eu.etaxonomy.cdm.model.reference.Article;
71
import eu.etaxonomy.cdm.model.reference.Book;
72
import eu.etaxonomy.cdm.model.reference.BookSection;
73
import eu.etaxonomy.cdm.model.reference.CdDvd;
74
import eu.etaxonomy.cdm.model.reference.Database;
75
import eu.etaxonomy.cdm.model.reference.Generic;
76
import eu.etaxonomy.cdm.model.reference.InProceedings;
77
import eu.etaxonomy.cdm.model.reference.Journal;
78
import eu.etaxonomy.cdm.model.reference.Map;
79
import eu.etaxonomy.cdm.model.reference.Patent;
80
import eu.etaxonomy.cdm.model.reference.PersonalCommunication;
81
import eu.etaxonomy.cdm.model.reference.PrintSeries;
82
import eu.etaxonomy.cdm.model.reference.Proceedings;
83
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
84
import eu.etaxonomy.cdm.model.reference.Report;
85
import eu.etaxonomy.cdm.model.reference.Thesis;
86
import eu.etaxonomy.cdm.model.reference.WebPage;
87
import eu.etaxonomy.cdm.model.taxon.Synonym;
88
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
89
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
90
import eu.etaxonomy.cdm.model.taxon.Taxon;
91
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
92
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
93
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
94

    
95
@XmlAccessorType(XmlAccessType.FIELD)
96
@XmlType(name = "", propOrder = {
97
	    "terms",
98
	    "termVocabularies",
99
		"agents",
100
		"agentData",
101
		"occurrences",
102
	    "references",
103
	    "referencedEntities",
104
	    "featureData",
105
	    "taxonomicNames",
106
	    "taxa",
107
	    "synonyms",
108
	    "relationships",
109
	    "media",
110
	    "homotypicalGroups"
111
})
112
@XmlRootElement(name = "DataSet", namespace = "http://etaxonomy.eu/cdm/model/1.0")
113
public class DataSet {
114

    
115
    // Some fields are of type List and some are of type Set. 
116
	// This is mainly because
117
	// the service classes return lists, i.e.
118
    // TaxonServiceImpl.getRootTaxa() returns List<Taxon>
119
	// and the Taxon methods return sets, i.e.
120
    // Taxon.getTaxonomicChildren() returns Set<Taxon>.
121

    
122
    @XmlElementWrapper(name = "Agents")
123
    @XmlElements({
124
        @XmlElement(name = "Team", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Team.class),
125
        @XmlElement(name = "Institution", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Institution.class),
126
        @XmlElement(name = "Person", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Person.class)
127
    })
128
    protected List<Agent> agents;
129
    
130
    @XmlElementWrapper(name = "AgentData")
131
    @XmlElements({
132
    @XmlElement(name = "Address", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Address.class),
133
    @XmlElement(name = "Contact", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Contact.class),
134
    @XmlElement(name = "InstitutionalMembership", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = InstitutionalMembership.class)
135
    })
136
    protected List<VersionableEntity> agentData;
137

    
138
    @XmlElementWrapper(name = "FeatureData")
139
    @XmlElements({
140
    @XmlElement(name = "FeatureNode", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureNode.class),
141
    @XmlElement(name = "FeatureTree", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureTree.class)
142
    })
143
    protected List<VersionableEntity> featureData;
144

    
145
    @XmlElementWrapper(name = "Terms")
146
    @XmlElements({
147
    	@XmlElement(name = "Continent", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = Continent.class),
148
    	@XmlElement(name = "DerivationEventType", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DerivationEventType.class),
149
    	@XmlElement(name = "Feature", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Feature.class),
150
    	@XmlElement(name = "HybridRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationshipType.class),
151
        @XmlElement(name = "Keyword", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Keyword.class),
152
    	@XmlElement(name = "Language", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Language.class),
153
    	@XmlElement(name = "MarkerType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = MarkerType.class),
154
    	@XmlElement(name = "NamedArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedArea.class),
155
    	@XmlElement(name = "NamedAreaLevel", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaLevel.class),
156
    	@XmlElement(name = "NamedAreaType", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaType.class),
157
    	@XmlElement(name = "NameRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationshipType.class),
158
    	@XmlElement(name = "NomenclaturalCode", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalCode.class),
159
    	@XmlElement(name = "NomenclaturalStatusType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatusType.class),
160
        @XmlElement(name = "Rank", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = Rank.class),
161
    	@XmlElement(name = "SynonymRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = SynonymRelationshipType.class),
162
    	@XmlElement(name = "TaxonRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationshipType.class),
163
    	@XmlElement(name = "TdwgArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = TdwgArea.class),
164
    	@XmlElement(name = "TypeDesignationStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = TypeDesignationStatus.class),
165
    	@XmlElement(name = "WaterbodyOrCountry", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = WaterbodyOrCountry.class)
166
    })
167
    protected List<DefinedTermBase> terms;
168

    
169
    @XmlElementWrapper(name = "TermVocabularies")
170
    @XmlElement(name = "TermVocabulary", namespace = "http://etaxonomy.eu/cdm/model/common/1.0")
171
    protected List<TermVocabulary> termVocabularies;
172

    
173
    @XmlElementWrapper(name = "Occurrences")
174
    @XmlElements({
175
    	@XmlElement(name = "DnaSample", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DnaSample.class),
176
    	@XmlElement(name = "FieldObservation", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = FieldObservation.class),
177
    	@XmlElement(name = "Fossil", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Fossil.class),
178
    	@XmlElement(name = "LivingBeing", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = LivingBeing.class),
179
    	@XmlElement(name = "Observation", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Observation.class),
180
    	@XmlElement(name = "Specimen", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Specimen.class)
181
    })
182
    protected List<SpecimenOrObservationBase> occurrences;
183
    
184
    @XmlElementWrapper(name = "References")
185
    @XmlElements({
186
    	@XmlElement(name = "Article", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Article.class),
187
    	@XmlElement(name = "Generic", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Generic.class),
188
    	@XmlElement(name = "Patent", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Patent.class),
189
    	@XmlElement(name = "PersonalCommunication", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = PersonalCommunication.class),
190
    	@XmlElement(name = "CdDvd", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = CdDvd.class),
191
    	@XmlElement(name = "Database", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Database.class),
192
    	@XmlElement(name = "Journal", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Journal.class),
193
    	@XmlElement(name = "Map", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Map.class),
194
    	@XmlElement(name = "Book", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Book.class),
195
    	@XmlElement(name = "Proceedings", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Proceedings.class),
196
    	@XmlElement(name = "PrintSeries", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = PrintSeries.class),
197
    	@XmlElement(name = "Report", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Report.class),
198
    	@XmlElement(name = "Thesis", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Thesis.class),
199
    	@XmlElement(name = "WebPage", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = WebPage.class),
200
    	@XmlElement(name = "BookSection", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = BookSection.class),
201
    	@XmlElement(name = "InProceedings", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = InProceedings.class)
202
    })
203
    protected List<ReferenceBase> references;
204

    
205
    @XmlElementWrapper(name = "ReferencedEntities")
206
    @XmlElements({
207
    	@XmlElement(name = "NomenclaturalStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatus.class),
208
    	@XmlElement(name = "NameTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameTypeDesignation.class),
209
    	@XmlElement(name = "SpecimenTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = SpecimenTypeDesignation.class)
210
    })
211
    protected List<ReferencedEntityBase> referencedEntities;
212

    
213
    	
214
    @XmlElementWrapper(name = "TaxonomicNames")
215
    @XmlElements({
216
    	@XmlElement(name = "ZoologicalName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = ZoologicalName.class),
217
    	@XmlElement(name = "CultivarPlantName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = CultivarPlantName.class),
218
    	@XmlElement(name = "BotanicalName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = BotanicalName.class)
219
    })
220
    protected List<TaxonNameBase> taxonomicNames;
221

    
222
    @XmlElementWrapper(name = "Taxa")
223
    @XmlElement(name = "Taxon", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
224
    protected List<Taxon> taxa;
225
	
226
    @XmlElementWrapper(name = "Synonyms")
227
    @XmlElement(name = "Synonym", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
228
    protected List<Synonym> synonyms;
229

    
230
    @XmlElementWrapper(name = "Relationships")
231
    @XmlElements({
232
    	@XmlElement(name = "TaxonRelationship", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationship.class),
233
    	@XmlElement(name = "SynonymRelationship", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = SynonymRelationship.class),
234
    	@XmlElement(name = "NameRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationship.class),
235
    	@XmlElement(name = "HybridRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationship.class)
236
    })
237
    protected Set<RelationshipBase> relationships;
238

    
239
    @XmlElementWrapper(name = "Media_")
240
    @XmlElement(name = "Media")
241
//    @XmlElements({
242
//    	@XmlElement(name = "Media", namespace = "http://etaxonomy.eu/cdm/model/media/1.0", type = Media.class),
243
//    	@XmlElement(name = "MediaRepresentation", namespace = "http://etaxonomy.eu/cdm/model/media/1.0", type = MediaRepresentation.class),
244
//    	@XmlElement(name = "MediaRepresentationPart", namespace = "http://etaxonomy.eu/cdm/model/media/1.0", type = MediaRepresentationPart.class),
245
//    })
246
    protected List<VersionableEntity> media;
247
    
248
    @XmlElementWrapper(name = "HomotypicalGroups")
249
    @XmlElement(name = "HomotypicalGroup", namespace = "http://etaxonomy.eu/cdm/model/name/1.0")
250
    protected Set<HomotypicalGroup> homotypicalGroups;
251

    
252
    public DataSet () {
253
    }
254

    
255
    /**
256
     * Gets the value of the agents property.
257
     * 
258
     * @return
259
     *     possible object is
260
     *     {@link List<Agent> }
261
     *     
262
     */
263
    public List<Agent> getAgents() {
264
        return agents;
265
    }
266

    
267
    /**
268
     * Sets the value of the agents property.
269
     * 
270
     * @param value
271
     *     allowed object is
272
     *     {@link List<Agent> }
273
     *     
274
     */
275
    public void setAgents(List<Agent> value) {
276
        this.agents = value;
277
    }
278

    
279
    /**
280
     * Gets the value of the agentData property.
281
     * 
282
     * @return
283
     *     possible object is
284
     *     {@link List<VersionableEntity> }
285
     *     
286
     */
287
    public List<VersionableEntity> getAgentData() {
288
        return agentData;
289
    }
290

    
291
    /**
292
     * Sets the value of the agentData property.
293
     * 
294
     * @param value
295
     *     allowed object is
296
     *     {@link List<VersionableEntity> }
297
     *     
298
     */
299
    public void setAgentData(List<VersionableEntity> value) {
300
        this.agentData = value;
301
    }
302

    
303
    /**
304
     * Gets the value of the terms property.
305
     * 
306
     * @return
307
     *     possible object is
308
     *     {@link List<TermBase> }
309
     *     
310
     */
311
    
312
    //public List<? extends TermBase> getTerms() {
313
    public List<DefinedTermBase> getTerms() {
314
        return terms;
315
    }
316

    
317
    /**
318
     * Sets the value of the terms property.
319
     * 
320
     * @param value
321
     *     allowed object is
322
     *     {@link List<TermBase> }
323
     *     
324
     */
325
    //public void setTerms(List<? extends TermBase> value) {
326
    public void setTerms(List<DefinedTermBase> value) {
327
        this.terms = value;
328
    }
329

    
330
    /**
331
     * Gets the value of the term vocabularies property.
332
     * 
333
     * @return
334
     *     possible object is
335
     *     {@link List<TermVocabulary> }
336
     *     
337
     */
338
    
339
    public List<TermVocabulary> getTermVocabularies() {
340
        return termVocabularies;
341
    }
342

    
343
    /**
344
     * Sets the value of the term vocabularies property.
345
     * 
346
     * @param value
347
     *     allowed object is
348
     *     {@link List<TermVocabulary> }
349
     *     
350
     */
351
    public void setTermVocabularies(List<TermVocabulary> value) {
352
        this.termVocabularies = value;
353
    }
354

    
355
    /**
356
     * Gets the value of the taxonomicNames property.
357
     * 
358
     * @return
359
     *     possible object is
360
     *     {@link List<axonNameBase> }
361
     *     
362
     */
363
    public List<TaxonNameBase> getTaxonomicNames() {
364
        return taxonomicNames;
365
    }
366

    
367
    /**
368
     * Sets the value of the taxonomicNames property.
369
     * 
370
     * @param value
371
     *     allowed object is
372
     *     {@link List<TaxonNameBase> }
373
     *     
374
     */
375
    public void setTaxonomicNames(List<TaxonNameBase> value) {
376
        this.taxonomicNames = value;
377
    }
378

    
379
    /**
380
     * Gets the value of the references property.
381
     * 
382
     * @return
383
     *     possible object is
384
     *     {@link List<SpecimenOrObservationBase> }
385
     *     
386
     */
387
    public List<SpecimenOrObservationBase> getOccurrences() {
388
        return occurrences;
389
    }
390

    
391
    /**
392
     * Sets the value of the references property.
393
     * 
394
     * @param value
395
     *     allowed object is
396
     *     {@link List<SpecimenOrObservationBase> }
397
     *     
398
     */
399
    public void setOccurrences(List<SpecimenOrObservationBase> value) {
400
        this.occurrences = value;
401
    }
402

    
403
    /**
404
     * Gets the value of the references property.
405
     * 
406
     * @return
407
     *     possible object is
408
     *     {@link List<ReferenceBase> }
409
     *     
410
     */
411
    public List<ReferenceBase> getReferences() {
412
        return references;
413
    }
414

    
415
    /**
416
     * Sets the value of the references property.
417
     * 
418
     * @param value
419
     *     allowed object is
420
     *     {@link List<ReferenceBase> }
421
     *     
422
     */
423
    public void setReferences(List<ReferenceBase> value) {
424
        this.references = value;
425
    }
426

    
427
    /**
428
     * Adds the referenced entities in value to the referenced entity property list.
429
     * 
430
     * @param value
431
     *     allowed object is
432
     *     {@link Collection<ReferencedEntityBase> }
433
     *     
434
     */
435
    public <T extends ReferencedEntityBase> void addReferencedEntities(Collection<T> value) {
436
    	for (T referencedEntity: value) {
437
    		this.referencedEntities.add(referencedEntity);
438
    	}
439
    }
440

    
441
    /**
442
     * Gets the value of the  property.
443
     * 
444
     * @return
445
     *     possible object is
446
     *     {@link List<ReferencedEntityBase> }
447
     *     
448
     */
449
    public List<ReferencedEntityBase> getReferencedEntities() {
450
        return referencedEntities;
451
    }
452

    
453
    /**
454
     * Sets the value of the referencedEntities property.
455
     * 
456
     * @param value
457
     *     allowed object is
458
     *     {@link List<ReferencedEntityBase> }
459
     *     
460
     */
461
    public void setReferencedEntities(List<? extends ReferencedEntityBase> value) {
462
        this.referencedEntities = new ArrayList<ReferencedEntityBase>();
463
        referencedEntities.addAll(value);
464
    }
465
    
466
    /**
467
     * Adds the features in value to the feature data property list.
468
     * 
469
     * @param value
470
     *     allowed object is
471
     *     {@link Collection<VersionableEntity> }
472
     *     
473
     */
474
    public <T extends VersionableEntity> void addFeatureData(Collection<T> value) {
475
    	for (T featureItem: value) {
476
    		this.featureData.add(featureItem);
477
    	}
478
    }
479

    
480
    /**
481
     * Gets the value of the feature data property.
482
     * 
483
     * @return
484
     *     possible object is
485
     *     {@link List<VersionableEntity> }
486
     *     
487
     */
488
    public List<VersionableEntity> getFeatureData() {
489
        return featureData;
490
    }
491

    
492
    /**
493
     * Sets the value of the feature data property.
494
     * 
495
     * @param value
496
     *     allowed object is
497
     *     {@link List<VersionableEntity> }
498
     *     
499
     */
500
    public void setFeatureData(List<? extends VersionableEntity> value) {
501
        this.featureData = new ArrayList<VersionableEntity>();
502
        featureData.addAll(value);
503
    }
504
    
505
    /**
506
     * Adds the taxa in value to the taxa property list.
507
     * 
508
     * @param value
509
     *     allowed object is
510
     *     {@link Collection<Taxon> }
511
     *     
512
     */
513
    public void addTaxa(Collection<Taxon> value) {
514
    	for (Taxon taxon: value) {
515
    		this.taxa.add(taxon);
516
    	}
517
    }
518

    
519
    /**
520
     * Gets the value of the taxa property.
521
     * 
522
     * @return
523
     *     possible object is
524
     *     {@link List<Taxon> }
525
     *     
526
     */
527
//    public List<Taxon> getTaxa() {
528
//        return taxa;
529
//    }
530

    
531
    /**
532
     * Gets the value of the taxa property as {@link Collection<TaxonBase> }
533
     * 
534
     * @return
535
     *     possible object is
536
     *     {@link Collection<TaxonBase> }
537
     *     
538
     */
539
    public Collection<? extends TaxonBase> getTaxa() {
540
    	
541
    	//TODO can be deleted when everything works
542
    	//Object obj = taxa;
543
    	//Collection<TaxonBase> taxonBases = (Collection<TaxonBase>)obj;
544
        List<Taxon> list = taxa;
545
    	return list;
546
    }
547

    
548
    public Collection<TaxonBase> getTaxonBases() {
549
    	
550
    	Collection<TaxonBase> result = new HashSet<TaxonBase>();;
551
    	if (taxa != null) {
552
        	result.addAll(taxa);
553
    	}
554
    	if (synonyms != null) {
555
        	result.addAll(synonyms);
556
    	}
557
        return result;
558
    }
559

    
560
    /**
561
     * Sets the value of the taxa property.
562
     * 
563
     * @param value
564
     *     allowed object is
565
     *     {@link List<Taxon> }
566
     *     
567
     */
568
    public void setTaxa(List<Taxon> value) {
569
        this.taxa = value;
570
    }
571

    
572
    /**
573
     * Adds the taxon in value to the taxa property list.
574
     * 
575
     * @param value
576
     *     
577
     */
578
    public void addTaxon(Taxon value) {
579
    		this.taxa.add(value);
580
    }
581

    
582

    
583
    /**
584
     * Gets the value of the synonyms property.
585
     * 
586
     * @return
587
     *     possible object is
588
     *     {@link List<Synonym> }
589
     *     
590
     */
591
    public List<Synonym> getSynonyms() {
592
        return synonyms;
593
    }
594

    
595
    /**
596
     * Sets the value of the synonyms property.
597
     * 
598
     * @param value
599
     *     allowed object is
600
     *     {@link List<Synonym> }
601
     *     
602
     */
603
    public void setSynonyms(List<Synonym> value) {
604
        this.synonyms = value;
605
    }
606
    
607
    /**
608
     * Adds the synonym in value to the taxa property list.
609
     * 
610
     * @param value
611
     *     
612
     */
613
    public void addSynonym(Synonym value) {
614
    		this.synonyms.add(value);
615
    }
616
    
617
    /**
618
     * Adds the synonym in value to the synonyms property list.
619
     * 
620
     * @param value
621
     *     allowed object is
622
     *     {@link Collection<Synonym> }
623
     *     
624
     */
625
    public void addSynonyms(Collection<Synonym> value) {
626
    	for (Synonym synonym: value) {
627
    		this.synonyms.add(synonym);
628
    	}
629
    }
630

    
631
    /**
632
     * Gets the value of the relationships property.
633
     * 
634
     * @return
635
     *     possible object is
636
     *     {@link Set<RelationshipBase> }
637
     *     
638
     */
639
    public Set<RelationshipBase> getRelationships() {
640
        return relationships;
641
    }
642

    
643
    /**
644
     * Sets the value of the relationships property.
645
     * 
646
     * @param value
647
     *     allowed object is
648
     *     {@link Set<RelationshipBase> }
649
     *     
650
     */
651
    public void setRelationships(Set<RelationshipBase> value) {
652
        this.relationships = value;
653
    }
654

    
655
    /**
656
     * Adds the relationship in value to the relationships property list.
657
     * 
658
     * @param value
659
     *     allowed object is
660
     *     {@link Collection<RelationshipBase> }
661
     *     
662
     */
663
    public void addRelationships(Collection<? extends RelationshipBase> value) {
664
    	for (RelationshipBase relationship: value) {
665
    		this.relationships.add(relationship);
666
    	}
667
    }
668

    
669
    /**
670
     * Adds the media in value to the media property list.
671
     * 
672
     * @param value
673
     *     allowed object is
674
     *     {@link Collection<VersionableEntity> }
675
     *     
676
     */
677
    public <T extends VersionableEntity> void addMedia(Collection<T> value) {
678
    	for (T medium: value) {
679
    		this.media.add(medium);
680
    	}
681
    }
682

    
683
    /**
684
     * Gets the value of the  property.
685
     * 
686
     * @return
687
     *     possible object is
688
     *     {@link List<ReferencedEntityBase> }
689
     *     
690
     */
691
    public List<VersionableEntity> getMedia() {
692
        return media;
693
    }
694

    
695
    /**
696
     * Sets the value of the referencedEntities property.
697
     * 
698
     * @param value
699
     *     allowed object is
700
     *     {@link List<ReferencedEntityBase> }
701
     *     
702
     */
703
    public void setMedia(List<? extends VersionableEntity> value) {
704
        this.media = new ArrayList<VersionableEntity>();
705
        media.addAll(value);
706
    }
707
    
708
    /**
709
     * Gets the value of the synonyms property.
710
     * 
711
     * @return
712
     *     possible object is
713
     *     {@link List<Synonym> }
714
     *     
715
     */
716
    public Set<HomotypicalGroup> getHomotypicalGroups() {
717
        return homotypicalGroups;
718
    }
719

    
720
    /**
721
     * Sets the value of the synonyms property.
722
     * 
723
     * @param value
724
     *     allowed object is
725
     *     {@link List<Synonym> }
726
     *     
727
     */
728
    public void setHomotypicalGroups(Set<HomotypicalGroup> value) {
729
        this.homotypicalGroups = value;
730
    }
731
    
732
}
(5-5/9)