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