org.gcube.dir.master.fusion.results
Class RankedResult

java.lang.Object
  extended by ResultElementBase
      extended by org.gcube.dir.master.fusion.results.BaseResult
          extended by org.gcube.dir.master.fusion.results.RankedResult
All Implemented Interfaces:
java.lang.Comparable<RankedResult>
Direct Known Subclasses:
FullResult

public class RankedResult
extends BaseResult
implements java.lang.Comparable<RankedResult>

An extension of BaseResult which is associated with a score of relevance to some Query. Based on the score, the results can be compared and ranked during the application of some fusion algorithm).

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
RankedResult()
           
 
Method Summary
 int compareTo(RankedResult r)
          {@inheritDoc
 void fromXML(java.lang.String xml)
          Builds an internal document from an XML representation of a result
 float getScore()
          Returns the score of the result.
 void setScore(float score)
          Sets the score of the result.
 void XMLserialise()
          {@inheritDoc
 
Methods inherited from class org.gcube.dir.master.fusion.results.BaseResult
toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

RankedResult

public RankedResult()
Method Detail

fromXML

public void fromXML(java.lang.String xml)
             throws java.lang.Exception
Builds an internal document from an XML representation of a result

Overrides:
fromXML in class BaseResult
Parameters:
XML - serialisation
Throws:
java.lang.Exception

XMLserialise

public void XMLserialise()
{@inheritDoc

Overrides:
XMLserialise in class BaseResult

compareTo

public int compareTo(RankedResult r)
{@inheritDoc


getScore

public float getScore()
Returns the score of the result.

Returns:
the score.

setScore

public void setScore(float score)
Sets the score of the result.

Parameters:
score - the score.