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.literature.search; 015 016import org.gbif.api.model.common.search.SearchParameter; 017import org.gbif.api.model.literature.LiteratureRelevance; 018import org.gbif.api.model.literature.LiteratureTopic; 019import org.gbif.api.model.literature.LiteratureType; 020import org.gbif.api.vocabulary.Country; 021import org.gbif.api.vocabulary.Language; 022 023import java.util.UUID; 024 025import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 026 027@JsonDeserialize(as = LiteratureSearchParameter.class) 028public enum LiteratureSearchParameter implements SearchParameter { 029 COUNTRIES_OF_RESEARCHER(Country.class), 030 COUNTRIES_OF_COVERAGE(Country.class), 031 LITERATURE_TYPE(LiteratureType.class), 032 RELEVANCE(LiteratureRelevance.class), 033 YEAR(Integer.class), 034 TOPICS(LiteratureTopic.class), 035 GBIF_DATASET_KEY(UUID.class), // dataset 036 PUBLISHING_ORGANIZATION_KEY(UUID.class), // publisher 037 PEER_REVIEW(Boolean.class), 038 OPEN_ACCESS(Boolean.class), 039 GBIF_DOWNLOAD_KEY(String.class), // download key 040 GBIF_OCCURRENCE_KEY(Long.class), // occurrence key 041 GBIF_TAXON_KEY(Integer.class), // taxon key 042 GBIF_HIGHERTAXON_KEY(Integer.class), //higher taxon key 043 GBIF_NETWORK_KEY(UUID.class), // network keys 044 GBIF_PROJECT_IDENTIFIER(String.class), // project identifier 045 GBIF_PROGRAMME(String.class), // project identifier 046 CITATION_TYPE(String.class), // citation type 047 DOI(String.class), 048 SOURCE(String.class), // journal 049 PUBLISHER(String.class), // journal publisher 050 LANGUAGE(Language.class); 051 052 private final Class<?> type; 053 054 LiteratureSearchParameter(Class<?> type) { 055 this.type = type; 056 } 057 058 @Override 059 public Class<?> type() { 060 return type; 061 } 062}