org.gcube.dir.master.selection.io
Class ExtendedCollectionRank

java.lang.Object
  extended by org.gcube.dir.master.selection.io.CollectionRank
      extended by org.gcube.dir.master.selection.io.ExtendedCollectionRank
All Implemented Interfaces:
java.lang.Comparable<CollectionRank>, ServiceOutputAdapter<ICollectionRank>

public class ExtendedCollectionRank
extends CollectionRank

Extends CollectionRank with an estimate of the number of results which should be retrieved from the collection.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
ExtendedCollectionRank()
          Creates an instance
ExtendedCollectionRank(java.lang.String collectionID, float score, int resultEstimate)
          Creates an instance from a collection identifier, a collection score.
 
Method Summary
 ICollectionRank extern()
          Returns the service output.
 long getResultEstimate()
          Returns the result estimate.
 void setResultEstimate(long numberOfResults)
          Sets the result estimate.
 
Methods inherited from class org.gcube.dir.master.selection.io.CollectionRank
compareTo, getCollectionID, getScore, setCollectionID, setScore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedCollectionRank

public ExtendedCollectionRank()
Creates an instance


ExtendedCollectionRank

public ExtendedCollectionRank(java.lang.String collectionID,
                              float score,
                              int resultEstimate)
Creates an instance from a collection identifier, a collection score. and a result estimate.

Parameters:
collectionID - the identifier.
score - the score.
resultEstimate - the estimate.
Method Detail

getResultEstimate

public long getResultEstimate()
Returns the result estimate.

Returns:
the estimate.

setResultEstimate

public void setResultEstimate(long numberOfResults)
Sets the result estimate.

Parameters:
numberOfResults - the estimate.

extern

public ICollectionRank extern()
                       throws java.lang.Exception
Returns the service output.

Specified by:
extern in interface ServiceOutputAdapter<ICollectionRank>
Overrides:
extern in class CollectionRank
Returns:
the output.
Throws:
java.lang.Exception - if this object could not be converted into a service output.