001package org.gbif.api.model.occurrence;
002
003/**
004 * Custom functions supported by the SQL download API.
005 */
006public enum SqlDownloadFunction {
007  // Builtin function used in classification queries, not known by Calcite.
008  ARRAYS_OVERLAP("ARRAYS_OVERLAP"),
009  ARRAYS_AGG("ARRAYS_AGG"),
010
011  // GBIF custom functions
012  DEGREE_MINUTE_SECOND_GRID_CELL_CODE("GBIF_DMSGCode"),
013  EEA_CELL_CODE("GBIF_EEARGCode"),
014  EUROSTAT_CELL_CODE("GBIF_EuroStatCode"),
015  ISEA3H_CELL_CODE("GBIF_ISEA3HCode"),
016  MILITARY_GRID_REFERENCE_SYSTEM_CELL_CODE("GBIF_MGRSCode"),
017  EXTENDED_QUARTER_DEGREE_GRID_CELL_CODE("GBIF_EQDGCode"),
018  TEMPORAL_UNCERTAINTY("GBIF_TemporalUncertainty"),
019  GEO_DISTANCE("GBIF_GeoDistance"),
020  MILLISECONDS_TO_ISO8601("GBIF_MillisecondsToISO8601"),
021  SECONDS_TO_ISO8601("GBIF_SecondsToISO8601"),
022  SECONDS_TO_LOCAL_ISO8601("GBIF_SecondsToLocalISO8601"),
023  CONTAINS("GBIF_Within"),
024  STRING_ARRAY_CONTAINS_GENERIC("GBIF_StringArrayContains"),
025  STRING_ARRAY_LIKE_GENERIC("GBIF_StringArrayLike");
026
027  private final String sqlIdentifier;
028
029  SqlDownloadFunction(String sqlIdentifier) {
030    this.sqlIdentifier = sqlIdentifier;
031  }
032
033  public String getSqlIdentifier() {
034    return sqlIdentifier;
035  }
036}