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