001package org.gbif.api.model.collections.request;
002
003import java.util.HashMap;
004import java.util.HashSet;
005import java.util.List;
006import java.util.Map;
007import java.util.Set;
008import javax.annotation.Nullable;
009import lombok.Builder;
010import lombok.Data;
011import lombok.EqualsAndHashCode;
012import lombok.experimental.SuperBuilder;
013import org.gbif.api.model.common.paging.Pageable;
014import org.gbif.api.vocabulary.Country;
015import org.gbif.api.vocabulary.Rank;
016import org.gbif.api.vocabulary.collections.CollectionFacetParameter;
017
018@SuppressWarnings("MissingOverride")
019@EqualsAndHashCode(callSuper = true)
020@SuperBuilder
021@Data
022public class CollectionDescriptorsSearchRequest extends CollectionSearchRequest
023    implements FacetedSearchRequest<CollectionFacetParameter> {
024
025  @Nullable private List<Integer> usageKey;
026  @Nullable private List<String> usageName;
027  @Nullable private List<Rank> usageRank;
028  @Nullable private List<Integer> taxonKey;
029  @Nullable private List<Country> descriptorCountry;
030  @Nullable private List<String> individualCount;
031  @Nullable private List<String> identifiedBy;
032  @Nullable private List<String> dateIdentified;
033  @Nullable private List<String> typeStatus;
034  @Nullable private List<String> recordedBy;
035  @Nullable private List<String> discipline;
036  @Nullable private List<String> objectClassification;
037  @Nullable private List<String> issue;
038
039  @Builder.Default @Nullable private Set<CollectionFacetParameter> facets = new HashSet<>();
040  @Nullable private boolean multiSelectFacets;
041  @Nullable private Integer facetMinCount;
042  @Nullable private Integer facetLimit = 10;
043  @Nullable private Integer facetOffset;
044
045  // Holds the paging configuration for each requested facet
046  @Builder.Default @Nullable
047  private Map<CollectionFacetParameter, Pageable> facetPages = new HashMap<>();
048}