001/*
002 * Licensed under the Apache License, Version 2.0 (the "License");
003 * you may not use this file except in compliance with the License.
004 * You may obtain a copy of the License at
005 *
006 *     http://www.apache.org/licenses/LICENSE-2.0
007 *
008 * Unless required by applicable law or agreed to in writing, software
009 * distributed under the License is distributed on an "AS IS" BASIS,
010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
011 * See the License for the specific language governing permissions and
012 * limitations under the License.
013 */
014package org.gbif.api.model.occurrence.search;
015
016import org.gbif.api.model.common.search.SearchParameter;
017import org.gbif.api.util.IsoDateInterval;
018import org.gbif.api.vocabulary.BasisOfRecord;
019import org.gbif.api.vocabulary.Continent;
020import org.gbif.api.vocabulary.Country;
021import org.gbif.api.vocabulary.EndpointType;
022import org.gbif.api.vocabulary.GbifRegion;
023import org.gbif.api.vocabulary.License;
024import org.gbif.api.vocabulary.MediaType;
025import org.gbif.api.vocabulary.OccurrenceIssue;
026import org.gbif.api.vocabulary.OccurrenceStatus;
027import org.gbif.api.vocabulary.Sex;
028import org.gbif.api.vocabulary.TaxonomicStatus;
029import org.gbif.api.vocabulary.TypeStatus;
030
031import java.util.Date;
032import java.util.UUID;
033
034/**
035 * Supported query parameters by the occurrence search and download service.
036 * For download predicates only the numerical types support comparisons other than equals.
037 */
038public enum OccurrenceSearchParameter implements SearchParameter {
039
040  /**
041   * The dataset key as a UUID.
042   */
043  DATASET_KEY(UUID.class),
044
045  /**
046   * The 4 digit year. A year of 98 will be 98 common era, not 1998.
047   * This parameter accepts comma separated range values, e.g.:
048   * <dl>
049   * <dt>*,1810</dt>
050   * <dd>Found before or equal to 1810</dd>
051   * <dt>1848,1933</dt>
052   * <dd>Year between 1848 and 1933</dd>
053   * </dl>
054   */
055  YEAR(Integer.class),
056
057  /**
058   * The month of the year, starting with 1 for January.
059   * A month query can be used to retrieve seasonal records when used without a year or a year range.
060   * This parameter accepts comma separated range values, e.g.:
061   * <dl>
062   * <dt>4,8</dt>
063   * <dd>Month between April and August</dd>
064   * </dl>
065   */
066  MONTH(Integer.class),
067
068  /**
069   * The earliest integer day of the year on which the event occurred (1 for January 1, 365 for December 31, except in a
070   * leap year, in which case it is 366).
071   */
072  START_DAY_OF_YEAR(Integer.class),
073
074  /**
075   * The latest integer day of the year on which the event occurred (1 for January 1, 365 for December 31, except in a
076   * leap year, in which case it is 366).
077   */
078  END_DAY_OF_YEAR(Integer.class),
079
080  /**
081   * Event date (date the occurrence was recorded) in ISO 8601 formats:yyyy, yyyy-MM, yyyy-MM-dd and MM-dd.
082   * This parameter accepts comma separated range values, examples of valid ranges are:
083   * <dl>
084   * <dt>2001-02-11,2010-01-10</dt>
085   * <dd>Dates between 2001-02-11 and 2010-01-10</dd>
086   * <dt>2001-02,2010-01</dt>
087   * <dd>Dates between first day of 2001-02 and last day of 2010-01</dd>
088   * <dt>2001,2010</dt>
089   * <dd>Dates between first day of 2001 and last day of 2010</dd>
090   * <dt>2001,2010-01</dt>
091   * <dd>Dates between first day of 2001 and last day of 2010-01</dd>
092   * <dt>2001-01-10,2010</dt>
093   * <dd>Dates between 2001-01-10 and last day of 2010</dd>
094   * <dt>2001-01-10,*</dt>
095   * <dd>Dates after 2001-01-10</dd>
096   * <dt>*,2001-01-10</dt>
097   * <dd>Dates before 2001-01-10</dd>
098   * <dt>*</dt>
099   * <dd>all dates</dd>
100   * </dl>
101   */
102  EVENT_DATE(IsoDateInterval.class),
103
104  /**
105   * An identifier for the set of information associated with an Event (something that occurs at a place and time).
106   * Maybe a global unique identifier or an identifier specific to the data set.
107   */
108  EVENT_ID(String.class),
109
110  /**
111   * An identifier for the broader Event that groups this and potentially other Events.
112   */
113  PARENT_EVENT_ID(String.class),
114
115  /**
116   * The name of, reference to, or description of the method or protocol used during an Event.
117   */
118  SAMPLING_PROTOCOL(String.class),
119
120  /**
121   * A list (concatenated and separated) of previous assignments of names to the organism.
122   */
123  PREVIOUS_IDENTIFICATIONS(String.class),
124
125  /**
126   * Last interpreted date in ISO 8601 formats:yyyy, yyyy-MM, yyyy-MM-dd and MM-dd.
127   * This parameter accepts comma separated range values, examples of valid ranges are:
128   * <dl>
129   * <dt>2001-02-11,2010-01-10</dt>
130   * <dd>Dates between 2001-02-11 and 2010-01-10</dd>
131   * <dt>2001-02,2010-01</dt>
132   * <dd>Dates between first day of 2001-02 and last day of 2010-01</dd>
133   * <dt>2001,2010</dt>
134   * <dd>Dates between first day of 2001 and last day of 2010</dd>
135   * <dt>2001,2010-01</dt>
136   * <dd>Dates between first day of 2001 and last day of 2010-01</dd>
137   * <dt>2001-01-10,2010</dt>
138   * <dd>Dates between 2001-01-10 and last day of 2010</dd>
139   * <dt>2001-01-10,*</dt>
140   * <dd>Dates after 2001-01-10</dd>
141   * <dt>*,2001-01-10</dt>
142   * <dd>Dates before 2001-01-10</dd>
143   * <dt>*</dt>
144   * <dd>all dates</dd>
145   * </dl>
146   */
147  LAST_INTERPRETED(Date.class),
148
149
150  /**
151   * Modified date in ISO 8601 formats:yyyy, yyyy-MM, yyyy-MM-dd and MM-dd.
152   * This parameter accepts comma separated range values, examples of valid ranges are:
153   * <dl>
154   * <dt>2001-02-11,2010-01-10</dt>
155   * <dd>Dates between 2001-02-11 and 2010-01-10</dd>
156   * <dt>2001-02,2010-01</dt>
157   * <dd>Dates between first day of 2001-02 and last day of 2010-01</dd>
158   * <dt>2001,2010</dt>
159   * <dd>Dates between first day of 2001 and last day of 2010</dd>
160   * <dt>2001,2010-01</dt>
161   * <dd>Dates between first day of 2001 and last day of 2010-01</dd>
162   * <dt>2001-01-10,2010</dt>
163   * <dd>Dates between 2001-01-10 and last day of 2010</dd>
164   * <dt>2001-01-10,*</dt>
165   * <dd>Dates after 2001-01-10</dd>
166   * <dt>*,2001-01-10</dt>
167   * <dd>Dates before 2001-01-10</dd>
168   * <dt>*</dt>
169   * <dd>all dates</dd>
170   * </dl>
171   */
172  MODIFIED(Date.class),
173
174  /**
175   * Latitude in decimals between -90 and 90 based on WGS 84.
176   */
177  DECIMAL_LATITUDE(Double.class),
178
179  /**
180   * Longitude in decimals between -180 and 180 based on WGS 84.
181   */
182  DECIMAL_LONGITUDE(Double.class),
183
184  /**
185   * The uncertainty of the coordinate in meters.
186   * This parameter accepts comma separated range values, e.g.:
187   * <dl>
188   * <dt>*,100</dt>
189   * <dd>Uncertainty below or equals 100m</dd>
190   * <dt>10000,*</dt>
191   * <dd>Uncertainty above or equals 10,000m</dd>
192   * <dt>1000,5000</dt>
193   * <dd>Uncertainty between or equals 1000m and 5000m
194   * </dd>
195   * </dl>
196   */
197  COORDINATE_UNCERTAINTY_IN_METERS(Double.class),
198
199  /**
200   * Country the occurrence was recorded in.
201   */
202  COUNTRY(Country.class),
203
204  /**
205   * GBIF region based on country
206   */
207  GBIF_REGION(GbifRegion.class),
208
209  /**
210   * Continent the occurrence was recorded in.
211   */
212  CONTINENT(Continent.class),
213
214  /**
215   * The country of the organization that publishes the dataset the occurrence belongs to.
216   */
217  PUBLISHING_COUNTRY(Country.class),
218
219  /**
220   * GBIF region based on publishibg country
221   */
222  PUBLISHED_BY_GBIF_REGION(GbifRegion.class),
223
224  /**
225   * Altitude/elevation in meters above sea level.
226   * This parameter accepts comma separated range values, e.g.:
227   * <dl>
228   * <dt>*,100</dt>
229   * <dd>Altitude below or equals 100m</dd>
230   * <dt>100,*</dt>
231   * <dd>Altitude above or equals 100m</dd>
232   * <dt>-2,8.8</dt>
233   * <dd>Altitude between or equals -2m and 8.8m</dd>
234   * </dl>
235   */
236  ELEVATION(Double.class),
237
238  /**
239   * Depth in meters relative to altitude. For example 10 meters below a lake surface with given altitude.
240   * This parameter accepts comma separated range values, e.g.:
241   * <dl>
242   * <dt>*,10</dt>
243   * <dd>Depth below or equals 10m</dd>
244   * <dt>100,*</dt>
245   * <dd>Depth above or equals 100m</dd>
246   * <dt>12.1,28.8</dt>
247   * <dd>Depth between or equals 12.1m and 28.8m</dd>
248   * </dl>
249   */
250  DEPTH(Double.class),
251
252  /**
253   * An identifier of any form assigned by the source to identify the institution
254   * the record belongs to. Not guaranteed to be unique.
255   */
256  INSTITUTION_CODE(String.class),
257
258  /**
259   * An identifier of any form assigned by the source to identify the physical collection or digital dataset
260   * uniquely within the context of an institution.
261   */
262  COLLECTION_CODE(String.class),
263
264  /**
265   * An identifier of any form assigned by the source within a physical collection or digital dataset for the record
266   * which may not be unique, but should be fairly unique in combination with the institution and collection code.
267   */
268  CATALOG_NUMBER(String.class),
269
270  /**
271   * The person who recorded the occurrence.
272   */
273  RECORDED_BY(String.class),
274
275  /**
276   * The person who identified the occurrence.
277   */
278  IDENTIFIED_BY(String.class),
279
280  /**
281   * An identifier given to the Occurrence at the time it was recorded.
282   */
283  RECORD_NUMBER(String.class),
284
285  /**
286   * A basis of record enumeration value.
287   */
288  BASIS_OF_RECORD(BasisOfRecord.class),
289
290  /**
291   * The sex of the biological individual(s) represented in the occurrence.
292   */
293  SEX(Sex.class),
294
295  /**
296   * Presents of associated sequences or an extension
297   */
298  IS_SEQUENCED(Boolean.class),
299
300  /**
301   * A taxon key from the GBIF backbone. All included and synonym taxa are included in the search, so a search for
302   * aves with taxonKey=212 will match all birds, no matter which species.
303   */
304  TAXON_KEY(Integer.class),
305
306  /**
307   * A taxon key from the GBIF backbone for the name usage of the currently valid or accepted taxon.
308   */
309  ACCEPTED_TAXON_KEY(Integer.class),
310
311  /**
312   * A kingdom key from the GBIF backbone.
313   */
314  KINGDOM_KEY(Integer.class),
315
316  /**
317   * A phylum key from the GBIF backbone.
318   */
319  PHYLUM_KEY(Integer.class),
320
321  /**
322   * A class key from the GBIF backbone.
323   */
324  CLASS_KEY(Integer.class),
325
326  /**
327   * A order key from the GBIF backbone.
328   */
329  ORDER_KEY(Integer.class),
330
331  /**
332   * A family key from the GBIF backbone.
333   */
334  FAMILY_KEY(Integer.class),
335
336  /**
337   * A genus key from the GBIF backbone.
338   */
339  GENUS_KEY(Integer.class),
340
341  /**
342   * A subgenus key from the GBIF backbone.
343   */
344  SUBGENUS_KEY(Integer.class),
345
346  /**
347   * A species key from the GBIF backbone.
348   */
349  SPECIES_KEY(Integer.class),
350
351  /**
352   * Searches the interpreted, full scientific name of the occurrence.
353   */
354  SCIENTIFIC_NAME(String.class),
355
356  /**
357   * Scientific name as provided byt the source.
358   */
359  VERBATIM_SCIENTIFIC_NAME(String.class),
360
361  /**
362   * Verbatim identifier for the set of taxon information. Maybe a global unique identifier or an identifier specific to
363   * the data set.
364   */
365  TAXON_ID(String.class),
366
367  /**
368   * An identifier for the taxonomic concept to which the record refers - not for the nomenclatural details of a taxon.
369   */
370  TAXON_CONCEPT_ID(String.class),
371
372  /**
373   * The status of the use of the  GBIF Backbone taxonKey.
374   */
375  TAXONOMIC_STATUS(TaxonomicStatus.class),
376
377  /**
378   * Searches for occurrence records which contain a value on its coordinate fields (latitude and longitude).
379   * HAS_COORDINATE=true searches for occurrence records with a coordinate value.
380   * HAS_COORDINATE=false searches for occurrence records without a coordinate value.
381   */
382  HAS_COORDINATE(Boolean.class),
383
384  /**
385   * Geometry in <a href="https://en.wikipedia.org/wiki/Well-known_text">Well Known Text</a> (WKT) format.
386   * E.g.: POLYGON ((30.0 10.0, 10.12 20.23, 20 40, 40 40, 30 10)).
387   * Multi geometries like MULTIPOLYGON are not supported and multiple parameters should be used instead.
388   * Valid geometries are:
389   * <ul>
390   * <li>POINT</li>
391   * <li>LINESTRING</li>
392   * <li>POLYGON</li>
393   * <li>LINEARRING</li>
394   * </ul>
395   */
396  GEOMETRY(String.class),
397
398  /**
399   * Use in combination of LATITUDE and LONGITUDE parameters matches within a given distance.
400   * E.g.: geo_distance=100m,40,90 geo_distance=100km,40,90 geo_distance=100mi,40,90.
401   * See supported units in {@link org.gbif.api.model.occurrence.geo.DistanceUnit}.
402   */
403  GEO_DISTANCE(String.class),
404
405  /**
406   * The distance from a known centroid, e.g. a country centroid.
407   */
408  DISTANCE_FROM_CENTROID_IN_METERS(Double.class),
409
410  /**
411   * Includes/excludes occurrence records which contain geospatial issues for their coordinate.
412   * See {@link org.gbif.api.vocabulary.OccurrenceIssue#GEOSPATIAL_RULES}
413   * HAS_GEOSPATIAL_ISSUE=true include records with spatial issues.
414   * HAS_GEOSPATIAL_ISSUE=false exclude records with spatial issues.
415   * The absence of this parameter returns any record with or without spatial issues.
416   */
417  HAS_GEOSPATIAL_ISSUE(Boolean.class),
418
419  /**
420   * Searches occurrence for those that have a specific issue.
421   */
422  ISSUE(OccurrenceIssue.class),
423
424  /**
425   * Nomenclatural type (type status, typified scientific name, publication) applied to the subject.
426   */
427  TYPE_STATUS(TypeStatus.class),
428
429  /**
430   * The kind of media object.
431   * Recommended terms from the DCMI Type Vocabulary are StillImage, Sound or MovingImage for GBIF to index and show the
432   * media files.
433   */
434  MEDIA_TYPE(MediaType.class),
435
436  /**
437   *  An identifier for the Occurrence (as opposed to a particular digital record of the occurrence).
438   *  In the absence of a persistent global unique identifier, construct one from a combination of identifiers in the
439   *  record that will most closely make the occurrenceID globally unique.
440   */
441  OCCURRENCE_ID(String.class),
442
443  /**
444   * The process by which the biological individual(s) represented in the Occurrence became established at the location.
445   */
446  ESTABLISHMENT_MEANS(String.class),
447
448  /**
449   * Provides the controlled vocabulary for information about degree to which an Organism survives, reproduces, and expands its range at the given place and time.
450   */
451  DEGREE_OF_ESTABLISHMENT(String.class),
452
453  /**
454   * Provides the controlled vocabulary for information about the process by which an Organism came to be in a given place at a given time.
455   * The pathway of an organism or organisms have been introduced to a given place and time.
456   */
457  PATHWAY(String.class),
458
459  /**
460   * Searches for records whose publishing country is different to the country where the record was recorded in.
461   */
462  REPATRIATED(Boolean.class),
463
464  /**
465   * An identifier for the Organism instance (as opposed to a particular digital record of the Organism).
466   * May be a globally unique identifier or an identifier specific to the data set.
467   */
468  ORGANISM_ID(String.class),
469
470  /**
471   * The name of the next smaller administrative region than country in which the Location occurs.
472   */
473  STATE_PROVINCE(String.class),
474
475  /**
476   * The name of the water body in which the Location occurs.
477   */
478  WATER_BODY(String.class),
479
480  /**
481   * The specific description of the place.
482   * It may contain information modified from the original to correct perceived errors or standardize the description.
483   */
484  LOCALITY(String.class),
485
486  /**
487   * Protocol used to provide the occurrence record.
488   */
489  PROTOCOL(EndpointType.class),
490
491  /**
492   * The license applied to the dataset.
493   */
494  LICENSE(License.class),
495
496  /**
497   * The owning organizations uuid key.
498   */
499  PUBLISHING_ORG(UUID.class),
500
501  /**
502   * The GBIF network that the publishing organisation belongs to.
503   */
504  NETWORK_KEY(UUID.class),
505
506  /**
507   * The technical installation key that hosts/publishes this record.
508   */
509  INSTALLATION_KEY(UUID.class),
510
511  /**
512   * The organization key of the installation that hosts this record.
513   */
514  HOSTING_ORGANIZATION_KEY(UUID.class),
515
516  /**
517   * Crawl attempt that harvested this record.
518   */
519  CRAWL_ID(Integer.class),
520
521  /**
522   * GBIF ProjectId.
523   */
524  PROJECT_ID(String.class),
525
526  /**
527   * GBIF Programme Acronym.
528   */
529  PROGRAMME(String.class),
530
531  /**
532   * A number or enumeration value for the quantity of organisms.
533   */
534  ORGANISM_QUANTITY(Double.class),
535
536  /**
537   * The type of quantification system used for the quantity of organisms.
538   */
539  ORGANISM_QUANTITY_TYPE(String.class),
540
541  /**
542   * The unit of measurement of the size (time duration, length, area, or volume) of a sample in a sampling event.
543   */
544  SAMPLE_SIZE_UNIT(String.class),
545
546  /**
547   * A numeric value for a measurement of the size (time duration, length, area, or volume) of a sample in a sampling event.
548   */
549  SAMPLE_SIZE_VALUE(Double.class),
550
551  /**
552   * Calculated organismQuantity relative to the sampleSizeValue i.e. -> organismQuantity / sampleSizeValue.
553   */
554  RELATIVE_ORGANISM_QUANTITY(Double.class),
555
556  /**
557   * Collection key. It links to the collection to which this record belongs.
558   */
559  COLLECTION_KEY(String.class),
560
561  /**
562   * Institution key. It links to the institution that maintains, recorded or digitized  this record.
563   */
564  INSTITUTION_KEY(String.class),
565
566  /**
567   * Agent identifiers from GbifTerm.recordedByID
568   */
569  RECORDED_BY_ID(String.class),
570
571  /**
572   * Agent identifiers from GbifTerm.identifiedByID
573   */
574  IDENTIFIED_BY_ID(String.class),
575
576  /**
577   * An occurrence status enumeration value.
578   */
579  OCCURRENCE_STATUS(OccurrenceStatus.class),
580
581  /**
582   * A <a href="https://gadm.org">GADM</a> identifier at any level.
583   */
584  GADM_GID(String.class),
585
586  /**
587   * A <a href="https://gadm.org">GADM</a> country, island or territory (level zero) identifier.
588   */
589  GADM_LEVEL_0_GID(String.class),
590
591  /**
592   * A <a href="https://gadm.org">GADM</a> first-level identifier.
593   */
594  GADM_LEVEL_1_GID(String.class),
595
596  /**
597   * A <a href="https://gadm.org">GADM</a> second-level identifier.
598   */
599  GADM_LEVEL_2_GID(String.class),
600
601  /**
602   * A <a href="https://gadm.org">GADM</a> third-level identifier.
603   */
604  GADM_LEVEL_3_GID(String.class),
605
606  /**
607   * The life stage of an occurrence.
608   */
609  LIFE_STAGE(String.class),
610
611  /**
612   * Searches for occurrences that are clustered.
613   */
614  IS_IN_CLUSTER(Boolean.class),
615
616  /**
617   * Searches for occurrences that have a particular DwC-A extension.
618   */
619  DWCA_EXTENSION(String.class),
620
621  /**
622   * Searches for occurrences that have a IUCN Red List Category.
623   */
624  IUCN_RED_LIST_CATEGORY(String.class),
625
626  /**
627   * The dwc dataset id.
628   */
629  DATASET_ID(String.class),
630
631  /**
632   * The dwc dataset name.
633   */
634  DATASET_NAME(String.class),
635
636  /**
637   * Other catalog numbers associated to an occurrence.
638   */
639  OTHER_CATALOG_NUMBERS(String.class),
640
641  /**
642   * Preparations methods of an occurrence.
643   */
644  PREPARATIONS(String.class),
645
646  /**
647   * The name of the island on or near which the location occurs.
648   */
649  ISLAND(String.class),
650
651  /**
652   * The name of the island group in which the location occurs.
653   */
654  ISLAND_GROUP(String.class),
655
656  /**
657   * A list (concatenated and separated) of names of people, groups, or organizations who determined the georeference
658   * (spatial representation) for the location.
659   */
660  GEOREFERENCED_BY(String.class),
661
662  /**
663   * A list (concatenated and separated) of geographic names less specific than the information captured in the locality
664   * term.
665   */
666  HIGHER_GEOGRAPHY(String.class),
667
668  /**
669   *    An identifier given to the event in the field. Often serves as a link between field notes and the event.
670   */
671  FIELD_NUMBER(String.class),
672
673  /**
674   * The full name of the earliest possible geochronologic eon or lowest chrono-stratigraphic eonothem or the informal
675   * name ("Precambrian") attributable to the stratigraphic horizon from which the MaterialEntity was collected.
676   */
677  EARLIEST_EON_OR_LOWEST_EONOTHEM(String.class),
678
679  /**
680   * The full name of the latest possible geochronologic eon or highest chrono-stratigraphic eonothem or the informal
681   * name ("Precambrian") attributable to the stratigraphic horizon from which the MaterialEntity was collected.
682   */
683  LATEST_EON_OR_HIGHEST_EONOTHEM(String.class),
684
685  /**
686   * The full name of the earliest possible geochronologic era or lowest chronostratigraphic erathem attributable to the
687   * stratigraphic horizon from which the MaterialEntity was collected.
688   */
689  EARLIEST_ERA_OR_LOWEST_ERATHEM(String.class),
690
691  /**
692   * The full name of the latest possible geochronologic era or highest chronostratigraphic erathem attributable to the
693   * stratigraphic horizon from which the MaterialEntity was collected.
694   */
695  LATEST_ERA_OR_HIGHEST_ERATHEM(String.class),
696
697  /**
698   * The full name of the earliest possible geochronologic period or lowest chronostratigraphic system attributable to
699   * the stratigraphic horizon from which the MaterialEntity was collected.
700   */
701  EARLIEST_PERIOD_OR_LOWEST_SYSTEM(String.class),
702
703  /**
704   * The full name of the latest possible geochronologic period or highest chronostratigraphic system attributable to
705   * the stratigraphic horizon from which the MaterialEntity was collected.
706   */
707  LATEST_PERIOD_OR_HIGHEST_SYSTEM(String.class),
708
709  /**
710   * The full name of the earliest possible geochronologic epoch or lowest chronostratigraphic series attributable to
711   * the stratigraphic horizon from which the MaterialEntity was collected.
712   */
713  EARLIEST_EPOCH_OR_LOWEST_SERIES(String.class),
714
715  /**
716   * The full name of the latest possible geochronologic epoch or highest chronostratigraphic series attributable to the
717   * stratigraphic horizon from which the MaterialEntity was collected.
718   */
719  LATEST_EPOCH_OR_HIGHEST_SERIES(String.class),
720
721  /**
722   * The full name of the earliest possible geochronologic age or lowest chronostratigraphic stage attributable to the
723   * stratigraphic horizon from which the MaterialEntity was collected.
724   */
725  EARLIEST_AGE_OR_LOWEST_STAGE(String.class),
726
727  /**
728   * The full name of the latest possible geochronologic age or highest chronostratigraphic stage attributable to the
729   * stratigraphic horizon from which the MaterialEntity was collected.
730   */
731  LATEST_AGE_OR_HIGHEST_STAGE(String.class),
732
733  /**
734   * The full name of the lowest possible geological biostratigraphic zone of the stratigraphic horizon from which the
735   * MaterialEntity was collected.
736   */
737  LOWEST_BIOSTRATIGRAPHIC_ZONE(String.class),
738
739  /**
740   * The full name of the highest possible geological biostratigraphic zone of the stratigraphic horizon from which the
741   * MaterialEntity was collected.
742   */
743  HIGHEST_BIOSTRATIGRAPHIC_ZONE(String.class),
744
745  /**
746   * The full name of the lithostratigraphic group from which the MaterialEntity was collected.
747   */
748  GROUP(String.class),
749
750  /**
751   * The full name of the lithostratigraphic formation from which the MaterialEntity was collected.
752   */
753  FORMATION(String.class),
754
755  /**
756   * The full name of the lithostratigraphic member from which the MaterialEntity was collected.
757   */
758  MEMBER(String.class),
759
760  /**
761   * The full name of the lithostratigraphic bed from which the MaterialEntity was collected.
762   */
763  BED(String.class),
764
765  /**
766   * A list (concatenated and separated) of identifiers (publication, global unique identifier, URI) of
767   * genetic sequence information associated with the material entity.
768   */
769  ASSOCIATED_SEQUENCES(String.class),
770
771  /**
772   * Unique GBIF key for the occurrence.
773   */
774  GBIF_ID(String.class);
775
776  private final Class<?> type;
777
778  OccurrenceSearchParameter(Class<?> type) {
779    this.type = type;
780  }
781
782  /**
783   * @return the data type expected for the value of the respective search parameter
784   */
785  @Override
786  public Class<?> type() {
787    return type;
788  }
789}