1 |
0451b182
|
h.fradin
|
/**
|
2 |
01be5674
|
Andreas Müller
|
* Copyright (C) 2007 EDIT
|
3 |
f476ff86
|
Andreas Müller
|
* European Distributed Institute of Taxonomy
|
4 |
0451b182
|
h.fradin
|
* http://www.e-taxonomy.eu
|
5 |
f476ff86
|
Andreas Müller
|
*
|
6 |
01be5674
|
Andreas Müller
|
* 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 |
0451b182
|
h.fradin
|
*/
|
9 |
|
|
|
10 |
036cf746
|
Andreas Müller
|
package eu.etaxonomy.cdm.io.sdd.out;
|
11 |
0451b182
|
h.fradin
|
|
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 javax.xml.bind.annotation.XmlAccessType;
|
19 |
|
|
import javax.xml.bind.annotation.XmlAccessorType;
|
20 |
|
|
import javax.xml.bind.annotation.XmlElement;
|
21 |
|
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
22 |
|
|
import javax.xml.bind.annotation.XmlElements;
|
23 |
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
24 |
|
|
import javax.xml.bind.annotation.XmlType;
|
25 |
|
|
|
26 |
|
|
import eu.etaxonomy.cdm.model.agent.Address;
|
27 |
08b9a163
|
ben.clark
|
import eu.etaxonomy.cdm.model.agent.AgentBase;
|
28 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.agent.Contact;
|
29 |
|
|
import eu.etaxonomy.cdm.model.agent.Institution;
|
30 |
|
|
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
|
31 |
|
|
import eu.etaxonomy.cdm.model.agent.Person;
|
32 |
|
|
import eu.etaxonomy.cdm.model.agent.Team;
|
33 |
|
|
import eu.etaxonomy.cdm.model.common.AnnotationType;
|
34 |
|
|
import eu.etaxonomy.cdm.model.common.ExtensionType;
|
35 |
|
|
import eu.etaxonomy.cdm.model.common.Language;
|
36 |
|
|
import eu.etaxonomy.cdm.model.common.LanguageString;
|
37 |
|
|
import eu.etaxonomy.cdm.model.common.LanguageStringBase;
|
38 |
|
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
39 |
|
|
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
|
40 |
|
|
import eu.etaxonomy.cdm.model.common.RelationshipBase;
|
41 |
fc073f72
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.common.SourcedEntityBase;
|
42 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.common.VersionableEntity;
|
43 |
|
|
import eu.etaxonomy.cdm.model.description.Feature;
|
44 |
|
|
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
|
45 |
ccf1f2f1
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
|
46 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.description.State;
|
47 |
|
|
import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
|
48 |
|
|
import eu.etaxonomy.cdm.model.description.TextFormat;
|
49 |
ccf1f2f1
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.location.Country;
|
50 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
51 |
|
|
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
|
52 |
|
|
import eu.etaxonomy.cdm.model.location.NamedAreaType;
|
53 |
|
|
import eu.etaxonomy.cdm.model.location.ReferenceSystem;
|
54 |
ff3882c8
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.media.RightsType;
|
55 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.molecular.DnaSample;
|
56 |
|
|
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
|
57 |
|
|
import eu.etaxonomy.cdm.model.name.HybridRelationship;
|
58 |
|
|
import eu.etaxonomy.cdm.model.name.HybridRelationshipType;
|
59 |
|
|
import eu.etaxonomy.cdm.model.name.NameRelationship;
|
60 |
|
|
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
|
61 |
|
|
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
|
62 |
|
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
63 |
|
|
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
|
64 |
|
|
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
|
65 |
|
|
import eu.etaxonomy.cdm.model.name.Rank;
|
66 |
|
|
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
|
67 |
1eeb2fb0
|
a.babadshanjan
|
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
|
68 |
9dc896c9
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
69 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
|
70 |
c150ee7f
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
|
71 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
|
72 |
|
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
|
73 |
1d36aa54
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
74 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.taxon.Synonym;
|
75 |
fbeefcaf
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.taxon.SynonymType;
|
76 |
0451b182
|
h.fradin
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
77 |
|
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
78 |
|
|
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
|
79 |
|
|
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
|
80 |
34059bfd
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
81 |
|
|
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
|
82 |
b64f90fb
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.term.FeatureNode;
|
83 |
|
|
import eu.etaxonomy.cdm.model.term.FeatureTree;
|
84 |
34059bfd
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.term.Representation;
|
85 |
|
|
import eu.etaxonomy.cdm.model.term.TermVocabulary;
|
86 |
0451b182
|
h.fradin
|
|
87 |
|
|
/**
|
88 |
|
|
* @author a.babadshanjan
|
89 |
|
|
*/
|
90 |
|
|
@XmlAccessorType(XmlAccessType.FIELD)
|
91 |
|
|
@XmlType(name = "", propOrder = {
|
92 |
|
|
"terms",
|
93 |
|
|
"termVocabularies",
|
94 |
|
|
"agents",
|
95 |
|
|
"agentData",
|
96 |
|
|
"occurrences",
|
97 |
|
|
"references",
|
98 |
|
|
"referencedEntities",
|
99 |
|
|
"featureData",
|
100 |
|
|
"languageData",
|
101 |
|
|
"taxonomicNames",
|
102 |
|
|
"homotypicalGroups",
|
103 |
|
|
"taxa",
|
104 |
|
|
"synonyms",
|
105 |
|
|
"relationships",
|
106 |
|
|
"media"
|
107 |
|
|
})
|
108 |
|
|
@XmlRootElement(name = "DataSet", namespace = "http://etaxonomy.eu/cdm/model/1.0")
|
109 |
|
|
public class SDDDataSet {
|
110 |
f476ff86
|
Andreas Müller
|
|
111 |
|
|
// Some fields are of type List and some are of type Set.
|
112 |
0451b182
|
h.fradin
|
// This is mainly because
|
113 |
|
|
// the service classes return lists, i.e.
|
114 |
|
|
// TaxonServiceImpl.getRootTaxa() returns List<Taxon>
|
115 |
|
|
// and the Taxon methods return sets, i.e.
|
116 |
|
|
// Taxon.getTaxonomicChildren() returns Set<Taxon>.
|
117 |
|
|
|
118 |
|
|
@XmlElementWrapper(name = "Agents")
|
119 |
|
|
@XmlElements({
|
120 |
|
|
@XmlElement(name = "Team", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Team.class),
|
121 |
|
|
@XmlElement(name = "Institution", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Institution.class),
|
122 |
|
|
@XmlElement(name = "Person", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Person.class)
|
123 |
|
|
})
|
124 |
08b9a163
|
ben.clark
|
protected List<? extends AgentBase> agents;
|
125 |
f476ff86
|
Andreas Müller
|
|
126 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "AgentData")
|
127 |
|
|
@XmlElements({
|
128 |
d59ef31e
|
Andreas Müller
|
@XmlElement(name = "Address", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Address.class),
|
129 |
|
|
@XmlElement(name = "Contact", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = Contact.class),
|
130 |
|
|
@XmlElement(name = "InstitutionalMembership", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = InstitutionalMembership.class)
|
131 |
0451b182
|
h.fradin
|
})
|
132 |
|
|
protected List<VersionableEntity> agentData;
|
133 |
|
|
|
134 |
|
|
@XmlElementWrapper(name = "FeatureData")
|
135 |
d59ef31e
|
Andreas Müller
|
@XmlElements({
|
136 |
|
|
@XmlElement(name = "FeatureNode", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureNode.class),
|
137 |
|
|
@XmlElement(name = "FeatureTree", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = FeatureTree.class)
|
138 |
0451b182
|
h.fradin
|
})
|
139 |
|
|
// protected List<VersionableEntity> featureData;
|
140 |
d37cd796
|
ben.clark
|
protected List<VersionableEntity> featureData;
|
141 |
0451b182
|
h.fradin
|
|
142 |
|
|
@XmlElementWrapper(name = "LanguageData")
|
143 |
d59ef31e
|
Andreas Müller
|
@XmlElements({
|
144 |
|
|
@XmlElement(name = "Representation", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Representation.class),
|
145 |
|
|
@XmlElement(name = "LanguageString", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = LanguageString.class)
|
146 |
0451b182
|
h.fradin
|
})
|
147 |
|
|
protected List<LanguageStringBase> languageData;
|
148 |
f476ff86
|
Andreas Müller
|
|
149 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "Terms")
|
150 |
|
|
@XmlElements({
|
151 |
|
|
@XmlElement(name = "AnnotationType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = AnnotationType.class),
|
152 |
9e3239f6
|
Andreas Müller
|
@XmlElement(name = "Continent", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedArea.class),
|
153 |
0451b182
|
h.fradin
|
@XmlElement(name = "DerivationEventType", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DerivationEventType.class),
|
154 |
533cbb43
|
Andreas Müller
|
@XmlElement(name = "DeterminationModifier", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DefinedTerm.class),
|
155 |
0451b182
|
h.fradin
|
@XmlElement(name = "ExtensionType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = ExtensionType.class),
|
156 |
|
|
@XmlElement(name = "Feature", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = Feature.class),
|
157 |
|
|
@XmlElement(name = "HybridRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationshipType.class),
|
158 |
9e3239f6
|
Andreas Müller
|
@XmlElement(name = "InstitutionType", namespace = "http://etaxonomy.eu/cdm/model/agent/1.0", type = DefinedTerm.class),
|
159 |
0451b182
|
h.fradin
|
@XmlElement(name = "Language", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = Language.class),
|
160 |
|
|
@XmlElement(name = "MarkerType", namespace = "http://etaxonomy.eu/cdm/model/common/1.0", type = MarkerType.class),
|
161 |
|
|
@XmlElement(name = "MeasurementUnit", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = MeasurementUnit.class),
|
162 |
533cbb43
|
Andreas Müller
|
@XmlElement(name = "Modifier", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = DefinedTerm.class),
|
163 |
0451b182
|
h.fradin
|
@XmlElement(name = "NamedArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedArea.class),
|
164 |
|
|
@XmlElement(name = "NamedAreaLevel", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaLevel.class),
|
165 |
|
|
@XmlElement(name = "NamedAreaType", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = NamedAreaType.class),
|
166 |
|
|
@XmlElement(name = "NameRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationshipType.class),
|
167 |
|
|
@XmlElement(name = "NomenclaturalCode", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalCode.class),
|
168 |
|
|
@XmlElement(name = "NomenclaturalStatusType", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatusType.class),
|
169 |
ccf1f2f1
|
Andreas Müller
|
@XmlElement(name = "PresenceAbsenceTerm", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = PresenceAbsenceTerm.class),
|
170 |
0451b182
|
h.fradin
|
@XmlElement(name = "PreservationMethod", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = PreservationMethod.class),
|
171 |
|
|
@XmlElement(name = "Rank", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = Rank.class),
|
172 |
|
|
@XmlElement(name = "ReferenceSystem", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = ReferenceSystem.class),
|
173 |
ff3882c8
|
Andreas Müller
|
@XmlElement(name = "RightsType", namespace = "http://etaxonomy.eu/cdm/model/media/1.0", type = RightsType.class),
|
174 |
533cbb43
|
Andreas Müller
|
@XmlElement(name = "Scope", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = DefinedTerm.class),
|
175 |
|
|
@XmlElement(name = "Sex", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = DefinedTerm.class),
|
176 |
|
|
@XmlElement(name = "Stage", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = DefinedTerm.class),
|
177 |
0451b182
|
h.fradin
|
@XmlElement(name = "State", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = State.class),
|
178 |
|
|
@XmlElement(name = "StatisticalMeasure", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = StatisticalMeasure.class),
|
179 |
fbeefcaf
|
Andreas Müller
|
@XmlElement(name = "SynonymType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = SynonymType.class),
|
180 |
0451b182
|
h.fradin
|
@XmlElement(name = "TaxonRelationshipType", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationshipType.class),
|
181 |
|
|
@XmlElement(name = "TextFormat", namespace = "http://etaxonomy.eu/cdm/model/description/1.0", type = TextFormat.class),
|
182 |
1eeb2fb0
|
a.babadshanjan
|
@XmlElement(name = "TypeDesignationStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = SpecimenTypeDesignationStatus.class),
|
183 |
15348b34
|
Andreas Müller
|
@XmlElement(name = "Country", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = Country.class)
|
184 |
0451b182
|
h.fradin
|
})
|
185 |
|
|
protected List<DefinedTermBase> terms;
|
186 |
|
|
|
187 |
|
|
@XmlElementWrapper(name = "TermVocabularies")
|
188 |
|
|
@XmlElement(name = "TermVocabulary", namespace = "http://etaxonomy.eu/cdm/model/common/1.0")
|
189 |
|
|
protected List<TermVocabulary<DefinedTermBase>> termVocabularies;
|
190 |
|
|
|
191 |
|
|
@XmlElementWrapper(name = "Occurrences")
|
192 |
|
|
@XmlElements({
|
193 |
|
|
@XmlElement(name = "DnaSample", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = DnaSample.class),
|
194 |
c150ee7f
|
Andreas Müller
|
@XmlElement(name = "FieldUnit", namespace = "http://etaxonomy.eu/cdm/model/occurrence/1.0", type = FieldUnit.class)
|
195 |
0451b182
|
h.fradin
|
})
|
196 |
|
|
protected List<SpecimenOrObservationBase> occurrences;
|
197 |
f476ff86
|
Andreas Müller
|
|
198 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "References")
|
199 |
1d36aa54
|
Andreas Müller
|
@XmlElement(name = "Reference", namespace = "http://etaxonomy.eu/cdm/model/reference/1.0", type = Reference.class)
|
200 |
f53af173
|
Katja Luther
|
|
201 |
1d36aa54
|
Andreas Müller
|
protected List<Reference> references;
|
202 |
0451b182
|
h.fradin
|
|
203 |
|
|
@XmlElementWrapper(name = "ReferencedEntities")
|
204 |
|
|
@XmlElements({
|
205 |
|
|
@XmlElement(name = "NomenclaturalStatus", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NomenclaturalStatus.class),
|
206 |
|
|
})
|
207 |
|
|
protected List<ReferencedEntityBase> referencedEntities;
|
208 |
|
|
|
209 |
fc073f72
|
Andreas Müller
|
@XmlElementWrapper(name = "SourcedEntities")
|
210 |
|
|
@XmlElements({
|
211 |
|
|
@XmlElement(name = "NameTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameTypeDesignation.class),
|
212 |
|
|
@XmlElement(name = "SpecimenTypeDesignation", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = SpecimenTypeDesignation.class)
|
213 |
|
|
})
|
214 |
|
|
protected List<SourcedEntityBase> sourcedEntities;
|
215 |
|
|
|
216 |
f476ff86
|
Andreas Müller
|
|
217 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "TaxonomicNames")
|
218 |
|
|
@XmlElements({
|
219 |
9dc896c9
|
Andreas Müller
|
@XmlElement(name = "TaxonName", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = TaxonName.class),
|
220 |
0451b182
|
h.fradin
|
})
|
221 |
9dc896c9
|
Andreas Müller
|
protected List<TaxonName> taxonomicNames;
|
222 |
0451b182
|
h.fradin
|
|
223 |
|
|
@XmlElementWrapper(name = "Taxa")
|
224 |
|
|
@XmlElement(name = "Taxon", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
|
225 |
|
|
protected List<Taxon> taxa;
|
226 |
f476ff86
|
Andreas Müller
|
|
227 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "Synonyms")
|
228 |
|
|
@XmlElement(name = "Synonym", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0")
|
229 |
|
|
protected List<Synonym> synonyms;
|
230 |
|
|
|
231 |
|
|
@XmlElementWrapper(name = "Relationships")
|
232 |
|
|
@XmlElements({
|
233 |
|
|
@XmlElement(name = "TaxonRelationship", namespace = "http://etaxonomy.eu/cdm/model/taxon/1.0", type = TaxonRelationship.class),
|
234 |
f476ff86
|
Andreas Müller
|
@XmlElement(name = "NameRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = NameRelationship.class),
|
235 |
0451b182
|
h.fradin
|
@XmlElement(name = "HybridRelationship", namespace = "http://etaxonomy.eu/cdm/model/name/1.0", type = HybridRelationship.class)
|
236 |
|
|
})
|
237 |
fc073f72
|
Andreas Müller
|
protected Set<RelationshipBase> relationships;
|
238 |
0451b182
|
h.fradin
|
|
239 |
|
|
@XmlElementWrapper(name = "Media_")
|
240 |
|
|
@XmlElement(name = "Media", namespace = "http://etaxonomy.eu/cdm/model/media/1.0")
|
241 |
|
|
protected List<VersionableEntity> media;
|
242 |
f476ff86
|
Andreas Müller
|
|
243 |
0451b182
|
h.fradin
|
@XmlElementWrapper(name = "HomotypicalGroups")
|
244 |
|
|
@XmlElement(name = "HomotypicalGroup", namespace = "http://etaxonomy.eu/cdm/model/name/1.0")
|
245 |
|
|
protected List<HomotypicalGroup> homotypicalGroups;
|
246 |
|
|
|
247 |
|
|
// @XmlElement(name = "TdwgArea", namespace = "http://etaxonomy.eu/cdm/model/location/1.0", type = TdwgArea.class),
|
248 |
|
|
|
249 |
|
|
public SDDDataSet () {
|
250 |
f476ff86
|
Andreas Müller
|
|
251 |
|
|
agents = new ArrayList<>();
|
252 |
|
|
agentData = new ArrayList<>();
|
253 |
|
|
featureData = new ArrayList<>();
|
254 |
|
|
languageData = new ArrayList<>();
|
255 |
|
|
terms = new ArrayList<>();
|
256 |
|
|
termVocabularies = new ArrayList<>();
|
257 |
|
|
occurrences = new ArrayList<>();
|
258 |
|
|
references = new ArrayList<>();
|
259 |
|
|
referencedEntities = new ArrayList<>();
|
260 |
|
|
taxonomicNames = new ArrayList<>();
|
261 |
|
|
taxa = new ArrayList<>();
|
262 |
|
|
synonyms = new ArrayList<>();
|
263 |
|
|
media = new ArrayList<>();
|
264 |
|
|
homotypicalGroups = new ArrayList<>();
|
265 |
0451b182
|
h.fradin
|
}
|
266 |
|
|
|
267 |
08b9a163
|
ben.clark
|
public List<? extends AgentBase> getAgents() {
|
268 |
0451b182
|
h.fradin
|
return agents;
|
269 |
|
|
}
|
270 |
08b9a163
|
ben.clark
|
public void setAgents(List<? extends AgentBase> value) {
|
271 |
0451b182
|
h.fradin
|
this.agents = value;
|
272 |
|
|
}
|
273 |
|
|
|
274 |
fc073f72
|
Andreas Müller
|
|
275 |
0451b182
|
h.fradin
|
public List<VersionableEntity> getAgentData() {
|
276 |
|
|
return agentData;
|
277 |
|
|
}
|
278 |
|
|
public void setAgentData(List<VersionableEntity> value) {
|
279 |
|
|
this.agentData = value;
|
280 |
|
|
}
|
281 |
|
|
|
282 |
|
|
//public List<? extends TermBase> getTerms() {
|
283 |
|
|
public List<DefinedTermBase> getTerms() {
|
284 |
|
|
return terms;
|
285 |
|
|
}
|
286 |
|
|
|
287 |
|
|
//public void setTerms(List<? extends TermBase> value) {
|
288 |
|
|
public void setTerms(List<DefinedTermBase> value) {
|
289 |
|
|
this.terms = value;
|
290 |
|
|
}
|
291 |
|
|
|
292 |
|
|
public List<TermVocabulary<DefinedTermBase>> getTermVocabularies() {
|
293 |
|
|
return termVocabularies;
|
294 |
|
|
}
|
295 |
|
|
|
296 |
|
|
public void setTermVocabularies(List<TermVocabulary<DefinedTermBase>> value) {
|
297 |
|
|
this.termVocabularies = value;
|
298 |
|
|
}
|
299 |
|
|
|
300 |
9dc896c9
|
Andreas Müller
|
public List<TaxonName> getTaxonomicNames() {
|
301 |
0451b182
|
h.fradin
|
return taxonomicNames;
|
302 |
|
|
}
|
303 |
9dc896c9
|
Andreas Müller
|
public void setTaxonomicNames(List<TaxonName> value) {
|
304 |
0451b182
|
h.fradin
|
this.taxonomicNames = value;
|
305 |
|
|
}
|
306 |
|
|
|
307 |
|
|
public List<SpecimenOrObservationBase> getOccurrences() {
|
308 |
|
|
return occurrences;
|
309 |
|
|
}
|
310 |
|
|
|
311 |
|
|
public void setOccurrences(List<SpecimenOrObservationBase> value) {
|
312 |
|
|
this.occurrences = value;
|
313 |
|
|
}
|
314 |
|
|
|
315 |
1d36aa54
|
Andreas Müller
|
public List<Reference> getReferences() {
|
316 |
0451b182
|
h.fradin
|
return references;
|
317 |
|
|
}
|
318 |
1d36aa54
|
Andreas Müller
|
public void setReferences(List<Reference> value) {
|
319 |
0451b182
|
h.fradin
|
this.references = value;
|
320 |
|
|
}
|
321 |
|
|
|
322 |
|
|
public <T extends ReferencedEntityBase> void addReferencedEntities(Collection<T> value) {
|
323 |
|
|
for (T referencedEntity: value) {
|
324 |
|
|
this.referencedEntities.add(referencedEntity);
|
325 |
|
|
}
|
326 |
|
|
}
|
327 |
|
|
public List<ReferencedEntityBase> getReferencedEntities() {
|
328 |
|
|
return referencedEntities;
|
329 |
|
|
}
|
330 |
|
|
public void setReferencedEntities(List<? extends ReferencedEntityBase> value) {
|
331 |
fc073f72
|
Andreas Müller
|
this.referencedEntities = new ArrayList<>();
|
332 |
0451b182
|
h.fradin
|
referencedEntities.addAll(value);
|
333 |
|
|
}
|
334 |
f476ff86
|
Andreas Müller
|
|
335 |
fc073f72
|
Andreas Müller
|
public <T extends SourcedEntityBase> void addSourcedEntities(Collection<T> value) {
|
336 |
|
|
if (sourcedEntities == null){
|
337 |
|
|
this.sourcedEntities = new ArrayList<>();
|
338 |
|
|
}
|
339 |
|
|
for (T sourcedEntity: value) {
|
340 |
|
|
this.sourcedEntities.add(sourcedEntity);
|
341 |
|
|
}
|
342 |
|
|
}
|
343 |
|
|
|
344 |
|
|
public List<SourcedEntityBase> getSourcedEntities() {
|
345 |
|
|
return sourcedEntities;
|
346 |
|
|
}
|
347 |
|
|
public void setSourcedEntities(List<? extends SourcedEntityBase> value) {
|
348 |
|
|
this.sourcedEntities = new ArrayList<>();
|
349 |
|
|
sourcedEntities.addAll(value);
|
350 |
|
|
}
|
351 |
|
|
|
352 |
0451b182
|
h.fradin
|
public <T extends VersionableEntity> void addFeatureData(Collection<T> value) {
|
353 |
|
|
for (T featureItem: value) {
|
354 |
|
|
this.featureData.add(featureItem);
|
355 |
|
|
}
|
356 |
|
|
}
|
357 |
|
|
// public List<VersionableEntity> getFeatureData() {
|
358 |
d37cd796
|
ben.clark
|
public List<VersionableEntity> getFeatureData() {
|
359 |
0451b182
|
h.fradin
|
return featureData;
|
360 |
|
|
}
|
361 |
|
|
public <T extends VersionableEntity> void setFeatureData(List<T> value) {
|
362 |
fc073f72
|
Andreas Müller
|
featureData = new ArrayList<>();
|
363 |
0451b182
|
h.fradin
|
for (T featureItem: value) {
|
364 |
|
|
this.featureData.add(featureItem);
|
365 |
|
|
}
|
366 |
|
|
}
|
367 |
|
|
|
368 |
|
|
// public void setFeatureData(List<? extends VersionableEntity> value) {
|
369 |
|
|
//public void setFeatureData(List<? extends VersionableEntity<?>> value) {
|
370 |
|
|
// this.featureData = new ArrayList<VersionableEntity>();
|
371 |
|
|
// this.featureData = new ArrayList<VersionableEntity<?>>();
|
372 |
|
|
// featureData.addAll(value);
|
373 |
|
|
//}
|
374 |
f476ff86
|
Andreas Müller
|
|
375 |
0451b182
|
h.fradin
|
public <T extends LanguageStringBase> void addLanguageData(Collection<T> value) {
|
376 |
|
|
for (T languageItem: value) {
|
377 |
|
|
this.languageData.add(languageItem);
|
378 |
|
|
}
|
379 |
|
|
}
|
380 |
|
|
public List<LanguageStringBase> getLanguageData() {
|
381 |
|
|
return languageData;
|
382 |
|
|
}
|
383 |
|
|
public void setLanguageData(List<? extends LanguageStringBase> value) {
|
384 |
fc073f72
|
Andreas Müller
|
this.languageData = new ArrayList<>();
|
385 |
0451b182
|
h.fradin
|
languageData.addAll(value);
|
386 |
|
|
}
|
387 |
f476ff86
|
Andreas Müller
|
|
388 |
0451b182
|
h.fradin
|
public void addTaxa(Collection<Taxon> value) {
|
389 |
|
|
for (Taxon taxon: value) {
|
390 |
|
|
this.taxa.add(taxon);
|
391 |
|
|
}
|
392 |
|
|
}
|
393 |
|
|
|
394 |
|
|
public Collection<? extends TaxonBase> getTaxa() {
|
395 |
f476ff86
|
Andreas Müller
|
|
396 |
0451b182
|
h.fradin
|
//TODO can be deleted when everything works
|
397 |
|
|
//Object obj = taxa;
|
398 |
|
|
//Collection<TaxonBase> taxonBases = (Collection<TaxonBase>)obj;
|
399 |
|
|
List<Taxon> list = taxa;
|
400 |
|
|
return list;
|
401 |
|
|
}
|
402 |
|
|
|
403 |
|
|
public Collection<TaxonBase> getTaxonBases() {
|
404 |
f476ff86
|
Andreas Müller
|
|
405 |
fc073f72
|
Andreas Müller
|
Collection<TaxonBase> result = new HashSet<>();
|
406 |
0451b182
|
h.fradin
|
if (taxa != null) {
|
407 |
|
|
result.addAll(taxa);
|
408 |
|
|
}
|
409 |
|
|
if (synonyms != null) {
|
410 |
|
|
result.addAll(synonyms);
|
411 |
|
|
}
|
412 |
|
|
return result;
|
413 |
|
|
}
|
414 |
|
|
|
415 |
|
|
public void setTaxa(List<Taxon> value) {
|
416 |
|
|
this.taxa = value;
|
417 |
|
|
}
|
418 |
|
|
public void addTaxon(Taxon value) {
|
419 |
|
|
this.taxa.add(value);
|
420 |
|
|
}
|
421 |
|
|
|
422 |
|
|
public List<Synonym> getSynonyms() {
|
423 |
|
|
return synonyms;
|
424 |
|
|
}
|
425 |
|
|
public void setSynonyms(List<Synonym> value) {
|
426 |
|
|
this.synonyms = value;
|
427 |
|
|
}
|
428 |
f476ff86
|
Andreas Müller
|
|
429 |
0451b182
|
h.fradin
|
public void addSynonym(Synonym value) {
|
430 |
|
|
this.synonyms.add(value);
|
431 |
|
|
}
|
432 |
|
|
public void addSynonyms(Collection<Synonym> value) {
|
433 |
|
|
for (Synonym synonym: value) {
|
434 |
|
|
this.synonyms.add(synonym);
|
435 |
|
|
}
|
436 |
|
|
}
|
437 |
|
|
|
438 |
|
|
public <T extends VersionableEntity> void addMedia(Collection<T> value) {
|
439 |
|
|
for (T medium: value) {
|
440 |
|
|
this.media.add(medium);
|
441 |
|
|
}
|
442 |
|
|
}
|
443 |
|
|
|
444 |
|
|
public List<VersionableEntity> getMedia() {
|
445 |
|
|
return media;
|
446 |
|
|
}
|
447 |
|
|
|
448 |
|
|
public void setMedia(List<? extends VersionableEntity> value) {
|
449 |
fc073f72
|
Andreas Müller
|
this.media = new ArrayList<>();
|
450 |
0451b182
|
h.fradin
|
media.addAll(value);
|
451 |
|
|
}
|
452 |
f476ff86
|
Andreas Müller
|
|
453 |
0451b182
|
h.fradin
|
public List<HomotypicalGroup> getHomotypicalGroups() {
|
454 |
|
|
return homotypicalGroups;
|
455 |
|
|
}
|
456 |
|
|
|
457 |
|
|
public void setHomotypicalGroups(List<HomotypicalGroup> value) {
|
458 |
|
|
this.homotypicalGroups = value;
|
459 |
|
|
}
|
460 |
f476ff86
|
Andreas Müller
|
|
461 |
0451b182
|
h.fradin
|
}
|