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