Class wrapping functions on a list of ResultHolder objects. More...
#include <opentrep/bom/ResultCombination.hpp>
Public Member Functions | |
const TravelQuery_T & | getQueryString () const |
const ResultHolderList_T & | getResultHolderList () const |
bool | hasFullTextMatched () const |
const ResultHolder & | getBestMatchingResultHolder () const |
const Percentage_T & | getBestMatchingWeight () const |
StringSet | getCorrectedStringSet () const |
void | displayXapianPercentages () const |
void | calculateEnvelopeWeights () const |
void | calculateCodeMatches () const |
void | calculatePageRanks () const |
void | calculateHeuristicWeights () const |
void | calculateCombinedWeights () const |
void | calculateAllWeights () |
bool | chooseBestMatchingResultHolder () |
void | toStream (std::ostream &) const |
void | fromStream (std::istream &) |
std::string | toString () const |
std::string | describeKey () const |
std::string | describeShortKey () const |
Friends | |
class | FacResultCombination |
Class wrapping functions on a list of ResultHolder objects.
Definition at line 25 of file ResultCombination.hpp.
|
inline |
Get the query string.
Definition at line 32 of file ResultCombination.hpp.
|
inline |
Retrieve the list of result objects.
Definition at line 39 of file ResultCombination.hpp.
|
inline |
State whether there has been a full-text match.
Definition at line 46 of file ResultCombination.hpp.
const ResultHolder & OPENTREP::ResultCombination::getBestMatchingResultHolder | ( | ) | const |
Get a reference on the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.
Definition at line 46 of file ResultCombination.cpp.
References getBestMatchingResultHolder(), and OPENTREP_LOG_ERROR.
Referenced by OPENTREP::chooseBestMatchingResultHolder(), OPENTREP::createPlaces(), getBestMatchingResultHolder(), getBestMatchingWeight(), and getCorrectedStringSet().
const Percentage_T & OPENTREP::ResultCombination::getBestMatchingWeight | ( | ) | const |
Get the weight of the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.
Definition at line 59 of file ResultCombination.cpp.
References getBestMatchingResultHolder(), getBestMatchingWeight(), and OPENTREP::ResultHolder::getCombinedWeight().
Referenced by OPENTREP::chooseBestMatchingResultHolder(), and getBestMatchingWeight().
StringSet OPENTREP::ResultCombination::getCorrectedStringSet | ( | ) | const |
Get the list of corrected strings for the best matching ResultHolder object. If there is no such object, the method throws a NoBestMatchingResultHolderException exception.
Definition at line 66 of file ResultCombination.cpp.
References getBestMatchingResultHolder(), getCorrectedStringSet(), and OPENTREP::ResultHolder::getCorrectedStringSet().
Referenced by OPENTREP::chooseBestMatchingResultHolder(), and getCorrectedStringSet().
void OPENTREP::ResultCombination::displayXapianPercentages | ( | ) | const |
Display the Xapian matching percentages for all the matching documents.
Definition at line 111 of file ResultCombination.cpp.
References displayXapianPercentages(), and OPENTREP::ResultHolder::displayXapianPercentages().
Referenced by calculateAllWeights(), and displayXapianPercentages().
void OPENTREP::ResultCombination::calculateEnvelopeWeights | ( | ) | const |
Calculate/set the envelope weights for all the matching documents
Definition at line 125 of file ResultCombination.cpp.
References calculateEnvelopeWeights(), and OPENTREP::ResultHolder::calculateEnvelopeWeights().
Referenced by calculateAllWeights(), and calculateEnvelopeWeights().
void OPENTREP::ResultCombination::calculateCodeMatches | ( | ) | const |
Calculate/set the IATA/ICAO code matching weights for all the matching documents
Definition at line 139 of file ResultCombination.cpp.
References calculateCodeMatches(), and OPENTREP::ResultHolder::calculateCodeMatches().
Referenced by calculateAllWeights(), and calculateCodeMatches().
void OPENTREP::ResultCombination::calculatePageRanks | ( | ) | const |
Calculate/set the PageRanks for all the matching documents
Definition at line 153 of file ResultCombination.cpp.
References calculatePageRanks(), and OPENTREP::ResultHolder::calculatePageRanks().
Referenced by calculateAllWeights(), and calculatePageRanks().
void OPENTREP::ResultCombination::calculateHeuristicWeights | ( | ) | const |
Calculate/set the heuristic weights for all the matching documents
Definition at line 167 of file ResultCombination.cpp.
References calculateHeuristicWeights(), and OPENTREP::ResultHolder::calculateHeuristicWeights().
Referenced by calculateAllWeights(), and calculateHeuristicWeights().
void OPENTREP::ResultCombination::calculateCombinedWeights | ( | ) | const |
Calculate/set the combined weights for all the matching documents
Definition at line 181 of file ResultCombination.cpp.
References calculateCombinedWeights(), and OPENTREP::ResultHolder::calculateCombinedWeights().
Referenced by calculateAllWeights(), and calculateCombinedWeights().
void OPENTREP::ResultCombination::calculateAllWeights | ( | ) |
Combine all of the above methods
Definition at line 195 of file ResultCombination.cpp.
References calculateAllWeights(), calculateCodeMatches(), calculateCombinedWeights(), calculateEnvelopeWeights(), calculateHeuristicWeights(), calculatePageRanks(), and displayXapianPercentages().
Referenced by calculateAllWeights().
bool OPENTREP::ResultCombination::chooseBestMatchingResultHolder | ( | ) |
Choose the best matching ResultHolder object from the underlying list.
Definition at line 229 of file ResultCombination.cpp.
References chooseBestMatchingResultHolder(), describeKey(), OPENTREP::ResultHolder::getCombinedWeight(), and OPENTREP_LOG_DEBUG.
Referenced by OPENTREP::chooseBestMatchingResultHolder(), and chooseBestMatchingResultHolder().
|
virtual |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Implements OPENTREP::BomAbstract.
Definition at line 102 of file ResultCombination.cpp.
References toStream(), and toString().
Referenced by toStream().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements OPENTREP::BomAbstract.
Definition at line 107 of file ResultCombination.cpp.
References fromStream().
Referenced by fromStream().
|
virtual |
Get the serialised version of the Business Object.
Implements OPENTREP::BomAbstract.
Definition at line 85 of file ResultCombination.cpp.
References describeShortKey(), toString(), and OPENTREP::ResultHolder::toString().
Referenced by toString().
|
virtual |
Get a string describing the whole key (differentiating two objects at any level).
Implements OPENTREP::BomAbstract.
Definition at line 80 of file ResultCombination.cpp.
References describeKey(), and describeShortKey().
Referenced by chooseBestMatchingResultHolder(), and describeKey().
|
virtual |
Get a string describing the short key (differentiating two objects at the same level).
Implements OPENTREP::BomAbstract.
Definition at line 73 of file ResultCombination.cpp.
References describeShortKey().
Referenced by OPENTREP::chooseBestMatchingResultHolder(), describeKey(), describeShortKey(), and toString().
|
friend |
Definition at line 26 of file ResultCombination.hpp.
References FacResultCombination.
Referenced by FacResultCombination.