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