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.model.occurrence;
017
018/**
019 * Download output requested format.
020 */
021public enum DownloadFormat {
022  /**
023   * Darwin Core Archive file that is a zip of all indexed fields in both verbatim and interpreted, plus multimedia and metadata files.
024   */
025  DWCA(".zip"),
026
027  /**
028   * Zipped text file of the most common indexed terms, but note that it is delimited by tabs, not commas.
029   */
030  SIMPLE_CSV(".zip"),
031
032  /**
033   * Avro (with Deflate compression codec) format export of the most common indexed terms.
034   */
035  SIMPLE_AVRO(".avro"),
036
037  /**
038   * Avro (with Deflate compression codec) format export of the most common indexed terms, plus many verbatim terms.
039   *
040   * More verbatim terms may be added upon request.
041   */
042  SIMPLE_WITH_VERBATIM_AVRO(".avro"),
043
044  /**
045   * TSV format export of the distinct species and taxonomic field associated to each.
046   */
047  SPECIES_LIST(".zip"),
048
049  /**
050   * Special Avro format for the <a href="https://mol.org/">Map of Life</a> project.
051   */
052  MAP_OF_LIFE(".avro"),
053
054  /**
055   * Special export format for the <a href="https://bionomia.net/">Bionomia</a> project.
056   */
057  BIONOMIA(".zip"),
058
059  /**
060   * Special CSV format for the <a href="https://www.iucn.org/">International Union for Conservation of Nature</a>
061   * <a href="https://www.iucnredlist.org/">Red List</a> project.
062   */
063  IUCN(".csv"),
064
065  /**
066   * Parquet (with Snappy compression codec) format export of the most common indexed terms.
067   */
068  SIMPLE_PARQUET(".zip");
069
070  private final String extension;
071
072  DownloadFormat(String extension) {
073    this.extension = extension;
074  }
075
076  public String getExtension() {
077    return extension;
078  }
079}