001package org.gbif.api.vocabulary;
002
003import java.util.List;
004import javax.annotation.Nullable;
005
006import com.google.common.base.Predicate;
007import com.google.common.collect.Collections2;
008import com.google.common.collect.ImmutableList;
009import com.google.common.collect.Lists;
010
011/**
012 * A vocabulary to be used for a nomenclatural type status of a specimen or name.
013 * See also the related TypeDesignationType enumeration.
014 * @see <a href="http://rs.gbif.org/vocabulary/gbif/type_status.xml">rs.gbif.org vocabulary</a>
015 * @see <a href="http://www.bgbm.org/TDWG/CODATA/Schema/ABCD_2.06/HTML/ABCD_2.06.html#element_NomenclaturalTypeDesignations_Link>Types in ABCD</a>
016 */
017public enum TypeStatus {
018
019  /**
020   * General type designation.
021   * A specimen designated or indicated any kind of type of a species or infraspecific taxon.
022   * If possible more specific type terms (holotype, syntype, etc.) should be applied.
023   *
024   * Or the type name of a name of higher rank for taxa above the species rank.
025   */
026  TYPE,
027
028  /**
029   * For designating a type record as a reference to type information tied to a genus
030   */
031  TYPE_SPECIES,
032
033  /**
034   * For designating a type record as a reference to type information tied to a Family
035   */
036  TYPE_GENUS,
037
038  /**
039   * A paralectotype specimen that is the opposite sex of the lectotype. The term is not regulated by the ICZN. [Zoo.]
040   */
041  ALLOLECTOTYPE,
042
043  /**
044   * A paraneotype specimen that is the opposite sex of the neotype. The term is not regulated by the ICZN. [Zoo.]
045   */
046  ALLONEOTYPE,
047
048  /**
049   * A paratype specimen designated from the type series by the original author that is the opposite sex of the holotype. The term is not regulated by the ICZN. [Zoo.]
050   */
051  ALLOTYPE,
052
053  /**
054   * A deprecated term no longer recognized in the ICZN; formerly used for either syntype or paratype [see ICZN Recommendation 73E]. [Zoo.]
055   */
056  COTYPE,
057
058  /**
059   * An epitype is a specimen or illustration selected to serve as an interpretative type when any kind of holotype, lectotype, etc. is demonstrably ambiguous and cannot be critically identified for purposes of the precise application of the name of a taxon (see Art. ICBN 9.7, 9.18). An epitype supplements, rather than replaces existing types. [Bot./Bio.]
060   */
061  EPITYPE,
062
063  /**
064   * A strain or cultivation derived from epitype material. Ex-types are not regulated by the botanical or zoological code. [Bot.]
065   */
066  EXEPITYPE,
067
068  /**
069   * A strain or cultivation derived from holotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
070   */
071  EXHOLOTYPE,
072
073  /**
074   * A strain or cultivation derived from isotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
075   */
076  EXISOTYPE,
077
078  /**
079   * A strain or cultivation derived from lectotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
080   */
081  EXLECTOTYPE,
082
083  /**
084   * A strain or cultivation derived from neotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
085   */
086  EXNEOTYPE,
087
088  /**
089   * A strain or cultivation derived from paratype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
090   */
091  EXPARATYPE,
092
093  /**
094   * A strain or cultivation derived from neotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
095   */
096  EXSYNTYPE,
097
098  /**
099   * A strain or cultivation derived from some kind of type material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
100   */
101  EXTYPE,
102
103  /**
104   * One or more preparations of directly related individuals representing distinct stages in the life cycle, which together form the type in an extant species of protistan [ICZN Article 72.5.4]. A hapantotype, while a series of individuals, is a holotype that must not be restricted by lectotype selection. If an hapantotype is found to contain individuals of more than one species, however, components may be excluded until it contains individuals of only one species [ICZN Article 73.3.2]. [Zoo.]
105   */
106  HAPANTOTYPE,
107
108  /**
109   * The one specimen or other element used or designated by the original author at the time of publication of the original description as the nomenclatural type of a species or infraspecific taxon. A holotype may be 'explicit' if it is clearly stated in the originating publication or 'implicit' if it is the single specimen proved to have been in the hands of the originating author when the description was published. [Zoo./Bot./Bio.]
110   */
111  HOLOTYPE,
112
113  /**
114   * A drawing or photograph (also called 'phototype') of a type specimen. Note: the term 'iconotype' is not used in the ICBN, but implicit in, e. g., ICBN Art. 7 and 38. [Zoo./Bot.]
115   */
116  ICONOTYPE,
117
118  /**
119   * A duplicate of a lectotype, compare lectotype. [Bot.]
120   */
121  ISOLECTOTYPE,
122
123  /**
124   * A duplicate of a neotype, compare neotype. [Bot.]
125   */
126  ISONEOTYPE,
127
128  /**
129   * A duplicate of a syntype, compare isotype = duplicate of holotype. [Bot.]
130   */
131  ISOSYNTYPE,
132
133  /**
134   * An isotype is any duplicate of the holotype (i. e. part of a single gathering made by a collector at one time, from which the holotype was derived); it is always a specimen (ICBN Art. 7). [Bot.]
135   */
136  ISOTYPE,
137
138  /**
139   * A specimen or other element designated subsequent to the publication of the original description from the original material (syntypes or paratypes) to serve as nomenclatural type. Lectotype designation can occur only where no holotype was designated at the time of publication or if it is missing (ICBN Art. 7, ICZN Art. 74). [Zoo./Bot.] -- Note: the BioCode defines lectotype as selection from holotype material in cases where the holotype material contains more than one taxon [Bio.].
140   */
141  LECTOTYPE,
142
143  /**
144   * A specimen designated as nomenclatural type subsequent to the publication of the original description in cases where the original holotype, lectotype, all paratypes and syntypes are lost or destroyed, or suppressed by the (botanical or zoological) commission on nomenclature. In zoology also called 'Standard specimen' or 'Representative specimen'. [Zoo./Bot./Bio.]
145   */
146  NEOTYPE,
147
148  /**
149   * For specimens erroneously labelled as types an explicit negative statement may be desirable. [General]
150   */
151  NOTATYPE,
152
153  /**
154   * 'type-suspicious' material. The term is in accordance with the Botanical Code, where it is used for material that has been at the disposal of an author describing a new species, and is distinct from a type only in the fact that either the Type has not been officially assigned yet, or that the specific material has not been explicitly cited in the typification process (i.e. it was part of the swarm of specimens examined in the process, but not labelled as type itself).
155   */
156  ORIGINALMATERIAL,
157
158  /**
159   * All of the specimens in the syntype series of a species or infraspecific taxon other than the lectotype itself. Also called 'lectoparatype'. [Zoo.]
160   */
161  PARALECTOTYPE,
162
163  /**
164   * All of the specimens in the syntype series of a species or infraspecific taxon other than the neotype itself. Also called 'neoparatype'. [Zoo.]
165   */
166  PARANEOTYPE,
167
168  /**
169   * All of the specimens in the type series of a species or infraspecific taxon other than the holotype (and, in botany, isotypes). Paratypes must have been at the disposition of the author at the time when the original description was created and must have been designated and indicated in the publication. Judgment must be exercised on paratype status, for only rarely are specimens explicitly cited as paratypes, but usually as 'specimens examined,' 'other material seen', etc. [Zoo./Bot.]
170   */
171  PARATYPE,
172
173  /**
174   * A copy or cast of holotype material (compare Plastotype).
175   */
176  PLASTOHOLOTYPE,
177
178  /**
179   * A copy or cast of isotype material (compare Plastotype).
180   */
181  PLASTOISOTYPE,
182
183  /**
184   * A copy or cast of lectotype material (compare Plastotype).
185   */
186  PLASTOLECTOTYPE,
187
188  /**
189   * A copy or cast of neotype material (compare Plastotype).
190   */
191  PLASTONEOTYPE,
192
193  /**
194   * A copy or cast of paratype material (compare Plastotype).
195   */
196  PLASTOPARATYPE,
197
198  /**
199   * A copy or cast of syntype material (compare Plastotype).
200   */
201  PLASTOSYNTYPE,
202
203  /**
204   * A copy or cast of type material, esp. relevant for fossil types. Not regulated by the botanical or zoological code (?). [Zoo./Bot.]
205   */
206  PLASTOTYPE,
207
208  /**
209   * A referred, described, measured or figured specimen in the original publication (including a neo/lectotypification publication) that is not a primary type. [Zoo.]
210   */
211  SECONDARYTYPE,
212
213  /**
214   * A referred, described, measured or figured specimen in a revision of a previously described taxon. [Zoo.]
215   */
216  SUPPLEMENTARYTYPE,
217
218  /**
219   * One of the series of specimens used to describe a species or infraspecific taxon when neither a single holotype nor a lectotype has been designated. The syntypes collectively constitute the name-bearing type. [Zoo./Bot.]
220   */
221  SYNTYPE,
222
223  /**
224   * One or more specimens collected at the same location as the type series (type locality), regardless of whether they are part of the type series. Topotypes are not regulated by the botanical or zoological code. Also called 'locotype'. [Zoo./Bot.]
225   */
226  TOPOTYPE;
227
228  /**
229   * @return a list of all type status values applicable for specimens.
230   */
231  public static List<TypeStatus> specimenTypeStatusList() {
232    return ImmutableList.copyOf(Collections2.filter(Lists.newArrayList(values()), new Predicate<TypeStatus>() {
233      @Override
234      public boolean apply(@Nullable TypeStatus status) {
235        return status.isTypeSpecimen();
236      }
237    }));
238  }
239
240  /**
241   * @return a list of all type status values applicable for scientific names, not specimens.
242   */
243  public static List<TypeStatus> nameTypeStatusList() {
244    return ImmutableList.copyOf(Collections2.filter(Lists.newArrayList(values()), new Predicate<TypeStatus>() {
245      @Override
246      public boolean apply(@Nullable TypeStatus status) {
247        return TypeStatus.TYPE == status || !status.isTypeSpecimen();
248      }
249    }));
250  }
251
252  /**
253   * @return true if the type status is referring to a type specimen in contrast to a type genus or species name
254   */
255  public boolean isTypeSpecimen() {
256    return this != TYPE_GENUS && this != TYPE_SPECIES;
257  }
258
259}