001/*
002 * Copyright 2020 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.vocabulary;
017
018import java.util.Collections;
019import java.util.List;
020import java.util.stream.Collectors;
021import java.util.stream.Stream;
022
023/**
024 * A vocabulary to be used for a nomenclatural type status of a specimen or name.
025 * See also the related TypeDesignationType enumeration.
026 * @see <a href="http://rs.gbif.org/vocabulary/gbif/type_status_2021-01-18.xml">rs.gbif.org vocabulary</a>
027 * @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>
028 */
029@Deprecated
030public enum TypeStatus {
031
032  /**
033   * General type designation.
034   * A specimen designated or indicated any kind of type of a species or infraspecific taxon.
035   * If possible more specific type terms (holotype, syntype, etc.) should be applied.
036   *
037   * Or the type name of a name of higher rank for taxa above the species rank.
038   */
039  TYPE,
040
041  /**
042   * For designating a type record as a reference to type information tied to a genus
043   */
044  TYPE_SPECIES,
045
046  /**
047   * For designating a type record as a reference to type information tied to a Family
048   */
049  TYPE_GENUS,
050
051  /**
052   * A paralectotype specimen that is the opposite sex of the lectotype. The term is not regulated by the ICZN. [Zoo.]
053   */
054  ALLOLECTOTYPE,
055
056  /**
057   * A paraneotype specimen that is the opposite sex of the neotype. The term is not regulated by the ICZN. [Zoo.]
058   */
059  ALLONEOTYPE,
060
061  /**
062   * 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.]
063   */
064  ALLOTYPE,
065
066  /**
067   * A deprecated term no longer recognized in the ICZN; formerly used for either syntype or paratype [see ICZN Recommendation 73E]. [Zoo.]
068   */
069  COTYPE,
070
071  /**
072   * 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.]
073   */
074  EPITYPE,
075
076  /**
077   * A strain or cultivation derived from epitype material. Ex-types are not regulated by the botanical or zoological code. [Bot.]
078   */
079  EXEPITYPE,
080
081  /**
082   * A strain or cultivation derived from holotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
083   */
084  EXHOLOTYPE,
085
086  /**
087   * A strain or cultivation derived from isotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
088   */
089  EXISOTYPE,
090
091  /**
092   * A strain or cultivation derived from lectotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
093   */
094  EXLECTOTYPE,
095
096  /**
097   * A strain or cultivation derived from neotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
098   */
099  EXNEOTYPE,
100
101  /**
102   * A strain or cultivation derived from paratype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
103   */
104  EXPARATYPE,
105
106  /**
107   * A strain or cultivation derived from neotype material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
108   */
109  EXSYNTYPE,
110
111  /**
112   * A strain or cultivation derived from some kind of type material. Ex-types are not regulated by the botanical or zoological code. [Zoo./Bot.]
113   */
114  EXTYPE,
115
116  /**
117   * 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.]
118   */
119  HAPANTOTYPE,
120
121  /**
122   * 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.]
123   */
124  HOLOTYPE,
125
126  /**
127   * A specimen that was not part of the original type series of the species, but is known from a published description, figure, or listing.
128   */
129  HYPOTYPE,
130
131  /**
132   * 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.]
133   */
134  ICONOTYPE,
135
136  /**
137   * A duplicate of a lectotype, compare lectotype. [Bot.]
138   */
139  ISOLECTOTYPE,
140
141  /**
142   * A duplicate of a neotype, compare neotype. [Bot.]
143   */
144  ISONEOTYPE,
145
146  /**
147   *  A duplicate of a paratype, compare paratype. [Bot.]
148   */
149  ISOPARATYPE,
150
151  /**
152   * A duplicate of a syntype, compare isotype = duplicate of holotype. [Bot.]
153   */
154  ISOSYNTYPE,
155
156  /**
157   * 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.]
158   */
159  ISOTYPE,
160
161  /**
162   * 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.].
163   */
164  LECTOTYPE,
165
166  /**
167   * 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.]
168   */
169  NEOTYPE,
170
171  /**
172   * For specimens erroneously labelled as types an explicit negative statement may be desirable. [General]
173   */
174  NOTATYPE,
175
176  /**
177   * '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).
178   */
179  ORIGINALMATERIAL,
180
181  /**
182   * All of the specimens in the syntype series of a species or infraspecific taxon other than the lectotype itself. Also called 'lectoparatype'. [Zoo.]
183   */
184  PARALECTOTYPE,
185
186  /**
187   * All of the specimens in the syntype series of a species or infraspecific taxon other than the neotype itself. Also called 'neoparatype'. [Zoo.]
188   */
189  PARANEOTYPE,
190
191  /**
192   * 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.]
193   */
194  PARATYPE,
195
196  /**
197   * A copy or cast of holotype material (compare Plastotype).
198   */
199  PLASTOHOLOTYPE,
200
201  /**
202   * A copy or cast of isotype material (compare Plastotype).
203   */
204  PLASTOISOTYPE,
205
206  /**
207   * A copy or cast of lectotype material (compare Plastotype).
208   */
209  PLASTOLECTOTYPE,
210
211  /**
212   * A copy or cast of neotype material (compare Plastotype).
213   */
214  PLASTONEOTYPE,
215
216  /**
217   * A copy or cast of paratype material (compare Plastotype).
218   */
219  PLASTOPARATYPE,
220
221  /**
222   * A copy or cast of syntype material (compare Plastotype).
223   */
224  PLASTOSYNTYPE,
225
226  /**
227   * A copy or cast of type material, esp. relevant for fossil types. Not regulated by the botanical or zoological code (?). [Zoo./Bot.]
228   */
229  PLASTOTYPE,
230
231  /**
232   * A specimen that is both a homeotype and a hypotype.
233   */
234  PLESIOTYPE,
235
236  /**
237   * A referred, described, measured or figured specimen in the original publication (including a neo/lectotypification publication) that is not a primary type. [Zoo.]
238   */
239  SECONDARYTYPE,
240
241  /**
242   * A referred, described, measured or figured specimen in a revision of a previously described taxon. [Zoo.]
243   */
244  SUPPLEMENTARYTYPE,
245
246  /**
247   * 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.]
248   */
249  SYNTYPE,
250
251  /**
252   * 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.]
253   */
254  TOPOTYPE;
255
256  /**
257   * @return a list of all type status values applicable for specimens.
258   */
259  public static List<TypeStatus> specimenTypeStatusList() {
260    return Collections.unmodifiableList(
261      Stream.of(values())
262        .filter(TypeStatus::isTypeSpecimen)
263        .collect(Collectors.toList()));
264  }
265
266  /**
267   * @return a list of all type status values applicable for scientific names, not specimens.
268   */
269  public static List<TypeStatus> nameTypeStatusList() {
270    return Collections.unmodifiableList(
271      Stream.of(values())
272        .filter(status -> TypeStatus.TYPE == status || !status.isTypeSpecimen())
273        .collect(Collectors.toList())
274    );
275  }
276
277  /**
278   * @return true if the type status is referring to a type specimen in contrast to a type genus or species name
279   */
280  public boolean isTypeSpecimen() {
281    return this != TYPE_GENUS && this != TYPE_SPECIES;
282  }
283
284}