OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::ResultCombination Class Reference

Class wrapping functions on a list of ResultHolder objects. More...

#include <opentrep/bom/ResultCombination.hpp>

+ Inheritance diagram for OPENTREP::ResultCombination:

Public Member Functions

const TravelQuery_TgetQueryString () const
 
const ResultHolderList_TgetResultHolderList () const
 
bool hasFullTextMatched () const
 
const ResultHoldergetBestMatchingResultHolder () const
 
const Percentage_TgetBestMatchingWeight () 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
 

Detailed Description

Class wrapping functions on a list of ResultHolder objects.

Definition at line 25 of file ResultCombination.hpp.

Member Function Documentation

const TravelQuery_T& OPENTREP::ResultCombination::getQueryString ( ) const
inline

Get the query string.

Definition at line 32 of file ResultCombination.hpp.

const ResultHolderList_T& OPENTREP::ResultCombination::getResultHolderList ( ) const
inline

Retrieve the list of result objects.

Definition at line 39 of file ResultCombination.hpp.

bool OPENTREP::ResultCombination::hasFullTextMatched ( ) const
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.

Returns
bool Whether or not a best matching ResultHolder exists.

Definition at line 195 of file ResultCombination.cpp.

References OPENTREP::ResultHolder::describeKey(), describeKey(), OPENTREP::ResultHolder::getCombinedWeight(), and OPENTREP_LOG_DEBUG.

Referenced by OPENTREP::chooseBestMatchingResultHolder().

void OPENTREP::ResultCombination::toStream ( std::ostream &  ioOut) const
virtual

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::BomAbstract.

Definition at line 102 of file ResultCombination.cpp.

References toString().

void OPENTREP::ResultCombination::fromStream ( std::istream &  ioIn)
virtual

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::BomAbstract.

Definition at line 107 of file ResultCombination.cpp.

std::string OPENTREP::ResultCombination::toString ( ) const
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().

std::string OPENTREP::ResultCombination::describeKey ( ) const
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().

std::string OPENTREP::ResultCombination::describeShortKey ( ) const
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().

Friends And Related Function Documentation

friend class FacResultCombination
friend

Definition at line 26 of file ResultCombination.hpp.


The documentation for this class was generated from the following files: