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