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@EqualsAndHashCode(callSuper = true)
019@SuperBuilder
020@Data
021public class CollectionDescriptorsSearchRequest extends CollectionSearchRequest
022    implements FacetedSearchRequest<CollectionFacetParameter> {
023
024  @Nullable private List<Integer> usageKey;
025  @Nullable private List<String> usageName;
026  @Nullable private List<Rank> usageRank;
027  @Nullable private List<Integer> taxonKey;
028  @Nullable private List<Country> descriptorCountry;
029  @Nullable private List<String> individualCount;
030  @Nullable private List<String> identifiedBy;
031  @Nullable private List<String> dateIdentified;
032  @Nullable private List<String> typeStatus;
033  @Nullable private List<String> recordedBy;
034  @Nullable private List<String> discipline;
035  @Nullable private List<String> objectClassification;
036  @Nullable private List<String> issue;
037
038  @Builder.Default @Nullable private Set<CollectionFacetParameter> facets = new HashSet<>();
039  @Nullable private boolean multiSelectFacets;
040  @Nullable private Integer facetMinCount;
041  @Nullable private Integer facetLimit = 10;
042  @Nullable private Integer facetOffset;
043
044  // Holds the paging configuration for each requested facet
045  @Builder.Default @Nullable
046  private Map<CollectionFacetParameter, Pageable> facetPages = new HashMap<>();
047}