package uk.ac.ebi.quickgo.annotation.service.statistics;

import uk.ac.ebi.quickgo.annotation.model.AnnotationRequest;
import uk.ac.ebi.quickgo.annotation.model.StatisticsGroup;
import uk.ac.ebi.quickgo.rest.search.results.QueryResult;

/**
 * Contract for a service that provides annotation based statistics.
 *
 * @author Ricardo Antunes
 */
public interface StatisticsService {

    /**
     * Calculates the statistics based on the results returned by
     * an {@link AnnotationRequest}.
     *
     * @param request the {@link AnnotationRequest} whose results will have statistics calculated
     * @return a {@link QueryResult} containing a {@link StatisticsGroup}, representing the
     * statistics corresponding to the annotation data-set
     */
    QueryResult<StatisticsGroup> calculate(AnnotationRequest request);
}

@@ -485,16 +485,45 @@
 equest%7D.
+ For use by restful services.
 %0A     *%0A
@@ -849,11 +849,496 @@
 equest);
+%0A%0A    /**%0A     * Calculates the statistics based on the results returned by%0A     * an %7B@link AnnotationRequest%7D. For use by download services.%0A     *%0A     * @param request the %7B@link AnnotationRequest%7D whose results will have statistics calculated%0A     * @return a %7B@link QueryResult%7D containing a %7B@link StatisticsGroup%7D, representing the%0A     * statistics corresponding to the annotation data-set%0A     */%0A    QueryResult%3CStatisticsGroup%3E calculateDownload(AnnotationRequest request);
 %0A%7D%0A

Add calculateDownload()