org.gcube.dir.master.selection.criteria
Class ResultDistributionCriterion

java.lang.Object
  extended by org.gcube.dir.master.selection.criteria.ResultDistributionCriterion
All Implemented Interfaces:
SelectionCriterion

public class ResultDistributionCriterion
extends java.lang.Object
implements SelectionCriterion

A criterion to select collections based on the number of results which should be retrieved from each collection with respect to an upper bound on the number of results required for a qiven query.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
ResultDistributionCriterion(int numberOfResults)
          Creates an instance with a given number of result estimate.
 
Method Summary
 int getNumberOfResults()
          Returns the number of results to retrieve,
<T extends CollectionRank>
java.util.List<ExtendedCollectionRank>
select(java.util.List<T> ranking)
          Returns an ordered selection of a ranked list of content sources.
 void setNumberOfResults(int numberOfResult)
          Sets the number of results to retrieve.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultDistributionCriterion

public ResultDistributionCriterion(int numberOfResults)
Creates an instance with a given number of result estimate.

Parameters:
numberOfResults - the estimate.
Method Detail

getNumberOfResults

public int getNumberOfResults()
Returns the number of results to retrieve,

Returns:
the number.

setNumberOfResults

public void setNumberOfResults(int numberOfResult)
Sets the number of results to retrieve.

Parameters:
numberOfResult - the number.

select

public <T extends CollectionRank> java.util.List<ExtendedCollectionRank> select(java.util.List<T> ranking)
Returns an ordered selection of a ranked list of content sources.

Specified by:
select in interface SelectionCriterion
Returns:
the selection.