1
|
/**
|
2
|
* Copyright (C) 2017 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.model.name;
|
10
|
|
11
|
import java.util.List;
|
12
|
import java.util.Set;
|
13
|
|
14
|
import javax.persistence.Transient;
|
15
|
|
16
|
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
|
17
|
import eu.etaxonomy.cdm.model.common.IParsable;
|
18
|
import eu.etaxonomy.cdm.model.common.IRelated;
|
19
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
20
|
import eu.etaxonomy.cdm.model.description.TaxonNameDescription;
|
21
|
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
|
22
|
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
|
23
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
24
|
import eu.etaxonomy.cdm.model.taxon.Synonym;
|
25
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
26
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
27
|
import eu.etaxonomy.cdm.model.taxon.TaxonComparator;
|
28
|
import eu.etaxonomy.cdm.strategy.cache.TaggedText;
|
29
|
import eu.etaxonomy.cdm.strategy.match.IMatchable;
|
30
|
|
31
|
/**
|
32
|
*
|
33
|
* The upmost interface for taxon names.
|
34
|
* <P>
|
35
|
* This class corresponds partially to: <ul>
|
36
|
* <li> TaxonName according to the TDWG ontology
|
37
|
* <li> ScientificName and CanonicalName according to the TCS
|
38
|
* <li> ScientificName according to the ABCD schema
|
39
|
* </ul>
|
40
|
*
|
41
|
* ITaxonNameBase and it's extensions should only be used for type safety
|
42
|
* of {@link TaxonNameBase} instances. It should not be used to interface
|
43
|
* instances of any other class
|
44
|
*
|
45
|
* @author a.mueller
|
46
|
* @date 21.01.2017
|
47
|
*
|
48
|
*/
|
49
|
public interface ITaxonNameBase
|
50
|
extends IIdentifiableEntity, IParsable, IRelated, IMatchable, Cloneable{
|
51
|
|
52
|
public int compareTo(IdentifiableEntity identifiableEntity);
|
53
|
|
54
|
public Object clone();
|
55
|
|
56
|
public String generateFullTitle();
|
57
|
|
58
|
@Transient
|
59
|
public String getFullTitleCache();
|
60
|
|
61
|
@Transient
|
62
|
public NomenclaturalCode getNomenclaturalCode();
|
63
|
|
64
|
public List<TaggedText> getTaggedName();
|
65
|
|
66
|
public void setFullTitleCache(String fullTitleCache);
|
67
|
|
68
|
public void setFullTitleCache(String fullTitleCache, boolean protectCache);
|
69
|
|
70
|
public boolean isProtectedFullTitleCache();
|
71
|
|
72
|
void setProtectedFullTitleCache(boolean protectedFullTitleCache);
|
73
|
|
74
|
/**
|
75
|
* Returns the set of all {@link NameRelationship name relationships}
|
76
|
* in which <i>this</i> taxon name is involved. A taxon name can be both source
|
77
|
* in some name relationships or target in some others.
|
78
|
*
|
79
|
* @see #getRelationsToThisName()
|
80
|
* @see #getRelationsFromThisName()
|
81
|
* @see #addNameRelationship(NameRelationship)
|
82
|
* @see #addRelationshipToName(TaxonNameBase, NameRelationshipType, String)
|
83
|
* @see #addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)
|
84
|
*/
|
85
|
public Set<NameRelationship> getNameRelations();
|
86
|
|
87
|
/**
|
88
|
* Creates a new {@link NameRelationship#NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, String) name relationship} from <i>this</i> taxon name to another taxon name
|
89
|
* and adds it both to the set of {@link #getRelationsFromThisName() relations from <i>this</i> taxon name} and
|
90
|
* to the set of {@link #getRelationsToThisName() relations to the other taxon name}.
|
91
|
*
|
92
|
* @param toName the taxon name of the target for this new name relationship
|
93
|
* @param type the type of this new name relationship
|
94
|
* @param ruleConsidered the string which specifies the rule on which this name relationship is based
|
95
|
* @see #getRelationsToThisName()
|
96
|
* @see #getNameRelations()
|
97
|
* @see #addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)
|
98
|
* @see #addNameRelationship(NameRelationship)
|
99
|
*/
|
100
|
public void addRelationshipToName(TaxonNameBase toName, NameRelationshipType type, String ruleConsidered);
|
101
|
|
102
|
/**
|
103
|
* Creates a new {@link NameRelationship#NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, String) name relationship} from <i>this</i> taxon name to another taxon name
|
104
|
* and adds it both to the set of {@link #getRelationsFromThisName() relations from <i>this</i> taxon name} and
|
105
|
* to the set of {@link #getRelationsToThisName() relations to the other taxon name}.
|
106
|
*
|
107
|
* @param toName the taxon name of the target for this new name relationship
|
108
|
* @param type the type of this new name relationship
|
109
|
* @param ruleConsidered the string which specifies the rule on which this name relationship is based
|
110
|
* @return
|
111
|
* @see #getRelationsToThisName()
|
112
|
* @see #getNameRelations()
|
113
|
* @see #addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)
|
114
|
* @see #addNameRelationship(NameRelationship)
|
115
|
*/
|
116
|
public NameRelationship addRelationshipToName(TaxonNameBase toName, NameRelationshipType type, Reference citation,
|
117
|
String microCitation, String ruleConsidered);
|
118
|
|
119
|
/**
|
120
|
* Creates a new {@link NameRelationship#NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, String) name relationship} from another taxon name to <i>this</i> taxon name
|
121
|
* and adds it both to the set of {@link #getRelationsToThisName() relations to <i>this</i> taxon name} and
|
122
|
* to the set of {@link #getRelationsFromThisName() relations from the other taxon name}.
|
123
|
*
|
124
|
* @param fromName the taxon name of the source for this new name relationship
|
125
|
* @param type the type of this new name relationship
|
126
|
* @param ruleConsidered the string which specifies the rule on which this name relationship is based
|
127
|
* @param citation the reference in which this relation was described
|
128
|
* @param microCitation the reference detail for this relation (e.g. page)
|
129
|
* @see #getRelationsFromThisName()
|
130
|
* @see #getNameRelations()
|
131
|
* @see #addRelationshipToName(TaxonNameBase, NameRelationshipType, String)
|
132
|
* @see #addNameRelationship(NameRelationship)
|
133
|
*/
|
134
|
public NameRelationship addRelationshipFromName(TaxonNameBase fromName, NameRelationshipType type, String ruleConsidered);
|
135
|
|
136
|
/**
|
137
|
* Creates a new {@link NameRelationship#NameRelationship(TaxonNameBase, TaxonNameBase, NameRelationshipType, String) name relationship} from another taxon name to <i>this</i> taxon name
|
138
|
* and adds it both to the set of {@link #getRelationsToThisName() relations to <i>this</i> taxon name} and
|
139
|
* to the set of {@link #getRelationsFromThisName() relations from the other taxon name}.
|
140
|
*
|
141
|
* @param fromName the taxon name of the source for this new name relationship
|
142
|
* @param type the type of this new name relationship
|
143
|
* @param ruleConsidered the string which specifies the rule on which this name relationship is based
|
144
|
* @param citation the reference in which this relation was described
|
145
|
* @param microCitation the reference detail for this relation (e.g. page)
|
146
|
* @see #getRelationsFromThisName()
|
147
|
* @see #getNameRelations()
|
148
|
* @see #addRelationshipToName(TaxonNameBase, NameRelationshipType, String)
|
149
|
* @see #addNameRelationship(NameRelationship)
|
150
|
*/
|
151
|
public NameRelationship addRelationshipFromName(TaxonNameBase fromName, NameRelationshipType type, Reference citation,
|
152
|
String microCitation, String ruleConsidered);
|
153
|
|
154
|
/**
|
155
|
* Removes one {@link NameRelationship name relationship} from one of both sets of
|
156
|
* {@link #getNameRelations() name relationships} in which <i>this</i> taxon name is involved.
|
157
|
* The name relationship will also be removed from one of both sets belonging
|
158
|
* to the second taxon name involved. Furthermore the fromName and toName
|
159
|
* attributes of the name relationship object will be nullified.
|
160
|
*
|
161
|
* @param nameRelation the name relationship which should be deleted from one of both sets
|
162
|
* @see #getNameRelations()
|
163
|
*/
|
164
|
public void removeNameRelationship(NameRelationship nameRelation);
|
165
|
|
166
|
public void removeRelationToTaxonName(TaxonNameBase toTaxonName);
|
167
|
|
168
|
/**
|
169
|
* Returns the set of all {@link NameRelationship name relationships}
|
170
|
* in which <i>this</i> taxon name is involved as a source ("from"-side).
|
171
|
*
|
172
|
* @see #getNameRelations()
|
173
|
* @see #getRelationsToThisName()
|
174
|
* @see #addRelationshipFromName(TaxonNameBase, NameRelationshipType, String)
|
175
|
*/
|
176
|
public Set<NameRelationship> getRelationsFromThisName();
|
177
|
|
178
|
/**
|
179
|
* Returns the set of all {@link NameRelationship name relationships}
|
180
|
* in which <i>this</i> taxon name is involved as a target ("to"-side).
|
181
|
*
|
182
|
* @see #getNameRelations()
|
183
|
* @see #getRelationsFromThisName()
|
184
|
* @see #addRelationshipToName(TaxonNameBase, NameRelationshipType, String)
|
185
|
*/
|
186
|
public Set<NameRelationship> getRelationsToThisName();
|
187
|
|
188
|
/**
|
189
|
* Returns the set of {@link NomenclaturalStatus nomenclatural status} assigned
|
190
|
* to <i>this</i> taxon name according to its corresponding nomenclature code.
|
191
|
* This includes the {@link NomenclaturalStatusType type} of the nomenclatural status
|
192
|
* and the nomenclatural code rule considered.
|
193
|
*
|
194
|
* @see NomenclaturalStatus
|
195
|
* @see NomenclaturalStatusType
|
196
|
*/
|
197
|
public Set<NomenclaturalStatus> getStatus();
|
198
|
|
199
|
/**
|
200
|
* Adds a new {@link NomenclaturalStatus nomenclatural status}
|
201
|
* to <i>this</i> taxon name's set of nomenclatural status.
|
202
|
*
|
203
|
* @param nomStatus the nomenclatural status to be added
|
204
|
* @see #getStatus()
|
205
|
*/
|
206
|
public void addStatus(NomenclaturalStatus nomStatus);
|
207
|
|
208
|
public NomenclaturalStatus addStatus(NomenclaturalStatusType statusType, Reference citation, String microCitation);
|
209
|
|
210
|
/**
|
211
|
* Removes one element from the set of nomenclatural status of <i>this</i> taxon name.
|
212
|
* Type and ruleConsidered attributes of the nomenclatural status object
|
213
|
* will be nullified.
|
214
|
*
|
215
|
* @param nomStatus the nomenclatural status of <i>this</i> taxon name which should be deleted
|
216
|
* @see #getStatus()
|
217
|
*/
|
218
|
public void removeStatus(NomenclaturalStatus nomStatus);
|
219
|
|
220
|
/**
|
221
|
* Indicates whether <i>this</i> taxon name is a {@link NameRelationshipType#BASIONYM() basionym}
|
222
|
* or a {@link NameRelationshipType#REPLACED_SYNONYM() replaced synonym}
|
223
|
* of any other taxon name. Returns "true", if a basionym or a replaced
|
224
|
* synonym {@link NameRelationship relationship} from <i>this</i> taxon name to another taxon name exists,
|
225
|
* false otherwise (also in case <i>this</i> taxon name is the only one in the
|
226
|
* homotypical group).
|
227
|
*/
|
228
|
public boolean isOriginalCombination();
|
229
|
|
230
|
/**
|
231
|
* Indicates <i>this</i> taxon name is a {@link NameRelationshipType#REPLACED_SYNONYM() replaced synonym}
|
232
|
* of any other taxon name. Returns "true", if a replaced
|
233
|
* synonym {@link NameRelationship relationship} from <i>this</i> taxon name to another taxon name exists,
|
234
|
* false otherwise (also in case <i>this</i> taxon name is the only one in the
|
235
|
* homotypical group).
|
236
|
*/
|
237
|
public boolean isReplacedSynonym();
|
238
|
|
239
|
/**
|
240
|
* Returns the taxon name which is the {@link NameRelationshipType#BASIONYM() basionym} of <i>this</i> taxon name.
|
241
|
* The basionym of a taxon name is its epithet-bringing synonym.
|
242
|
* For instance <i>Pinus abies</i> L. was published by Linnaeus and the botanist
|
243
|
* Karsten transferred later <i>this</i> taxon to the genus Picea. Therefore,
|
244
|
* <i>Pinus abies</i> L. is the basionym of the new combination <i>Picea abies</i> (L.) H. Karst.
|
245
|
*
|
246
|
* If more than one basionym exists one is choosen at radom.
|
247
|
*
|
248
|
* If no basionym exists null is returned.
|
249
|
*/
|
250
|
public TaxonNameBase getBasionym();
|
251
|
|
252
|
/**
|
253
|
* Returns the set of taxon names which are the {@link NameRelationshipType#BASIONYM() basionyms} of <i>this</i> taxon name.
|
254
|
* The basionym of a taxon name is its epithet-bringing synonym.
|
255
|
* For instance <i>Pinus abies</i> L. was published by Linnaeus and the botanist
|
256
|
* Karsten transferred later <i>this</i> taxon to the genus Picea. Therefore,
|
257
|
* <i>Pinus abies</i> L. is the basionym of the new combination <i>Picea abies</i> (L.) H. Karst.
|
258
|
*/
|
259
|
public Set<TaxonNameBase> getBasionyms();
|
260
|
|
261
|
/**
|
262
|
* Assigns a taxon name as {@link NameRelationshipType#BASIONYM() basionym} of <i>this</i> taxon name.
|
263
|
* The basionym {@link NameRelationship relationship} will be added to <i>this</i> taxon name
|
264
|
* and to the basionym. The basionym cannot have itself a basionym.
|
265
|
* The {@link HomotypicalGroup homotypical groups} of <i>this</i> taxon name and of the basionym
|
266
|
* will be {@link HomotypicalGroup#merge(HomotypicalGroup) merged}.
|
267
|
*
|
268
|
* @param basionym the taxon name to be set as the basionym of <i>this</i> taxon name
|
269
|
* @see #getBasionym()
|
270
|
* @see #addBasionym(TaxonNameBase, String)
|
271
|
*/
|
272
|
public void addBasionym(TaxonNameBase basionym);
|
273
|
|
274
|
/**
|
275
|
* Assigns a taxon name as {@link NameRelationshipType#BASIONYM() basionym} of <i>this</i> taxon name
|
276
|
* and keeps the nomenclatural rule considered for it. The basionym
|
277
|
* {@link NameRelationship relationship} will be added to <i>this</i> taxon name and to the basionym.
|
278
|
* The basionym cannot have itself a basionym.
|
279
|
* The {@link HomotypicalGroup homotypical groups} of <i>this</i> taxon name and of the basionym
|
280
|
* will be {@link HomotypicalGroup#merge(HomotypicalGroup) merged}.
|
281
|
*
|
282
|
* @param basionym the taxon name to be set as the basionym of <i>this</i> taxon name
|
283
|
* @param ruleConsidered the string identifying the nomenclatural rule
|
284
|
* @return
|
285
|
* @see #getBasionym()
|
286
|
* @see #addBasionym(TaxonNameBase)
|
287
|
*/
|
288
|
public NameRelationship addBasionym(TaxonNameBase basionym, Reference citation, String microcitation, String ruleConsidered);
|
289
|
|
290
|
/**
|
291
|
* Returns the set of taxon names which are the {@link NameRelationshipType#REPLACED_SYNONYM() replaced synonyms} of <i>this</i> taxon name.
|
292
|
*
|
293
|
*/
|
294
|
public Set<TaxonNameBase> getReplacedSynonyms();
|
295
|
|
296
|
/**
|
297
|
* Assigns a taxon name as {@link NameRelationshipType#REPLACED_SYNONYM() replaced synonym} of <i>this</i> taxon name
|
298
|
* and keeps the nomenclatural rule considered for it. The replaced synonym
|
299
|
* {@link NameRelationship relationship} will be added to <i>this</i> taxon name and to the replaced synonym.
|
300
|
* The {@link HomotypicalGroup homotypical groups} of <i>this</i> taxon name and of the replaced synonym
|
301
|
* will be {@link HomotypicalGroup#merge(HomotypicalGroup) merged}.
|
302
|
*
|
303
|
* @param basionym the taxon name to be set as the basionym of <i>this</i> taxon name
|
304
|
* @param ruleConsidered the string identifying the nomenclatural rule
|
305
|
* @see #getBasionym()
|
306
|
* @see #addBasionym(TaxonNameBase)
|
307
|
*/
|
308
|
//TODO: Check if true: The replaced synonym cannot have itself a replaced synonym (?).
|
309
|
public void addReplacedSynonym(TaxonNameBase replacedSynonym, Reference citation, String microcitation, String ruleConsidered);
|
310
|
|
311
|
/**
|
312
|
* Removes the {@link NameRelationshipType#BASIONYM() basionym} {@link NameRelationship relationship} from the set of
|
313
|
* {@link #getRelationsToThisName() name relationships to} <i>this</i> taxon name. The same relationhip will be
|
314
|
* removed from the set of {@link #getRelationsFromThisName() name relationships from} the taxon name
|
315
|
* previously used as basionym.
|
316
|
*
|
317
|
* @see #getBasionym()
|
318
|
* @see #addBasionym(TaxonNameBase)
|
319
|
*/
|
320
|
public void removeBasionyms();
|
321
|
|
322
|
/**
|
323
|
* Returns the taxonomic {@link Rank rank} of <i>this</i> taxon name.
|
324
|
*
|
325
|
* @see Rank
|
326
|
*/
|
327
|
public Rank getRank();
|
328
|
|
329
|
/**
|
330
|
* @see #getRank()
|
331
|
*/
|
332
|
public void setRank(Rank rank);
|
333
|
|
334
|
/**
|
335
|
* Returns the {@link eu.etaxonomy.cdm.model.reference.INomenclaturalReference nomenclatural reference} of <i>this</i> taxon name.
|
336
|
* The nomenclatural reference is here meant to be the one publication
|
337
|
* <i>this</i> taxon name was originally published in while fulfilling the formal
|
338
|
* requirements as specified by the corresponding {@link NomenclaturalCode nomenclatural code}.
|
339
|
*
|
340
|
* @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference
|
341
|
* @see eu.etaxonomy.cdm.model.reference.Reference
|
342
|
*/
|
343
|
public INomenclaturalReference getNomenclaturalReference();
|
344
|
|
345
|
/**
|
346
|
* Assigns a {@link eu.etaxonomy.cdm.model.reference.INomenclaturalReference nomenclatural reference} to <i>this</i> taxon name.
|
347
|
* The corresponding {@link eu.etaxonomy.cdm.model.reference.Reference.isNomenclaturallyRelevant nomenclaturally relevant flag} will be set to true
|
348
|
* as it is obviously used for nomenclatural purposes.
|
349
|
*
|
350
|
* @throws IllegalArgumentException if parameter <code>nomenclaturalReference</code> is not assignable from {@link INomenclaturalReference}
|
351
|
* @see #getNomenclaturalReference()
|
352
|
*/
|
353
|
public void setNomenclaturalReference(INomenclaturalReference nomenclaturalReference);
|
354
|
|
355
|
/**
|
356
|
* Returns the appended phrase string assigned to <i>this</i> taxon name.
|
357
|
* The appended phrase is a non-atomised addition to a name. It is
|
358
|
* not ruled by a nomenclatural code.
|
359
|
*/
|
360
|
public String getAppendedPhrase();
|
361
|
|
362
|
/**
|
363
|
* @see #getAppendedPhrase()
|
364
|
*/
|
365
|
public void setAppendedPhrase(String appendedPhrase);
|
366
|
|
367
|
/**
|
368
|
* Returns the details string of the {@link #getNomenclaturalReference() nomenclatural reference} assigned
|
369
|
* to <i>this</i> taxon name. The details describe the exact localisation within
|
370
|
* the publication used as nomenclature reference. These are mostly
|
371
|
* (implicitly) pages but can also be figures or tables or any other
|
372
|
* element of a publication. A nomenclatural micro reference (details)
|
373
|
* requires the existence of a nomenclatural reference.
|
374
|
*/
|
375
|
//Details of the nomenclatural reference (protologue).
|
376
|
public String getNomenclaturalMicroReference();
|
377
|
|
378
|
/**
|
379
|
* @see #getNomenclaturalMicroReference()
|
380
|
*/
|
381
|
public void setNomenclaturalMicroReference(String nomenclaturalMicroReference);
|
382
|
|
383
|
/**
|
384
|
* @param warnings
|
385
|
*/
|
386
|
public void addParsingProblems(int problems);
|
387
|
|
388
|
/**
|
389
|
* Returns the set of {@link TypeDesignationBase type designations} assigned
|
390
|
* to <i>this</i> taxon name.
|
391
|
* @see NameTypeDesignation
|
392
|
* @see SpecimenTypeDesignation
|
393
|
*/
|
394
|
public Set<TypeDesignationBase> getTypeDesignations();
|
395
|
|
396
|
/**
|
397
|
* Removes one element from the set of {@link TypeDesignationBase type designations} assigned to
|
398
|
* <i>this</i> taxon name. The type designation itself will be nullified.
|
399
|
*
|
400
|
* @param typeDesignation the type designation which should be deleted
|
401
|
*/
|
402
|
public void removeTypeDesignation(TypeDesignationBase typeDesignation);
|
403
|
|
404
|
/**
|
405
|
* Returns the set of {@link SpecimenTypeDesignation specimen type designations} assigned
|
406
|
* to <i>this</i> taxon name. The {@link Rank rank} of <i>this</i> taxon name is generally
|
407
|
* "species" or below. The specimen type designations include all the
|
408
|
* specimens on which the typification of this name is based (which are
|
409
|
* exclusively used to typify taxon names belonging to the same
|
410
|
* {@link HomotypicalGroup homotypical group} to which <i>this</i> taxon name
|
411
|
* belongs) and eventually the status of these designations.
|
412
|
*
|
413
|
* @see SpecimenTypeDesignation
|
414
|
* @see NameTypeDesignation
|
415
|
* @see HomotypicalGroup
|
416
|
*/
|
417
|
public Set<SpecimenTypeDesignation> getSpecimenTypeDesignationsOfHomotypicalGroup();
|
418
|
|
419
|
/**
|
420
|
* Returns the set of {@link NameTypeDesignation name type designations} assigned
|
421
|
* to <i>this</i> taxon name the rank of which must be above "species".
|
422
|
* The name type designations include all the taxon names used to typify
|
423
|
* <i>this</i> taxon name and eventually the rejected or conserved status
|
424
|
* of these designations.
|
425
|
*
|
426
|
* @see NameTypeDesignation
|
427
|
* @see SpecimenTypeDesignation
|
428
|
*/
|
429
|
public Set<NameTypeDesignation> getNameTypeDesignations();
|
430
|
|
431
|
/**
|
432
|
* Creates and adds a new {@link NameTypeDesignation name type designation}
|
433
|
* to <i>this</i> taxon name's set of type designations.
|
434
|
*
|
435
|
* @param typeSpecies the taxon name to be used as type of <i>this</i> taxon name
|
436
|
* @param citation the reference for this new designation
|
437
|
* @param citationMicroReference the string with the details (generally pages) within the reference
|
438
|
* @param originalNameString the taxon name string used in the reference to assert this designation
|
439
|
* @param isRejectedType the boolean status for a rejected name type designation
|
440
|
* @param isConservedType the boolean status for a conserved name type designation
|
441
|
* @param isLectoType the boolean status for a lectotype name type designation
|
442
|
* @param isNotDesignated the boolean status for a name type designation without name type
|
443
|
* @param addToAllHomotypicNames the boolean indicating whether the name type designation should be
|
444
|
* added to all taxon names of the homotypical group this taxon name belongs to
|
445
|
* @return
|
446
|
* @see #getNameTypeDesignations()
|
447
|
* @see NameTypeDesignation
|
448
|
* @see TypeDesignationBase#isNotDesignated()
|
449
|
*/
|
450
|
public NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies, Reference citation,
|
451
|
String citationMicroReference, String originalNameString, NameTypeDesignationStatus status,
|
452
|
boolean isRejectedType, boolean isConservedType,
|
453
|
/*boolean isLectoType, */
|
454
|
boolean isNotDesignated, boolean addToAllHomotypicNames);
|
455
|
|
456
|
/**
|
457
|
* Creates and adds a new {@link NameTypeDesignation name type designation}
|
458
|
* to <i>this</i> taxon name's set of type designations.
|
459
|
*
|
460
|
* @param typeSpecies the taxon name to be used as type of <i>this</i> taxon name
|
461
|
* @param citation the reference for this new designation
|
462
|
* @param citationMicroReference the string with the details (generally pages) within the reference
|
463
|
* @param originalNameString the taxon name string used in the reference to assert this designation
|
464
|
* @param status the name type designation status
|
465
|
* @param addToAllHomotypicNames the boolean indicating whether the name type designation should be
|
466
|
* added to all taxon names of the homotypical group this taxon name belongs to
|
467
|
* @return
|
468
|
* @see #getNameTypeDesignations()
|
469
|
* @see NameTypeDesignation
|
470
|
* @see TypeDesignationBase#isNotDesignated()
|
471
|
*/
|
472
|
public NameTypeDesignation addNameTypeDesignation(TaxonNameBase typeSpecies, Reference citation,
|
473
|
String citationMicroReference, String originalNameString, NameTypeDesignationStatus status,
|
474
|
boolean addToAllHomotypicNames);
|
475
|
|
476
|
/**
|
477
|
* Returns the set of {@link SpecimenTypeDesignation specimen type designations}
|
478
|
* that typify <i>this</i> taxon name.
|
479
|
*/
|
480
|
public Set<SpecimenTypeDesignation> getSpecimenTypeDesignations();
|
481
|
|
482
|
/**
|
483
|
* Creates and adds a new {@link SpecimenTypeDesignation specimen type designation}
|
484
|
* to <i>this</i> taxon name's set of type designations.
|
485
|
*
|
486
|
* @param typeSpecimen the specimen to be used as a type for <i>this</i> taxon name
|
487
|
* @param status the specimen type designation status
|
488
|
* @param citation the reference for this new specimen type designation
|
489
|
* @param citationMicroReference the string with the details (generally pages) within the reference
|
490
|
* @param originalNameString the taxon name used in the reference to assert this designation
|
491
|
* @param isNotDesignated the boolean status for a specimen type designation without specimen type
|
492
|
* @param addToAllHomotypicNames the boolean indicating whether the specimen type designation should be
|
493
|
* added to all taxon names of the homotypical group the typified
|
494
|
* taxon name belongs to
|
495
|
* @return
|
496
|
* @see #getSpecimenTypeDesignations()
|
497
|
* @see SpecimenTypeDesignationStatus
|
498
|
* @see SpecimenTypeDesignation
|
499
|
* @see TypeDesignationBase#isNotDesignated()
|
500
|
*/
|
501
|
public SpecimenTypeDesignation addSpecimenTypeDesignation(DerivedUnit typeSpecimen, SpecimenTypeDesignationStatus status,
|
502
|
Reference citation, String citationMicroReference, String originalNameString, boolean isNotDesignated,
|
503
|
boolean addToAllHomotypicNames);
|
504
|
|
505
|
/**
|
506
|
* Adds a {@link TypeDesignationBase type designation} to <code>this</code> taxon name's set of type designations
|
507
|
*
|
508
|
* @param typeDesignation the typeDesignation to be added to <code>this</code> taxon name
|
509
|
* @param addToAllNames the boolean indicating whether the type designation should be
|
510
|
* added to all taxon names of the homotypical group the typified
|
511
|
* taxon name belongs to
|
512
|
* @return true if the operation was succesful
|
513
|
*
|
514
|
* @throws IllegalArgumentException if the type designation already has typified names, an {@link IllegalArgumentException exception}
|
515
|
* is thrown. We do this to prevent a type designation to be used for multiple taxon names.
|
516
|
*
|
517
|
*/
|
518
|
public boolean addTypeDesignation(TypeDesignationBase typeDesignation, boolean addToAllNames);
|
519
|
|
520
|
/**
|
521
|
* Returns the {@link HomotypicalGroup homotypical group} to which
|
522
|
* <i>this</i> taxon name belongs. A homotypical group represents all taxon names
|
523
|
* that share the same types.
|
524
|
*
|
525
|
* @see HomotypicalGroup
|
526
|
*/
|
527
|
|
528
|
public HomotypicalGroup getHomotypicalGroup();
|
529
|
|
530
|
/**
|
531
|
* @see #getHomotypicalGroup()
|
532
|
*/
|
533
|
public void setHomotypicalGroup(HomotypicalGroup homotypicalGroup);
|
534
|
|
535
|
/**
|
536
|
* Returns the complete string containing the
|
537
|
* {@link eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation() nomenclatural reference citation}
|
538
|
* and the {@link #getNomenclaturalMicroReference() details} assigned to <i>this</i> taxon name.
|
539
|
*
|
540
|
* @return the string containing the nomenclatural reference of <i>this</i> taxon name
|
541
|
* @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getNomenclaturalCitation()
|
542
|
* @see #getNomenclaturalReference()
|
543
|
* @see #getNomenclaturalMicroReference()
|
544
|
*/
|
545
|
public String getCitationString();
|
546
|
|
547
|
/**
|
548
|
* Returns the string containing the publication date (generally only year)
|
549
|
* of the {@link #getNomenclaturalReference() nomenclatural reference} for <i>this</i> taxon name, null if there is
|
550
|
* no nomenclatural reference.
|
551
|
*
|
552
|
* @return the string containing the publication date of <i>this</i> taxon name
|
553
|
* @see eu.etaxonomy.cdm.model.reference.INomenclaturalReference#getYear()
|
554
|
*/
|
555
|
public String getReferenceYear();
|
556
|
|
557
|
/**
|
558
|
* Returns the set of {@link eu.etaxonomy.cdm.model.taxon.TaxonBase taxon bases} that refer to <i>this</i> taxon name.
|
559
|
* In this context a taxon base means the use of a taxon name by a reference
|
560
|
* either as a {@link eu.etaxonomy.cdm.model.taxon.Taxon taxon} ("accepted/correct" name) or
|
561
|
* as a (junior) {@link eu.etaxonomy.cdm.model.taxon.Synonym synonym}.
|
562
|
* A taxon name can be used by several distinct {@link eu.etaxonomy.cdm.model.reference.Reference references} but only once
|
563
|
* within a taxonomic treatment (identified by one reference).
|
564
|
*
|
565
|
* @see #getTaxa()
|
566
|
* @see #getSynonyms()
|
567
|
*/
|
568
|
public Set<TaxonBase> getTaxonBases();
|
569
|
|
570
|
/**
|
571
|
* Adds a new {@link eu.etaxonomy.cdm.model.taxon.TaxonBase taxon base}
|
572
|
* to the set of taxon bases using <i>this</i> taxon name.
|
573
|
*
|
574
|
* @param taxonBase the taxon base to be added
|
575
|
* @see #getTaxonBases()
|
576
|
* @see #removeTaxonBase(TaxonBase)
|
577
|
*/
|
578
|
//TODO protected
|
579
|
public void addTaxonBase(TaxonBase taxonBase);
|
580
|
|
581
|
/**
|
582
|
* Removes one element from the set of {@link eu.etaxonomy.cdm.model.taxon.TaxonBase taxon bases} that refer to <i>this</i> taxon name.
|
583
|
*
|
584
|
* @param taxonBase the taxon base which should be removed from the corresponding set
|
585
|
* @see #getTaxonBases()
|
586
|
* @see #addTaxonBase(TaxonBase)
|
587
|
*/
|
588
|
public void removeTaxonBase(TaxonBase taxonBase);
|
589
|
|
590
|
/**
|
591
|
* Returns the set of {@link eu.etaxonomy.cdm.model.taxon.Taxon taxa} ("accepted/correct" names according to any
|
592
|
* reference) that are based on <i>this</i> taxon name. This set is a subset of
|
593
|
* the set returned by getTaxonBases().
|
594
|
*
|
595
|
* @see eu.etaxonomy.cdm.model.taxon.Taxon
|
596
|
* @see #getTaxonBases()
|
597
|
* @see #getSynonyms()
|
598
|
*/
|
599
|
public Set<Taxon> getTaxa();
|
600
|
|
601
|
/**
|
602
|
* Returns the set of {@link eu.etaxonomy.cdm.model.taxon.Synonym (junior) synonyms} (according to any
|
603
|
* reference) that are based on <i>this</i> taxon name. This set is a subset of
|
604
|
* the set returned by getTaxonBases().
|
605
|
*
|
606
|
* @see eu.etaxonomy.cdm.model.taxon.Synonym
|
607
|
* @see #getTaxonBases()
|
608
|
* @see #getTaxa()
|
609
|
*/
|
610
|
public Set<Synonym> getSynonyms();
|
611
|
|
612
|
/**
|
613
|
* Returns the set of {@link eu.etaxonomy.cdm.model.description.TaxonNameDescription taxon name descriptions} assigned
|
614
|
* to <i>this</i> taxon name. A taxon name description is a piece of information
|
615
|
* concerning the taxon name like for instance the content of its first
|
616
|
* publication (protolog) or a picture of this publication.
|
617
|
*
|
618
|
* @see #addDescription(TaxonNameDescription)
|
619
|
* @see #removeDescription(TaxonNameDescription)
|
620
|
* @see eu.etaxonomy.cdm.model.description.TaxonNameDescription
|
621
|
*/
|
622
|
public Set<TaxonNameDescription> getDescriptions();
|
623
|
|
624
|
/**
|
625
|
* Adds a new {@link eu.etaxonomy.cdm.model.description.TaxonNameDescription taxon name description}
|
626
|
* to the set of taxon name descriptions assigned to <i>this</i> taxon name. The
|
627
|
* content of the {@link eu.etaxonomy.cdm.model.description.TaxonNameDescription#getTaxonName() taxonName attribute} of the
|
628
|
* taxon name description itself will be replaced with <i>this</i> taxon name.
|
629
|
*
|
630
|
* @param description the taxon name description to be added
|
631
|
* @see #getDescriptions()
|
632
|
* @see #removeDescription(TaxonNameDescription)
|
633
|
*/
|
634
|
public void addDescription(TaxonNameDescription description);
|
635
|
|
636
|
/**
|
637
|
* Removes one element from the set of {@link eu.etaxonomy.cdm.model.description.TaxonNameDescription taxon name descriptions} assigned
|
638
|
* to <i>this</i> taxon name. The content of the {@link eu.etaxonomy.cdm.model.description.TaxonNameDescription#getTaxonName() taxonName attribute}
|
639
|
* of the description itself will be set to "null".
|
640
|
*
|
641
|
* @param description the taxon name description which should be removed
|
642
|
* @see #getDescriptions()
|
643
|
* @see #addDescription(TaxonNameDescription)
|
644
|
* @see eu.etaxonomy.cdm.model.description.TaxonNameDescription#getTaxonName()
|
645
|
*/
|
646
|
public void removeDescription(TaxonNameDescription description);
|
647
|
|
648
|
public void mergeHomotypicGroups(TaxonNameBase name);
|
649
|
|
650
|
/**
|
651
|
* Returns the boolean value indicating whether a given taxon name belongs
|
652
|
* to the same {@link HomotypicalGroup homotypical group} as <i>this</i> taxon name (true)
|
653
|
* or not (false). Returns "true" only if the homotypical groups of both
|
654
|
* taxon names exist and if they are identical.
|
655
|
*
|
656
|
* @param homoTypicName the taxon name the homotypical group of which is to be checked
|
657
|
* @return the boolean value of the check
|
658
|
* @see HomotypicalGroup
|
659
|
*/
|
660
|
public boolean isHomotypic(TaxonNameBase homoTypicName);
|
661
|
|
662
|
/**
|
663
|
* Checks whether name is a basionym for ALL names
|
664
|
* in its homotypical group.
|
665
|
* Returns <code>false</code> if there are no other names in the group
|
666
|
* @param name
|
667
|
* @return
|
668
|
*/
|
669
|
public boolean isGroupsBasionym();
|
670
|
|
671
|
/**
|
672
|
* Checks whether a basionym relationship exists between fromName and toName.
|
673
|
*
|
674
|
* @param fromName
|
675
|
* @param toName
|
676
|
* @return
|
677
|
*/
|
678
|
public boolean isBasionymFor(TaxonNameBase newCombinationName);
|
679
|
|
680
|
/**
|
681
|
* Creates a basionym relationship to all other names in this names homotypical
|
682
|
* group.
|
683
|
*
|
684
|
* @see HomotypicalGroup.setGroupBasionym(TaxonNameBase basionymName)
|
685
|
*/
|
686
|
public void makeGroupsBasionym();
|
687
|
|
688
|
//********* Rank comparison shortcuts ********************//
|
689
|
/**
|
690
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
691
|
* taxon name is higher than the genus rank (true) or not (false).
|
692
|
* Suprageneric non viral names are monomials.
|
693
|
* Returns false if rank is null.
|
694
|
*
|
695
|
* @see #isGenus()
|
696
|
* @see #isInfraGeneric()
|
697
|
* @see #isSpecies()
|
698
|
* @see #isInfraSpecific()
|
699
|
*/
|
700
|
public boolean isSupraGeneric();
|
701
|
|
702
|
/**
|
703
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
704
|
* taxon name is the genus rank (true) or not (false). Non viral names with
|
705
|
* genus rank are monomials. Returns false if rank is null.
|
706
|
*
|
707
|
* @see #isSupraGeneric()
|
708
|
* @see #isInfraGeneric()
|
709
|
* @see #isSpecies()
|
710
|
* @see #isInfraSpecific()
|
711
|
*/
|
712
|
public boolean isGenus();
|
713
|
|
714
|
/**
|
715
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
716
|
* taxon name is higher than the species rank and lower than the
|
717
|
* genus rank (true) or not (false). Infrageneric non viral names are
|
718
|
* binomials. Returns false if rank is null.
|
719
|
*
|
720
|
* @see #isSupraGeneric()
|
721
|
* @see #isGenus()
|
722
|
* @see #isSpecies()
|
723
|
* @see #isInfraSpecific()
|
724
|
*/
|
725
|
public boolean isInfraGeneric();
|
726
|
|
727
|
/**
|
728
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
729
|
* taxon name is higher than the species rank (true) or not (false).
|
730
|
* Returns false if rank is null.
|
731
|
*
|
732
|
* @see #isGenus()
|
733
|
* @see #isInfraGeneric()
|
734
|
* @see #isSpecies()
|
735
|
* @see #isInfraSpecific()
|
736
|
*/
|
737
|
public boolean isSupraSpecific();
|
738
|
|
739
|
/**
|
740
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
741
|
* taxon name is the species rank (true) or not (false). Non viral names
|
742
|
* with species rank are binomials.
|
743
|
* Returns false if rank is null.
|
744
|
*
|
745
|
* @see #isSupraGeneric()
|
746
|
* @see #isGenus()
|
747
|
* @see #isInfraGeneric()
|
748
|
* @see #isInfraSpecific()
|
749
|
*/
|
750
|
public boolean isSpecies();
|
751
|
|
752
|
/**
|
753
|
* Returns the boolean value indicating whether the taxonomic {@link Rank rank} of <i>this</i>
|
754
|
* taxon name is lower than the species rank (true) or not (false).
|
755
|
* Infraspecific non viral names are trinomials.
|
756
|
* Returns false if rank is null.
|
757
|
*
|
758
|
* @see #isSupraGeneric()
|
759
|
* @see #isGenus()
|
760
|
* @see #isInfraGeneric()
|
761
|
* @see #isSpecies()
|
762
|
*/
|
763
|
public boolean isInfraSpecific();
|
764
|
|
765
|
/**
|
766
|
* Returns true if this name's rank indicates a rank that aggregates species like species
|
767
|
* aggregates or species groups, false otherwise. This methods currently returns false
|
768
|
* for all user defined ranks.
|
769
|
*
|
770
|
*@see Rank#isSpeciesAggregate()
|
771
|
*
|
772
|
* @return
|
773
|
*/
|
774
|
public boolean isSpeciesAggregate();
|
775
|
|
776
|
/**
|
777
|
* Creates a basionym relationship between this name and
|
778
|
* each name in its homotypic group.
|
779
|
*
|
780
|
* @param basionymName
|
781
|
*/
|
782
|
public void setAsGroupsBasionym();
|
783
|
|
784
|
/**
|
785
|
* Removes basionym relationship between this name and
|
786
|
* each name in its homotypic group.
|
787
|
*
|
788
|
* @param basionymName
|
789
|
*/
|
790
|
public void removeAsGroupsBasionym();
|
791
|
|
792
|
/**
|
793
|
* This method compares 2 taxon names on it's name titles and caches.
|
794
|
* Maybe in future more parts will be added.
|
795
|
* It is not fully clear/defined how this method relates to
|
796
|
* explicit comparators like {@link TaxonNameComparator}.
|
797
|
* Historically it was a compareTo method in {@link IdentifiableEntity}
|
798
|
* but did not fulfill the {@link Comparable} contract.
|
799
|
* <BR><BR>
|
800
|
* {@link https://dev.e-taxonomy.eu/redmine/issues/922}<BR>
|
801
|
* {@link https://dev.e-taxonomy.eu/redmine/issues/6311}
|
802
|
*
|
803
|
* @see TaxonNameBase#compareToName(TaxonNameBase)
|
804
|
* @see TaxonNameComparator
|
805
|
* @see TaxonComparator
|
806
|
* @param otherTaxon
|
807
|
* @return the compareTo result similar to {@link Comparable#compareTo(Object)}
|
808
|
* @throws NullPointerException if otherTaxon is <code>null</code>
|
809
|
*/
|
810
|
public int compareToName(TaxonNameBase<?,?> otherName);
|
811
|
|
812
|
|
813
|
}
|