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 |
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 OPENTREP_LOG_ERROR.
Referenced by OPENTREP::chooseBestMatchingResultHolder(), OPENTREP::createPlaces(), 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(), and OPENTREP::ResultHolder::getCombinedWeight().
Referenced by OPENTREP::chooseBestMatchingResultHolder().
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(), and OPENTREP::ResultHolder::getCorrectedStringSet().
Referenced by OPENTREP::chooseBestMatchingResultHolder().
void OPENTREP::ResultCombination::displayXapianPercentages | ( | ) | const |
Display the Xapian matching percentages for all the matching documents.
Definition at line 111 of file ResultCombination.cpp.
References OPENTREP::ResultHolder::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 OPENTREP::ResultHolder::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 OPENTREP::ResultHolder::calculateCodeMatches().
void OPENTREP::ResultCombination::calculatePageRanks | ( | ) | const |
Calculate/set the PageRanks for all the matching documents
Definition at line 153 of file ResultCombination.cpp.
References OPENTREP::ResultHolder::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 OPENTREP::ResultHolder::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 OPENTREP::ResultHolder::calculateCombinedWeights().
bool OPENTREP::ResultCombination::chooseBestMatchingResultHolder | ( | ) |
Choose the best matching ResultHolder object from the underlying list.
Definition at line 195 of file ResultCombination.cpp.
References OPENTREP::ResultHolder::describeKey(), describeKey(), OPENTREP::ResultHolder::getCombinedWeight(), and OPENTREP_LOG_DEBUG.
Referenced by OPENTREP::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 toString().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements OPENTREP::BomAbstract.
Definition at line 107 of file ResultCombination.cpp.
|
virtual |
Get the serialised version of the Business Object.
Implements OPENTREP::BomAbstract.
Definition at line 85 of file ResultCombination.cpp.
References describeShortKey(), and OPENTREP::ResultHolder::toString().
Referenced by toStream().
|
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 describeShortKey().
Referenced by chooseBestMatchingResultHolder().
|
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.
Referenced by OPENTREP::chooseBestMatchingResultHolder(), describeKey(), and toString().
|
friend |
Definition at line 26 of file ResultCombination.hpp.