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 com.fasterxml.jackson.annotation.JsonFormat;
017
018import java.time.LocalDate;
019
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.GbifRegion;
025import org.gbif.api.vocabulary.Language;
026
027import java.util.ArrayList;
028import java.util.HashMap;
029import java.util.HashSet;
030import java.util.List;
031import java.util.Map;
032import java.util.Set;
033import java.util.UUID;
034
035import com.fasterxml.jackson.annotation.JsonProperty;
036
037import io.swagger.v3.oas.annotations.media.Schema;
038
039import lombok.AccessLevel;
040import lombok.Getter;
041import lombok.Setter;
042
043@Getter
044@Setter
045@SuppressWarnings("unused")
046public class LiteratureSearchResult {
047
048  @Getter(AccessLevel.NONE)
049  @Setter(AccessLevel.NONE)
050  private String abstract_;
051
052  @Schema(description = "The date the literature item was found by GBIF's staff or automated processes.")
053  private String discovered;
054
055  @Schema(description = "The authors of the publication.")
056  private List<Map<String, Object>> authors = new ArrayList<>();
057
058  @Schema(description = "Countries or areas of focus of the study.")
059  private Set<Country> countriesOfCoverage = new HashSet<>();
060
061  @Schema(description = "Countries or areas of institution with which authors are affiliated.")
062  private Set<Country> countriesOfResearcher = new HashSet<>();
063
064  @Schema(description = "Country of the publisher whose dataset is referenced in publication.")
065  private Set<Country> publishingCountry = new HashSet<>();
066
067  @Schema(description = "The date the publication was added to the GBIF literature database.")
068  private LocalDate added;
069
070  @Schema(description = "The publication date of the publication.  See also `year`, `month` and `day`.")
071  @JsonFormat(pattern = "yyyy-MM-dd")
072  private LocalDate published;
073
074  @Schema(description = "The day of publication. See also `published`.", minimum = "1", maximum = "31")
075  private Integer day;
076
077  @Schema(description = "Keys of GBIF downloads referenced by the publication.")
078  private List<String> gbifDownloadKey = new ArrayList<>();
079
080  @Schema(description = "Keys of GBIF occurrences directly mentioned by the paper.")
081  private List<Long> gbifOccurrenceKey = new ArrayList<>();
082
083  @Schema(description = "Keys of taxa from the GBIF Backbone Taxonomy that are the focus of the paper.")
084  private List<Integer> gbifTaxonKey = new ArrayList<>();
085
086  @Schema(description = "Keys of higher taxa from the GBIF Backbone Taxonomy that are the focus of the paper.")
087  private List<Integer> gbifHigherTaxonKey = new ArrayList<>();
088
089  @Schema(description = "A list of GBIF network keys relevant to the publication.")
090  private List<UUID> gbifNetworkKey = new ArrayList<>();
091
092  @Schema(description = "A list of GBIF project identifiers relevant to the publication.")
093  private List<String> gbifProjectIdentifier = new ArrayList<>();
094
095  @Schema(description = "A list of GBIF programmes relevant to the publication.")
096  private List<String> gbifProgramme = new ArrayList<>();
097
098  @Schema(description = "The manner in which GBIF is cited in a paper.")
099  private String citationType;
100
101  @Schema(description = "GBIF regions (political divisions) related to the publication.")
102  private Set<GbifRegion> gbifRegion = new HashSet<>();
103
104  @Schema(description = "GBIF identifier for this literature item.")
105  private UUID id;
106
107  @Schema(description = "Identifiers (such as DOIs) for the literature item.")
108  private Map<String, Object> identifiers = new HashMap<>();
109
110  @Schema(description = "Keywords assigned to the literature item.")
111  private List<String> keywords = new ArrayList<>();
112
113  @Schema(description = "The language of the publication.")
114  private Language language;
115
116  @Schema(description = "Type of literature, e.g. journal article.")
117  private LiteratureType literatureType;
118
119  @Schema(description = "The month of publication. See also `published`.", minimum = "1", maximum = "12")
120  private Integer month;
121
122  @Schema(description = "Unstructured notes.")
123  private String notes;
124
125  @Schema(description = "Whether the publication is open access.")
126  private boolean openAccess;
127
128  @Schema(description = "Whether the publication has been peer reviewed.")
129  private boolean peerReview;
130
131  @Schema(description = "The publisher of the paper.")
132  private String publisher;
133
134  @Schema(description = "Relevance to GBIF community, see [literature relevance](https://www.gbif.org/faq?question=literature-relevance).")
135  private Set<LiteratureRelevance> relevance = new HashSet<>();
136
137  @Schema(description = "Journal of publication.")
138  private String source;
139
140  @Schema(description = "Various tags applied to the literature.")
141  private List<String> tags = new ArrayList<>();
142
143  @Schema(description = "The title of the publication.")
144  private String title;
145
146  @Schema(description = "Topics of the publication.")
147  private Set<LiteratureTopic> topics = new HashSet<>();
148
149  @Schema(description = "The date this literature entry was last modified.")
150  private LocalDate modified;
151
152  @Schema(description = "Websites associated with the publication.")
153  private List<String> websites = new ArrayList<>();
154
155  @Schema(description = "The year of publication.  See also `published`.")
156  private Integer year;
157
158  @Schema(name = "abstract", description = "The abstract from the publication.")
159  @JsonProperty("abstract")
160  public String getAbstract() {
161    return abstract_;
162  }
163
164  public void setAbstract(String abstract_) {
165    this.abstract_ = abstract_;
166  }
167
168}