Project

General

Profile

Download (30.4 KB) Statistics
| Branch: | Tag: | Revision:
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

    
10
package eu.etaxonomy.cdm.io.sdd;
11

    
12
import java.util.ArrayList;
13
import java.util.Collection;
14
import java.util.HashSet;
15
import java.util.List;
16
import java.util.Set;
17

    
18
import javassist.compiler.ast.Keyword;
19

    
20
import javax.xml.bind.annotation.XmlAccessType;
21
import javax.xml.bind.annotation.XmlAccessorType;
22
import javax.xml.bind.annotation.XmlElement;
23
import javax.xml.bind.annotation.XmlElementWrapper;
24
import javax.xml.bind.annotation.XmlElements;
25
import javax.xml.bind.annotation.XmlRootElement;
26
import javax.xml.bind.annotation.XmlType;
27

    
28
import eu.etaxonomy.cdm.model.agent.Address;
29
import eu.etaxonomy.cdm.model.agent.AgentBase;
30
import eu.etaxonomy.cdm.model.agent.Contact;
31
import eu.etaxonomy.cdm.model.agent.Institution;
32
import eu.etaxonomy.cdm.model.agent.InstitutionType;
33
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
34
import eu.etaxonomy.cdm.model.agent.Person;
35
import eu.etaxonomy.cdm.model.agent.Team;
36
import eu.etaxonomy.cdm.model.common.AnnotationType;
37
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
38
import eu.etaxonomy.cdm.model.common.ExtensionType;
39
import eu.etaxonomy.cdm.model.common.Language;
40
import eu.etaxonomy.cdm.model.common.LanguageString;
41
import eu.etaxonomy.cdm.model.common.LanguageStringBase;
42
import eu.etaxonomy.cdm.model.common.MarkerType;
43
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
44
import eu.etaxonomy.cdm.model.common.RelationshipBase;
45
import eu.etaxonomy.cdm.model.common.Representation;
46
import eu.etaxonomy.cdm.model.common.TermVocabulary;
47
import eu.etaxonomy.cdm.model.common.VersionableEntity;
48
import eu.etaxonomy.cdm.model.description.AbsenceTerm;
49
import eu.etaxonomy.cdm.model.description.Feature;
50
import eu.etaxonomy.cdm.model.description.FeatureNode;
51
import eu.etaxonomy.cdm.model.description.FeatureTree;
52
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
53
import eu.etaxonomy.cdm.model.description.Modifier;
54
import eu.etaxonomy.cdm.model.description.PresenceTerm;
55
import eu.etaxonomy.cdm.model.description.Scope;
56
import eu.etaxonomy.cdm.model.description.Sex;
57
import eu.etaxonomy.cdm.model.description.Stage;
58
import eu.etaxonomy.cdm.model.description.State;
59
import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
60
import eu.etaxonomy.cdm.model.description.TextFormat;
61
import eu.etaxonomy.cdm.model.location.Continent;
62
import eu.etaxonomy.cdm.model.location.NamedArea;
63
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
64
import eu.etaxonomy.cdm.model.location.NamedAreaType;
65
import eu.etaxonomy.cdm.model.location.ReferenceSystem;
66
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;
67
import eu.etaxonomy.cdm.model.media.RightsTerm;
68
import eu.etaxonomy.cdm.model.molecular.DnaSample;
69
import eu.etaxonomy.cdm.model.name.BacterialName;
70
import eu.etaxonomy.cdm.model.name.BotanicalName;
71
import eu.etaxonomy.cdm.model.name.CultivarPlantName;
72
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
73
import eu.etaxonomy.cdm.model.name.HybridRelationship;
74
import eu.etaxonomy.cdm.model.name.HybridRelationshipType;
75
import eu.etaxonomy.cdm.model.name.NameRelationship;
76
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
77
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
78
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
79
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
80
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
81
import eu.etaxonomy.cdm.model.name.Rank;
82
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
83
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
84
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
85
import eu.etaxonomy.cdm.model.name.ViralName;
86
import eu.etaxonomy.cdm.model.name.ZoologicalName;
87
import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
88
import eu.etaxonomy.cdm.model.occurrence.DeterminationModifier;
89
import eu.etaxonomy.cdm.model.occurrence.FieldObservation;
90
import eu.etaxonomy.cdm.model.occurrence.Fossil;
91
import eu.etaxonomy.cdm.model.occurrence.LivingBeing;
92
import eu.etaxonomy.cdm.model.occurrence.Observation;
93
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
94
import eu.etaxonomy.cdm.model.occurrence.Specimen;
95
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
96
/*import eu.etaxonomy.cdm.model.reference.Article;
97
import eu.etaxonomy.cdm.model.reference.Book;
98
import eu.etaxonomy.cdm.model.reference.BookSection;
99
import eu.etaxonomy.cdm.model.reference.CdDvd;
100
import eu.etaxonomy.cdm.model.reference.Database;
101
import eu.etaxonomy.cdm.model.reference.Generic;
102
import eu.etaxonomy.cdm.model.reference.InProceedings;
103
import eu.etaxonomy.cdm.model.reference.Journal;
104
import eu.etaxonomy.cdm.model.reference.Map;
105
import eu.etaxonomy.cdm.model.reference.Patent;
106
import eu.etaxonomy.cdm.model.reference.PersonalCommunication;
107
import eu.etaxonomy.cdm.model.reference.PrintSeries;
108
import eu.etaxonomy.cdm.model.reference.Proceedings;*/
109
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
110
/*import eu.etaxonomy.cdm.model.reference.Report;
111
import eu.etaxonomy.cdm.model.reference.Thesis;
112
import eu.etaxonomy.cdm.model.reference.WebPage;*/
113
import eu.etaxonomy.cdm.model.taxon.Synonym;
114
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
115
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
116
import eu.etaxonomy.cdm.model.taxon.Taxon;
117
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
118
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
119
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
120

    
121
/**
122
 * @author a.babadshanjan
123
 */
124
@XmlAccessorType(XmlAccessType.FIELD)
125
@XmlType(name = "", propOrder = {
126
	    "terms",
127
	    "termVocabularies",
128
		"agents",
129
		"agentData",
130
		"occurrences",
131
	    "references",
132
	    "referencedEntities",
133
	    "featureData",
134
	    "languageData",
135
	    "taxonomicNames",
136
	    "homotypicalGroups",
137
	    "taxa",
138
	    "synonyms",
139
	    "relationships",
140
	    "media"
141
})
142
@XmlRootElement(name = "DataSet", namespace = "http://etaxonomy.eu/cdm/model/1.0")
143
public class SDDDataSet {
144
	
145
    // Some fields are of type List and some are of type Set. 
146
	// This is mainly because
147
	// the service classes return lists, i.e.
148
    // TaxonServiceImpl.getRootTaxa() returns List<Taxon>
149
	// and the Taxon methods return sets, i.e.
150
    // Taxon.getTaxonomicChildren() returns Set<Taxon>.
151

    
152
    @XmlElementWrapper(name = "Agents")
153
    @XmlElements({
154
        @XmlElement(name = "Team", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Team.class),
155
        @XmlElement(name = "Institution", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Institution.class),
156
        @XmlElement(name = "Person", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Person.class)
157
    })
158
    protected List<? extends AgentBase> agents;
159
    
160
    @XmlElementWrapper(name = "AgentData")
161
    @XmlElements({
162
    @XmlElement(name = "Address", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Address.class),
163
    @XmlElement(name = "Contact", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Contact.class),
164
    @XmlElement(name = "InstitutionalMembership", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = InstitutionalMembership.class)
165
    })
166
    protected List<VersionableEntity> agentData;
167

    
168
    @XmlElementWrapper(name = "FeatureData")
169
    @XmlElements({
170
    @XmlElement(name = "FeatureNode", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureNode.class),
171
    @XmlElement(name = "FeatureTree", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureTree.class)
172
    })
173
//    protected List<VersionableEntity> featureData;
174
    protected List<VersionableEntity> featureData;
175

    
176
    @XmlElementWrapper(name = "LanguageData")
177
    @XmlElements({
178
    @XmlElement(name = "Representation", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Representation.class),
179
    @XmlElement(name = "LanguageString", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = LanguageString.class)
180
    })
181
    protected List<LanguageStringBase> languageData;
182
    
183
    @XmlElementWrapper(name = "Terms")
184
    @XmlElements({
185
    	@XmlElement(name = "AbsenceTerm", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = AbsenceTerm.class),
186
    	@XmlElement(name = "AnnotationType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = AnnotationType.class),
187
    	@XmlElement(name = "Continent", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = Continent.class),
188
    	@XmlElement(name = "DerivationEventType", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DerivationEventType.class),
189
    	@XmlElement(name = "DeterminationModifier", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DeterminationModifier.class),
190
    	@XmlElement(name = "ExtensionType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = ExtensionType.class),
191
    	@XmlElement(name = "Feature", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Feature.class),
192
    	@XmlElement(name = "HybridRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationshipType.class),
193
    	@XmlElement(name = "InstitutionType", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = InstitutionType.class),
194
    	@XmlElement(name = "Language", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Language.class),
195
    	@XmlElement(name = "MarkerType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = MarkerType.class),
196
    	@XmlElement(name = "MeasurementUnit", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = MeasurementUnit.class),
197
    	@XmlElement(name = "Modifier", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Modifier.class),
198
    	@XmlElement(name = "NamedArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedArea.class),
199
    	@XmlElement(name = "NamedAreaLevel", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaLevel.class),
200
    	@XmlElement(name = "NamedAreaType", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaType.class),
201
    	@XmlElement(name = "NameRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationshipType.class),
202
    	@XmlElement(name = "NomenclaturalCode", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalCode.class),
203
    	@XmlElement(name = "NomenclaturalStatusType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatusType.class),
204
    	@XmlElement(name = "PresenceTerm", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = PresenceTerm.class),
205
    	@XmlElement(name = "PreservationMethod", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = PreservationMethod.class),
206
        @XmlElement(name = "Rank", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = Rank.class),
207
    	@XmlElement(name = "ReferenceSystem", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = ReferenceSystem.class),
208
    	@XmlElement(name = "RightsTerm", namespace = "http://etaxonomy.eu/cdm/model/media/1.0", type = RightsTerm.class),
209
    	@XmlElement(name = "Scope", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Scope.class),
210
    	@XmlElement(name = "Sex", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Sex.class),
211
    	@XmlElement(name = "Stage", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Stage.class),
212
    	@XmlElement(name = "State", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = State.class),
213
    	@XmlElement(name = "StatisticalMeasure", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = StatisticalMeasure.class),
214
    	@XmlElement(name = "SynonymRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = SynonymRelationshipType.class),
215
    	@XmlElement(name = "TaxonRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationshipType.class),
216
    	@XmlElement(name = "TextFormat", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = TextFormat.class),
217
    	@XmlElement(name = "TypeDesignationStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = SpecimenTypeDesignationStatus.class),
218
    	@XmlElement(name = "WaterbodyOrCountry", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = WaterbodyOrCountry.class)
219
    })
220
    protected List<DefinedTermBase> terms;
221

    
222
    @XmlElementWrapper(name = "TermVocabularies")
223
    @XmlElement(name = "TermVocabulary", namespace = "http://etaxonomy.eu/cdm/model/common/1.0")
224
    protected List<TermVocabulary<DefinedTermBase>> termVocabularies;
225

    
226
    @XmlElementWrapper(name = "Occurrences")
227
    @XmlElements({
228
    	@XmlElement(name = "DnaSample", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DnaSample.class),
229
    	@XmlElement(name = "FieldObservation", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = FieldObservation.class),
230
    	@XmlElement(name = "Fossil", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Fossil.class),
231
    	@XmlElement(name = "LivingBeing", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = LivingBeing.class),
232
    	@XmlElement(name = "Observation", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Observation.class),
233
    	@XmlElement(name = "Specimen", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = Specimen.class)
234
    })
235
    protected List<SpecimenOrObservationBase> occurrences;
236
    
237
    @XmlElementWrapper(name = "References")
238
   	@XmlElement(name = "Reference", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = ReferenceBase.class)
239

    
240
    protected List<ReferenceBase> references;
241

    
242
    @XmlElementWrapper(name = "ReferencedEntities")
243
    @XmlElements({
244
    	@XmlElement(name = "NomenclaturalStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatus.class),
245
    	@XmlElement(name = "NameTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameTypeDesignation.class),
246
    	@XmlElement(name = "SpecimenTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = SpecimenTypeDesignation.class)
247
    })
248
    protected List<ReferencedEntityBase> referencedEntities;
249

    
250
    	
251
    @XmlElementWrapper(name = "TaxonomicNames")
252
    @XmlElements({
253
    	@XmlElement(name = "BacterialName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = BacterialName.class),
254
    	@XmlElement(name = "BotanicalName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = BotanicalName.class),
255
    	@XmlElement(name = "CultivarPlantName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = CultivarPlantName.class),
256
    	@XmlElement(name = "ViralName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = ViralName.class),
257
    	@XmlElement(name = "ZoologicalName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = ZoologicalName.class)
258
    })
259
    protected List<TaxonNameBase> taxonomicNames;
260

    
261
    @XmlElementWrapper(name = "Taxa")
262
    @XmlElement(name = "Taxon", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
263
    protected List<Taxon> taxa;
264
	
265
    @XmlElementWrapper(name = "Synonyms")
266
    @XmlElement(name = "Synonym", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
267
    protected List<Synonym> synonyms;
268

    
269
    @XmlElementWrapper(name = "Relationships")
270
    @XmlElements({
271
    	@XmlElement(name = "TaxonRelationship", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationship.class),
272
    	@XmlElement(name = "SynonymRelationship", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = SynonymRelationship.class),
273
    	@XmlElement(name = "NameRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationship.class),
274
    	@XmlElement(name = "HybridRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationship.class)
275
    })
276
    protected Set<RelationshipBase> relationships;
277

    
278
    @XmlElementWrapper(name = "Media_")
279
    @XmlElement(name = "Media", namespace = "http://etaxonomy.eu/cdm/model/media/1.0")
280
    protected List<VersionableEntity> media;
281
    
282
    @XmlElementWrapper(name = "HomotypicalGroups")
283
    @XmlElement(name = "HomotypicalGroup", namespace = "http://etaxonomy.eu/cdm/model/name/1.0")
284
    protected List<HomotypicalGroup> homotypicalGroups;
285

    
286
//	@XmlElement(name = "TdwgArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = TdwgArea.class),
287

    
288
	public SDDDataSet () {
289
		
290
		agents = new ArrayList<AgentBase>(); 
291
		agentData = new ArrayList<VersionableEntity>();
292
//		featureData = new ArrayList<VersionableEntity>();
293
		featureData = new ArrayList<VersionableEntity>();
294
		languageData = new ArrayList<LanguageStringBase>();
295
		terms = new ArrayList<DefinedTermBase>();
296
		termVocabularies = new ArrayList<TermVocabulary<DefinedTermBase>>();
297
		occurrences = new ArrayList<SpecimenOrObservationBase>();
298
		references = new ArrayList<ReferenceBase>();
299
		referencedEntities = new ArrayList<ReferencedEntityBase>();
300
		taxonomicNames = new ArrayList<TaxonNameBase>();
301
		taxa = new ArrayList<Taxon>();
302
		synonyms = new ArrayList<Synonym>();
303
		relationships = new HashSet<RelationshipBase>();
304
		media = new ArrayList<VersionableEntity>();
305
		homotypicalGroups = new ArrayList<HomotypicalGroup>();
306
	}
307

    
308
    /**
309
     * Gets the value of the agents property.
310
     * 
311
     * @return
312
     *     possible object is
313
     *     {@link List<Agent> }
314
     *     
315
     */
316
    public List<? extends AgentBase> getAgents() {
317
        return agents;
318
    }
319

    
320
    /**
321
     * Sets the value of the agents property.
322
     * 
323
     * @param value
324
     *     allowed object is
325
     *     {@link List<Agent> }
326
     *     
327
     */
328
    public void setAgents(List<? extends AgentBase> value) {
329
        this.agents = value;
330
    }
331

    
332
    /**
333
     * Gets the value of the agentData property.
334
     * 
335
     * @return
336
     *     possible object is
337
     *     {@link List<VersionableEntity> }
338
     *     
339
     */
340
    public List<VersionableEntity> getAgentData() {
341
        return agentData;
342
    }
343

    
344
    /**
345
     * Sets the value of the agentData property.
346
     * 
347
     * @param value
348
     *     allowed object is
349
     *     {@link List<VersionableEntity> }
350
     *     
351
     */
352
    public void setAgentData(List<VersionableEntity> value) {
353
        this.agentData = value;
354
    }
355

    
356
    /**
357
     * Gets the value of the terms property.
358
     * 
359
     * @return
360
     *     possible object is
361
     *     {@link List<TermBase> }
362
     *     
363
     */
364
    
365
    //public List<? extends TermBase> getTerms() {
366
    public List<DefinedTermBase> getTerms() {
367
        return terms;
368
    }
369

    
370
    /**
371
     * Sets the value of the terms property.
372
     * 
373
     * @param value
374
     *     allowed object is
375
     *     {@link List<TermBase> }
376
     *     
377
     */
378
    //public void setTerms(List<? extends TermBase> value) {
379
    public void setTerms(List<DefinedTermBase> value) {
380
        this.terms = value;
381
    }
382

    
383
    /**
384
     * Gets the value of the term vocabularies property.
385
     * 
386
     * @return
387
     *     possible object is
388
     *     {@link List<TermVocabulary> }
389
     *     
390
     */
391
    
392
    public List<TermVocabulary<DefinedTermBase>> getTermVocabularies() {
393
        return termVocabularies;
394
    }
395

    
396
    /**
397
     * Sets the value of the term vocabularies property.
398
     * 
399
     * @param value
400
     *     allowed object is
401
     *     {@link List<TermVocabulary> }
402
     *     
403
     */
404
    public void setTermVocabularies(List<TermVocabulary<DefinedTermBase>> value) {
405
        this.termVocabularies = value;
406
    }
407

    
408
    /**
409
     * Gets the value of the taxonomicNames property.
410
     * 
411
     * @return
412
     *     possible object is
413
     *     {@link List<axonNameBase> }
414
     *     
415
     */
416
    public List<TaxonNameBase> getTaxonomicNames() {
417
        return taxonomicNames;
418
    }
419

    
420
    /**
421
     * Sets the value of the taxonomicNames property.
422
     * 
423
     * @param value
424
     *     allowed object is
425
     *     {@link List<TaxonNameBase> }
426
     *     
427
     */
428
    public void setTaxonomicNames(List<TaxonNameBase> value) {
429
        this.taxonomicNames = value;
430
    }
431

    
432
    /**
433
     * Gets the value of the references property.
434
     * 
435
     * @return
436
     *     possible object is
437
     *     {@link List<SpecimenOrObservationBase> }
438
     *     
439
     */
440
    public List<SpecimenOrObservationBase> getOccurrences() {
441
        return occurrences;
442
    }
443

    
444
    /**
445
     * Sets the value of the references property.
446
     * 
447
     * @param value
448
     *     allowed object is
449
     *     {@link List<SpecimenOrObservationBase> }
450
     *     
451
     */
452
    public void setOccurrences(List<SpecimenOrObservationBase> value) {
453
        this.occurrences = value;
454
    }
455

    
456
    /**
457
     * Gets the value of the references property.
458
     * 
459
     * @return
460
     *     possible object is
461
     *     {@link List<ReferenceBase> }
462
     *     
463
     */
464
    public List<ReferenceBase> getReferences() {
465
        return references;
466
    }
467

    
468
    /**
469
     * Sets the value of the references property.
470
     * 
471
     * @param value
472
     *     allowed object is
473
     *     {@link List<ReferenceBase> }
474
     *     
475
     */
476
    public void setReferences(List<ReferenceBase> value) {
477
        this.references = value;
478
    }
479

    
480
    /**
481
     * Adds the referenced entities in value to the referenced entity property list.
482
     * 
483
     * @param value
484
     *     allowed object is
485
     *     {@link Collection<ReferencedEntityBase> }
486
     *     
487
     */
488
    public <T extends ReferencedEntityBase> void addReferencedEntities(Collection<T> value) {
489
    	for (T referencedEntity: value) {
490
    		this.referencedEntities.add(referencedEntity);
491
    	}
492
    }
493

    
494
    /**
495
     * Gets the value of the  property.
496
     * 
497
     * @return
498
     *     possible object is
499
     *     {@link List<ReferencedEntityBase> }
500
     *     
501
     */
502
    public List<ReferencedEntityBase> getReferencedEntities() {
503
        return referencedEntities;
504
    }
505

    
506
    /**
507
     * Sets the value of the referencedEntities property.
508
     * 
509
     * @param value
510
     *     allowed object is
511
     *     {@link List<ReferencedEntityBase> }
512
     *     
513
     */
514
    public void setReferencedEntities(List<? extends ReferencedEntityBase> value) {
515
        this.referencedEntities = new ArrayList<ReferencedEntityBase>();
516
        referencedEntities.addAll(value);
517
    }
518
    
519
    /**
520
     * Adds the features in value to the feature data property list.
521
     * 
522
     * @param value
523
     *     allowed object is
524
     *     {@link Collection<VersionableEntity> }
525
     *     
526
     */
527
    public <T extends VersionableEntity> void addFeatureData(Collection<T> value) {
528
    	for (T featureItem: value) {
529
    		this.featureData.add(featureItem);
530
    	}
531
    }
532

    
533
    /**
534
     * Gets the value of the feature data property.
535
     * 
536
     * @return
537
     *     possible object is
538
     *     {@link List<VersionableEntity> }
539
     *     
540
     */
541
//    public List<VersionableEntity> getFeatureData() {
542
    public List<VersionableEntity> getFeatureData() {
543
        return featureData;
544
    }
545

    
546
    /**
547
     * Sets the value of the feature data property.
548
     * 
549
     * @param value
550
     *     allowed object is
551
     *     {@link List<VersionableEntity> }
552
     *     
553
     */
554
    public <T extends VersionableEntity> void setFeatureData(List<T> value) {
555
        featureData = new ArrayList<VersionableEntity>();
556
    	for (T featureItem: value) {
557
    		this.featureData.add(featureItem);
558
    	}
559
    }
560

    
561
//    public void setFeatureData(List<? extends VersionableEntity> value) {
562
    //public void setFeatureData(List<? extends VersionableEntity<?>> value) {
563
//        this.featureData = new ArrayList<VersionableEntity>();
564
    //    this.featureData = new ArrayList<VersionableEntity<?>>();
565
    //    featureData.addAll(value);
566
    //}
567
    
568
    /**
569
     * Adds the features in value to the language data property list.
570
     * 
571
     * @param value
572
     *     allowed object is
573
     *     {@link Collection<LanguageStringBase> }
574
     *     
575
     */
576
    public <T extends LanguageStringBase> void addLanguageData(Collection<T> value) {
577
    	for (T languageItem: value) {
578
    		this.languageData.add(languageItem);
579
    	}
580
    }
581

    
582
    /**
583
     * Gets the value of the language data property.
584
     * 
585
     * @return
586
     *     possible object is
587
     *     {@link List<LanguageStringBase> }
588
     *     
589
     */
590
    public List<LanguageStringBase> getLanguageData() {
591
        return languageData;
592
    }
593

    
594
    /**
595
     * Sets the value of the feature data property.
596
     * 
597
     * @param value
598
     *     allowed object is
599
     *     {@link List<LanguageStringBase> }
600
     *     
601
     */
602
    public void setLanguageData(List<? extends LanguageStringBase> value) {
603
        this.languageData = new ArrayList<LanguageStringBase>();
604
        languageData.addAll(value);
605
    }
606
    
607
    /**
608
     * Adds the taxa in value to the taxa property list.
609
     * 
610
     * @param value
611
     *     allowed object is
612
     *     {@link Collection<Taxon> }
613
     *     
614
     */
615
    public void addTaxa(Collection<Taxon> value) {
616
    	for (Taxon taxon: value) {
617
    		this.taxa.add(taxon);
618
    	}
619
    }
620

    
621
    /**
622
     * Gets the value of the taxa property.
623
     * 
624
     * @return
625
     *     possible object is
626
     *     {@link List<Taxon> }
627
     *     
628
     */
629
//    public List<Taxon> getTaxa() {
630
//        return taxa;
631
//    }
632

    
633
    /**
634
     * Gets the value of the taxa property as {@link Collection<TaxonBase> }
635
     * 
636
     * @return
637
     *     possible object is
638
     *     {@link Collection<TaxonBase> }
639
     *     
640
     */
641
    public Collection<? extends TaxonBase> getTaxa() {
642
    	
643
    	//TODO can be deleted when everything works
644
    	//Object obj = taxa;
645
    	//Collection<TaxonBase> taxonBases = (Collection<TaxonBase>)obj;
646
        List<Taxon> list = taxa;
647
    	return list;
648
    }
649

    
650
    public Collection<TaxonBase> getTaxonBases() {
651
    	
652
    	Collection<TaxonBase> result = new HashSet<TaxonBase>();;
653
    	if (taxa != null) {
654
        	result.addAll(taxa);
655
    	}
656
    	if (synonyms != null) {
657
        	result.addAll(synonyms);
658
    	}
659
        return result;
660
    }
661

    
662
    /**
663
     * Sets the value of the taxa property.
664
     * 
665
     * @param value
666
     *     allowed object is
667
     *     {@link List<Taxon> }
668
     *     
669
     */
670
    public void setTaxa(List<Taxon> value) {
671
        this.taxa = value;
672
    }
673

    
674
    /**
675
     * Adds the taxon in value to the taxa property list.
676
     * 
677
     * @param value
678
     *     
679
     */
680
    public void addTaxon(Taxon value) {
681
    		this.taxa.add(value);
682
    }
683

    
684

    
685
    /**
686
     * Gets the value of the synonyms property.
687
     * 
688
     * @return
689
     *     possible object is
690
     *     {@link List<Synonym> }
691
     *     
692
     */
693
    public List<Synonym> getSynonyms() {
694
        return synonyms;
695
    }
696

    
697
    /**
698
     * Sets the value of the synonyms property.
699
     * 
700
     * @param value
701
     *     allowed object is
702
     *     {@link List<Synonym> }
703
     *     
704
     */
705
    public void setSynonyms(List<Synonym> value) {
706
        this.synonyms = value;
707
    }
708
    
709
    /**
710
     * Adds the synonym in value to the taxa property list.
711
     * 
712
     * @param value
713
     *     
714
     */
715
    public void addSynonym(Synonym value) {
716
    		this.synonyms.add(value);
717
    }
718
    
719
    /**
720
     * Adds the synonym in value to the synonyms property list.
721
     * 
722
     * @param value
723
     *     allowed object is
724
     *     {@link Collection<Synonym> }
725
     *     
726
     */
727
    public void addSynonyms(Collection<Synonym> value) {
728
    	for (Synonym synonym: value) {
729
    		this.synonyms.add(synonym);
730
    	}
731
    }
732

    
733
    /**
734
     * Gets the value of the relationships property.
735
     * 
736
     * @return
737
     *     possible object is
738
     *     {@link Set<RelationshipBase> }
739
     *     
740
     */
741
    public Set<RelationshipBase> getRelationships() {
742
        return relationships;
743
    }
744

    
745
    /**
746
     * Sets the value of the relationships property.
747
     * 
748
     * @param value
749
     *     allowed object is
750
     *     {@link Set<RelationshipBase> }
751
     *     
752
     */
753
    public void setRelationships(Set<RelationshipBase> value) {
754
        this.relationships = value;
755
    }
756

    
757
    /**
758
     * Adds the relationship in value to the relationships property list.
759
     * 
760
     * @param value
761
     *     allowed object is
762
     *     {@link Collection<RelationshipBase> }
763
     *     
764
     */
765
    public void addRelationships(Collection<? extends RelationshipBase> value) {
766
    	for (RelationshipBase relationship: value) {
767
    		this.relationships.add(relationship);
768
    	}
769
    }
770

    
771
    /**
772
     * Adds the media in value to the media property list.
773
     * 
774
     * @param value
775
     *     allowed object is
776
     *     {@link Collection<VersionableEntity> }
777
     *     
778
     */
779
    public <T extends VersionableEntity> void addMedia(Collection<T> value) {
780
    	for (T medium: value) {
781
    		this.media.add(medium);
782
    	}
783
    }
784

    
785
    /**
786
     * Gets the value of the  property.
787
     * 
788
     * @return
789
     *     possible object is
790
     *     {@link List<ReferencedEntityBase> }
791
     *     
792
     */
793
    public List<VersionableEntity> getMedia() {
794
        return media;
795
    }
796

    
797
    /**
798
     * Sets the value of the referencedEntities property.
799
     * 
800
     * @param value
801
     *     allowed object is
802
     *     {@link List<ReferencedEntityBase> }
803
     *     
804
     */
805
    public void setMedia(List<? extends VersionableEntity> value) {
806
        this.media = new ArrayList<VersionableEntity>();
807
        media.addAll(value);
808
    }
809
    
810
    /**
811
     * Gets the value of the synonyms property.
812
     * 
813
     * @return
814
     *     possible object is
815
     *     {@link List<Synonym> }
816
     *     
817
     */
818
    public List<HomotypicalGroup> getHomotypicalGroups() {
819
        return homotypicalGroups;
820
    }
821

    
822
    /**
823
     * Sets the value of the synonyms property.
824
     * 
825
     * @param value
826
     *     allowed object is
827
     *     {@link List<Synonym> }
828
     *     
829
     */
830
    public void setHomotypicalGroups(List<HomotypicalGroup> value) {
831
        this.homotypicalGroups = value;
832
    }
833
    
834
}
(2-2/9)