001package org.gbif.api.service.occurrence;
002
003import org.gbif.api.vocabulary.BasisOfRecord;
004import org.gbif.api.vocabulary.Kingdom;
005
006import java.util.Map;
007
008import javax.validation.constraints.Min;
009
010/**
011 * Supports listing occurrence counts by known dimensions.
012 */
013public interface OccurrenceDistributionIndexService {
014
015  /**
016   * Returns the occurrence records count by basis of record. The result is ordered descending by the count.
017   */
018  Map<BasisOfRecord, Long> getBasisOfRecordCounts();
019
020  /**
021   * Returns the occurrence records count by kingdom. The result is ordered descending by the count.
022   */
023  Map<Kingdom, Long> getKingdomCounts();
024
025  /**
026   * Returns the occurrence records count by year. The result is ordered descending by the count.
027   * 
028   * @param from minimum year
029   * @param to maximum year
030   */
031  Map<Integer, Long> getYearCounts(@Min(0) int from, @Min(0) int to);
032
033}