Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

recoin.container
Class MergedResult  view MergedResult download MergedResult.java

java.lang.Object
  extended byrecoin.container.Result
      extended byrecoin.container.RetrievalResult
          extended byrecoin.container.MergedResult
All Implemented Interfaces:
recoin.group.postresult.Mergeable, java.io.Serializable

public class MergedResult
extends RetrievalResult

A MergedResult is an element of a MergedResultList and represents the aggregated form of multiple RetrievalResult objects. Therefore it encapsulates the individual RetrievalResult objects it is based on, as well as an overall result score.

Version:
0.2.9

Field Summary
private  java.util.Hashtable childResults
          The different RetrievalResult objects that make up this MergedResult are stored in this Hashtable as keys.
 
Fields inherited from class recoin.container.RetrievalResult
docNo, logger, score
 
Fields inherited from class recoin.container.Result
list
 
Constructor Summary
MergedResult()
          Creates a new MergedResult.
MergedResult(RetrievalResult result, float weight)
          Creates a new MergedResult with the specified RetrievalResult and weight.
The new MergedResult will have an overall score of the result's score multiplied with the weight.
 
Method Summary
 void addResult(RetrievalResult result, float influence)
          Adds the specified RetrievalResult to this MergedResult using the specified influence.
 java.util.Hashtable getChildResults()
          Returns the child results.
 void setChildResults(java.util.Hashtable childResults)
          Sets the child results.
 java.lang.String toString()
          Returns a string representation of the MergedResult.
 java.lang.String toXML()
          Returns a XML representation of this MergedResult.
 
Methods inherited from class recoin.container.RetrievalResult
equals, getScore, getUniqueIdentifier, setScore
 
Methods inherited from class recoin.container.Result
getResultList, setResultList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

childResults

private java.util.Hashtable childResults
The different RetrievalResult objects that make up this MergedResult are stored in this Hashtable as keys. The value returned for the key is a float that represents the influence the particular RetrievalResult had on the overall result, i.e. the weight with which the result's score had influence on the aggregated score.

Constructor Detail

MergedResult

public MergedResult()
Creates a new MergedResult.


MergedResult

public MergedResult(RetrievalResult result,
                    float weight)
Creates a new MergedResult with the specified RetrievalResult and weight.
The new MergedResult will have an overall score of the result's score multiplied with the weight.

Method Detail

addResult

public void addResult(RetrievalResult result,
                      float influence)
Adds the specified RetrievalResult to this MergedResult using the specified influence.


toString

public java.lang.String toString()
Returns a string representation of the MergedResult.

Overrides:
toString in class RetrievalResult

toXML

public java.lang.String toXML()
Returns a XML representation of this MergedResult. Here is an example of what the XML element might look like:

 <MergedResult>
   <DocNo>SDA.240494.3322444</DocNo>
   <Score>0.833467</Score>
   .
   .
   List of ChildResults dependent on their toXML() method.
   .
   .
 </MergedResult>
 

Overrides:
toXML in class RetrievalResult

getChildResults

public java.util.Hashtable getChildResults()
Returns the child results.


setChildResults

public void setChildResults(java.util.Hashtable childResults)
Sets the child results.