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

Class modelling a place/POR (point of reference). More...

#include <opentrep/bom/Place.hpp>

+ Inheritance diagram for OPENTREP::Place:

Public Types

typedef std::set< std::string > StringSet_T
 
typedef std::map< const
Weight_T, StringSet_T
TermSetMap_T
 

Public Member Functions

const LocationgetLocation () const
 
const LocationKeygetKey () const
 
const IATACode_TgetIataCode () const
 
const IATATypegetIataType () const
 
const GeonamesID_TgetGeonamesID () const
 
const IsGeonames_TisGeonames () const
 
const ICAOCode_TgetIcaoCode () const
 
const FAACode_TgetFaaCode () const
 
const CommonName_TgetCommonName () const
 
const ASCIIName_TgetAsciiName () const
 
const AltNameShortListString_TgetAltNameShortListString () const
 
const EnvelopeID_TgetEnvelopeID () const
 
const Date_TgetDateFrom () const
 
const Date_TgetDateEnd () const
 
const Comment_TgetComment () const
 
const CityCode_TgetCityCode () const
 
const CityUTFName_TgetCityUtfName () const
 
const CityASCIIName_TgetCityAsciiName () const
 
const GeonamesID_TgetCityGeonamesID () const
 
const StateCode_TgetStateCode () const
 
const CountryCode_TgetCountryCode () const
 
const AltCountryCode_TgetAltCountryCode () const
 
const CountryName_TgetCountryName () const
 
const ContinentCode_TgetContinentCode () const
 
const ContinentName_TgetContinentName () const
 
const TimeZone_TgetTimeZone () const
 
const GMTOffset_TgetGMTOffset () const
 
const DSTOffset_TgetDSTOffset () const
 
const RawOffset_TgetRawOffset () const
 
const Latitude_TgetLatitude () const
 
const Longitude_TgetLongitude () const
 
const FeatureClass_TgetFeatureClass () const
 
const FeatureCode_TgetFeatureCode () const
 
const Admin1Code_TgetAdmin1Code () const
 
const Admin1UTFName_TgetAdmin1UtfName () const
 
const Admin1ASCIIName_TgetAdmin1AsciiName () const
 
const Admin2Code_TgetAdmin2Code () const
 
const Admin2UTFName_TgetAdmin2UtfName () const
 
const Admin2ASCIIName_TgetAdmin2AsciiName () const
 
const Admin3Code_TgetAdmin3Code () const
 
const Admin4Code_TgetAdmin4Code () const
 
const Population_TgetPopulation () const
 
const Elevation_TgetElevation () const
 
const GTopo30_TgetGTopo30 () const
 
const PageRank_TgetPageRank () const
 
const Date_TgetModificationDate () const
 
const WikiLink_TgetWikiLink () const
 
const NameMatrixgetNameMatrix () const
 
bool getNameList (const LanguageCode_T &iLanguageCode, NameList_T &ioNameList) const
 
const std::string & getOriginalKeywords () const
 
const std::string & getCorrectedKeywords () const
 
const MatchingPercentage_TgetPercentage () const
 
const NbOfErrors_TgetEditDistance () const
 
const NbOfErrors_TgetAllowableEditDistance () const
 
const RawDataString_TgetRawDataString () const
 
const XapianDocID_TgetDocID () const
 
const PlaceOrderedList_TgetExtraPlaceList () const
 
const PlaceOrderedList_TgetAlternatePlaceList () const
 
const TermSetMap_TgetTermSetMap () const
 
StringSet_T getTermSet (const Weight_T &) const
 
const StringSet_TgetSpellingSet () const
 
const StringSet_TgetStemmingSet () const
 
const StringSet_TgetSynonymSet () const
 
void setLocation (const Location &iLocation)
 
void setKey (const LocationKey &iKey)
 
void setIataCode (const std::string &iIataCode)
 
void setIataType (const std::string &iIATAType)
 
void setGeonamesID (const GeonamesID_T &iGeonamesID)
 
void setIcaoCode (const std::string &iIcaoCode)
 
void setFaaCode (const std::string &iFaaCode)
 
void setCommonName (const std::string &iName)
 
void setAsciiName (const std::string &iName)
 
void setAltNameShortListString (const std::string &iNameListString)
 
void setEnvelopeID (const EnvelopeID_T &iEnvelopeID)
 
void setDateFrom (const Date_T &iDate)
 
void setDateEnd (const Date_T &iDate)
 
void setComment (const std::string &iComment)
 
void setCityCode (const std::string &iCityCode)
 
void setCityUtfName (const std::string &iCityUtfName)
 
void setCityAsciiName (const std::string &iCityAsciiName)
 
void setCityGeonamesID (const GeonamesID_T &iGeonamesID)
 
void setStateCode (const std::string &iStateCode)
 
void setCountryCode (const std::string &iCountryCode)
 
void setAltCountryCode (const std::string &iCountryCode)
 
void setCountryName (const std::string &iCountryName)
 
void setContinentCode (const std::string &iContinentCode)
 
void setContinentName (const std::string &iContinentName)
 
void setTimeZone (const std::string &iTimeZone)
 
void setGMTOffset (const GMTOffset_T &iOffset)
 
void setDSTOffset (const DSTOffset_T &iOffset)
 
void setRawOffset (const RawOffset_T &iOffset)
 
void setLatitude (const Latitude_T &iLatitude)
 
void setLongitude (const Longitude_T &iLongitude)
 
void setFeatureClass (const std::string &iFeatClass)
 
void setFeatureCode (const std::string &iFeatCode)
 
void setAdmin1Code (const std::string &iAdminCode)
 
void setAdmin1UtfName (const std::string &iAdminName)
 
void setAdmin1AsciiName (const std::string &iAdminName)
 
void setAdmin2Code (const std::string &iAdminCode)
 
void setAdmin2UtfName (const std::string &iAdminName)
 
void setAdmin2AsciiName (const std::string &iAdminName)
 
void setAdmin3Code (const std::string &iAdminCode)
 
void setAdmin4Code (const std::string &iAdminCode)
 
void setPopulation (const Population_T &iPopulation)
 
void setElevation (const Elevation_T &iElevation)
 
void setGTopo30 (const GTopo30_T &iGTopo30)
 
void setPageRank (const PageRank_T &iPageRank)
 
void setModificationDate (const Date_T &iModDate)
 
void setWikiLink (const std::string &iWikiLink)
 
void setOriginalKeywords (const std::string &iOriginalKeywords)
 
void setCorrectedKeywords (const std::string &iCorrectedKeywords)
 
void setPercentage (const MatchingPercentage_T &iPercentage)
 
void setEditDistance (const NbOfErrors_T &iEditDistance)
 
void setAllowableEditDistance (const NbOfErrors_T &iAllowableEditDistance)
 
void setRawDataString (const std::string &iRawDataString)
 
void setDocID (const XapianDocID_T &iDocID)
 
bool addTermSet (const Weight_T &, const StringSet_T &)
 
void addName (const LanguageCode_T &iLanguageCode, const std::string &iName)
 
void resetMatrix ()
 
void resetIndexSets ()
 
const LocationcompleteLocation ()
 
void addNameToXapianSets (const Weight_T &, const LocationName_T &, const FeatureCode_T &, const CityUTFName_T &, const CityASCIIName_T &, const Admin1UTFName_T &, const Admin1ASCIIName_T &, const Admin2UTFName_T &, const Admin2ASCIIName_T &, const StateCode_T &, const CountryCode_T &, const CountryName_T &, const ContinentName_T &, const OTransliterator &)
 
void buildIndexSets (const OTransliterator &)
 
void addNameToXapianSets (const Weight_T &, const std::string &iBaseName, const FeatureCode_T &)
 
void toStream (std::ostream &) const
 
void fromStream (std::istream &)
 
std::string describeKey () const
 
std::string describeShortKey () const
 
std::string toString () const
 
std::string toShortString () const
 
std::string describeSets () const
 
std::string display () const
 
std::string shortDisplay () const
 

Friends

class FacWorld
 
class FacPlace
 
class FacPlaceHolder
 
class DbaPlace
 

Detailed Description

Class modelling a place/POR (point of reference).

Definition at line 28 of file Place.hpp.

Member Typedef Documentation

typedef std::set<std::string> OPENTREP::Place::StringSet_T

(STL) Set of strings, to be added in the Xapian database (for indexing, spelling, stemming, synonyms, etc).

Definition at line 39 of file Place.hpp.

Definition at line 40 of file Place.hpp.

Member Function Documentation

const Location& OPENTREP::Place::getLocation ( ) const
inline

Get the underlying Location structure, which is an extract of the Place object.

Returns
const Location& The underlying Location structure.

Definition at line 51 of file Place.hpp.

Referenced by completeLocation().

const LocationKey& OPENTREP::Place::getKey ( ) const
inline

Get the primary key (IATA and ICAO codes, Geonames ID) of the place.

Definition at line 58 of file Place.hpp.

References OPENTREP::Location::getKey().

Referenced by OPENTREP::DBManager::buildSQLDB(), OPENTREP::Result::fillPlace(), and soci::type_conversion< OPENTREP::Place >::from_base().

const IATACode_T& OPENTREP::Place::getIataCode ( ) const
inline
const IATAType& OPENTREP::Place::getIataType ( ) const
inline

Get the IATA location type (e.g., A for airport).

Definition at line 72 of file Place.hpp.

References OPENTREP::Location::getIataType().

const GeonamesID_T& OPENTREP::Place::getGeonamesID ( ) const
inline

Get the Geonames ID.

Definition at line 79 of file Place.hpp.

References OPENTREP::Location::getGeonamesID().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const IsGeonames_T& OPENTREP::Place::isGeonames ( ) const
inline

State whether that POR is referenced by Geonames.

Definition at line 86 of file Place.hpp.

References OPENTREP::Location::isGeonames().

const ICAOCode_T& OPENTREP::Place::getIcaoCode ( ) const
inline

Get the ICAO code.

Definition at line 93 of file Place.hpp.

References OPENTREP::Location::getIcaoCode().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const FAACode_T& OPENTREP::Place::getFaaCode ( ) const
inline

Get the FAA code.

Definition at line 100 of file Place.hpp.

References OPENTREP::Location::getFaaCode().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const CommonName_T& OPENTREP::Place::getCommonName ( ) const
inline

Get the common name (usually in American English, but not necessarily in ASCII).

Definition at line 108 of file Place.hpp.

References OPENTREP::Location::getCommonName().

const ASCIIName_T& OPENTREP::Place::getAsciiName ( ) const
inline

Get the ASCII name (not necessarily in English).

Definition at line 115 of file Place.hpp.

References OPENTREP::Location::getAsciiName().

const AltNameShortListString_T& OPENTREP::Place::getAltNameShortListString ( ) const
inline

Get the short list of alternate names (without language codes).

Definition at line 122 of file Place.hpp.

References OPENTREP::Location::getAltNameShortListString().

const EnvelopeID_T& OPENTREP::Place::getEnvelopeID ( ) const
inline

Get the envelope ID.

Definition at line 129 of file Place.hpp.

References OPENTREP::Location::getEnvelopeID().

const Date_T& OPENTREP::Place::getDateFrom ( ) const
inline

Get the beginning date of the validity period

Definition at line 136 of file Place.hpp.

References OPENTREP::Location::getDateFrom().

const Date_T& OPENTREP::Place::getDateEnd ( ) const
inline

Get the end date of the validity period

Definition at line 143 of file Place.hpp.

References OPENTREP::Location::getDateEnd().

const Comment_T& OPENTREP::Place::getComment ( ) const
inline

Get the commentaries.

Definition at line 150 of file Place.hpp.

References OPENTREP::Location::getComment().

const CityCode_T& OPENTREP::Place::getCityCode ( ) const
inline

Get the related/served IATA city code.

Definition at line 157 of file Place.hpp.

References OPENTREP::Location::getCityCode().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const CityUTFName_T& OPENTREP::Place::getCityUtfName ( ) const
inline

Get the city name in UTF8.

Definition at line 164 of file Place.hpp.

References OPENTREP::Location::getCityUtfName().

const CityASCIIName_T& OPENTREP::Place::getCityAsciiName ( ) const
inline

Get the city name in ASCII (not necessarily in English).

Definition at line 171 of file Place.hpp.

References OPENTREP::Location::getCityAsciiName().

const GeonamesID_T& OPENTREP::Place::getCityGeonamesID ( ) const
inline

Get the city Geonames ID (may be 0 if unknown).

Definition at line 178 of file Place.hpp.

References OPENTREP::Location::getCityGeonamesID().

const StateCode_T& OPENTREP::Place::getStateCode ( ) const
inline

Get the state code.

Definition at line 185 of file Place.hpp.

References OPENTREP::Location::getStateCode().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const CountryCode_T& OPENTREP::Place::getCountryCode ( ) const
inline

Get the country code.

Definition at line 192 of file Place.hpp.

References OPENTREP::Location::getCountryCode().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const AltCountryCode_T& OPENTREP::Place::getAltCountryCode ( ) const
inline

Get the alternative country code.

Definition at line 199 of file Place.hpp.

References OPENTREP::Location::getAltCountryCode().

const CountryName_T& OPENTREP::Place::getCountryName ( ) const
inline

Get the country name.

Definition at line 206 of file Place.hpp.

References OPENTREP::Location::getCountryName().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const ContinentCode_T& OPENTREP::Place::getContinentCode ( ) const
inline

Get the continent code.

Definition at line 213 of file Place.hpp.

References OPENTREP::Location::getContinentCode().

const ContinentName_T& OPENTREP::Place::getContinentName ( ) const
inline

Get the continent name.

Definition at line 220 of file Place.hpp.

References OPENTREP::Location::getContinentName().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const TimeZone_T& OPENTREP::Place::getTimeZone ( ) const
inline

Get the time-zone.

Definition at line 227 of file Place.hpp.

References OPENTREP::Location::getTimeZone().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const GMTOffset_T& OPENTREP::Place::getGMTOffset ( ) const
inline

Get the GMT offset (e.g., 1)

Definition at line 234 of file Place.hpp.

References OPENTREP::Location::getGMTOffset().

const DSTOffset_T& OPENTREP::Place::getDSTOffset ( ) const
inline

Get the DST offset (e.g., 2)

Definition at line 241 of file Place.hpp.

References OPENTREP::Location::getDSTOffset().

const RawOffset_T& OPENTREP::Place::getRawOffset ( ) const
inline

Get the raw offset (e.g., -1)

Definition at line 248 of file Place.hpp.

References OPENTREP::Location::getRawOffset().

const Latitude_T& OPENTREP::Place::getLatitude ( ) const
inline

Get the geographical latitude.

Definition at line 255 of file Place.hpp.

References OPENTREP::Location::getLatitude().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const Longitude_T& OPENTREP::Place::getLongitude ( ) const
inline

Get the geographical longitude.

Definition at line 262 of file Place.hpp.

References OPENTREP::Location::getLongitude().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const FeatureClass_T& OPENTREP::Place::getFeatureClass ( ) const
inline

Get the feature class (e.g., S for spot).

Definition at line 269 of file Place.hpp.

References OPENTREP::Location::getFeatureClass().

const FeatureCode_T& OPENTREP::Place::getFeatureCode ( ) const
inline

Get the feature code (e.g., AIRP for airport).

Definition at line 276 of file Place.hpp.

References OPENTREP::Location::getFeatureCode().

const Admin1Code_T& OPENTREP::Place::getAdmin1Code ( ) const
inline

Get the administrative code of rank 1 (e.g., IL for Illinois).

Definition at line 283 of file Place.hpp.

References OPENTREP::Location::getAdmin1Code().

const Admin1UTFName_T& OPENTREP::Place::getAdmin1UtfName ( ) const
inline

Get the administrative UTF8 name of rank 1 (e.g., Illinois).

Definition at line 290 of file Place.hpp.

References OPENTREP::Location::getAdmin1UtfName().

const Admin1ASCIIName_T& OPENTREP::Place::getAdmin1AsciiName ( ) const
inline

Get the administrative ASCII name of rank 1 (e.g., Illinois).

Definition at line 297 of file Place.hpp.

References OPENTREP::Location::getAdmin1AsciiName().

const Admin2Code_T& OPENTREP::Place::getAdmin2Code ( ) const
inline

Get the administrative code of rank 2.

Definition at line 304 of file Place.hpp.

References OPENTREP::Location::getAdmin2Code().

const Admin2UTFName_T& OPENTREP::Place::getAdmin2UtfName ( ) const
inline

Get the administrative UTF8 name of rank 2 (e.g., Alpes-Maritimes).

Definition at line 311 of file Place.hpp.

References OPENTREP::Location::getAdmin2UtfName().

const Admin2ASCIIName_T& OPENTREP::Place::getAdmin2AsciiName ( ) const
inline

Get the administrative ASCII name of rank 2 (e.g., Alpes-Maritimes).

Definition at line 318 of file Place.hpp.

References OPENTREP::Location::getAdmin2AsciiName().

const Admin3Code_T& OPENTREP::Place::getAdmin3Code ( ) const
inline

Get the administrative code of rank 3.

Definition at line 325 of file Place.hpp.

References OPENTREP::Location::getAdmin3Code().

const Admin4Code_T& OPENTREP::Place::getAdmin4Code ( ) const
inline

Get the administrative code of rank 4.

Definition at line 332 of file Place.hpp.

References OPENTREP::Location::getAdmin4Code().

const Population_T& OPENTREP::Place::getPopulation ( ) const
inline

Get the population (number of inhabitants).

Definition at line 339 of file Place.hpp.

References OPENTREP::Location::getPopulation().

const Elevation_T& OPENTREP::Place::getElevation ( ) const
inline

Get the elevation.

Definition at line 346 of file Place.hpp.

References OPENTREP::Location::getElevation().

const GTopo30_T& OPENTREP::Place::getGTopo30 ( ) const
inline

Get the GTopo30.

Definition at line 353 of file Place.hpp.

References OPENTREP::Location::getGTopo30().

const PageRank_T& OPENTREP::Place::getPageRank ( ) const
inline

Get the PageRank/importance.

Definition at line 360 of file Place.hpp.

References OPENTREP::Location::getPageRank().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const Date_T& OPENTREP::Place::getModificationDate ( ) const
inline

Get the modification date.

Definition at line 367 of file Place.hpp.

References OPENTREP::Location::getModificationDate().

const WikiLink_T& OPENTREP::Place::getWikiLink ( ) const
inline

Get the Wikipedia link.

Definition at line 374 of file Place.hpp.

References OPENTREP::Location::getWikiLink().

Referenced by soci::type_conversion< OPENTREP::Place >::to_base().

const NameMatrix& OPENTREP::Place::getNameMatrix ( ) const
inline

Get the map of name lists.

Definition at line 381 of file Place.hpp.

References OPENTREP::Location::getNameMatrix().

bool OPENTREP::Place::getNameList ( const LanguageCode_T iLanguageCode,
NameList_T ioNameList 
) const
inline

Get, for a given language (code), the corresponding list of names.

Parameters
constLanguageCode_T& Language code.
NameList_T&Empty list of names, which will be filled by the method if a list exists for that language code.
Returns
bool Whether or not such a list exists for the given language.

Definition at line 394 of file Place.hpp.

References OPENTREP::Location::getNameList().

Referenced by completeLocation().

const std::string& OPENTREP::Place::getOriginalKeywords ( ) const
inline

Get the original keywords.

Definition at line 402 of file Place.hpp.

References OPENTREP::Location::getOriginalKeywords().

const std::string& OPENTREP::Place::getCorrectedKeywords ( ) const
inline

Get the corrected keywords.

Definition at line 409 of file Place.hpp.

References OPENTREP::Location::getCorrectedKeywords().

const MatchingPercentage_T& OPENTREP::Place::getPercentage ( ) const
inline

Get the matching percentage.

Definition at line 416 of file Place.hpp.

References OPENTREP::Location::getPercentage().

const NbOfErrors_T& OPENTREP::Place::getEditDistance ( ) const
inline

Get the allowed edit distance/error.

Definition at line 423 of file Place.hpp.

References OPENTREP::Location::getEditDistance().

const NbOfErrors_T& OPENTREP::Place::getAllowableEditDistance ( ) const
inline

Get the maximal allowable edit distance/error, with which the matching has been made.

Definition at line 431 of file Place.hpp.

References OPENTREP::Location::getAllowableEditDistance().

const RawDataString_T& OPENTREP::Place::getRawDataString ( ) const
inline

Get the raw data string, as stored and retrieved by Xapian.

Definition at line 438 of file Place.hpp.

References OPENTREP::Location::getRawDataString().

const XapianDocID_T& OPENTREP::Place::getDocID ( ) const
inline

Get the Xapian document ID.

Definition at line 445 of file Place.hpp.

Referenced by OPENTREP::FacWorld::linkPlaceToWorld(), and OPENTREP::DBManager::updatePlaceInDB().

const PlaceOrderedList_T& OPENTREP::Place::getExtraPlaceList ( ) const
inline

Get the list of extra matching (similar) places.

Definition at line 452 of file Place.hpp.

const PlaceOrderedList_T& OPENTREP::Place::getAlternatePlaceList ( ) const
inline

Get the list of alternate matching (less similar) places.

Definition at line 459 of file Place.hpp.

const TermSetMap_T& OPENTREP::Place::getTermSetMap ( ) const
inline

Get the (STL) map of term set (for the Xapian index).

Definition at line 466 of file Place.hpp.

Referenced by OPENTREP::addToXapian().

Place::StringSet_T OPENTREP::Place::getTermSet ( const Weight_T iWeight) const

Get the (STL) set of terms (for the Xapian index for the given weight).

Parameters
constWeight_T& Weight with which the terms should be indexed.

Definition at line 226 of file Place.cpp.

Referenced by addNameToXapianSets(), and buildIndexSets().

const StringSet_T& OPENTREP::Place::getSpellingSet ( ) const
inline

Get the (STL) set of spelling terms (for the Xapian spelling dictionary).

Definition at line 480 of file Place.hpp.

Referenced by OPENTREP::addToXapian().

const StringSet_T& OPENTREP::Place::getStemmingSet ( ) const
inline

Get the (STL) set of stemming terms (for the Xapian stemming dictionary).

Definition at line 487 of file Place.hpp.

const StringSet_T& OPENTREP::Place::getSynonymSet ( ) const
inline

Get the (STL) set of synonym terms (for the Xapian synonym dictionary).

Definition at line 494 of file Place.hpp.

void OPENTREP::Place::setLocation ( const Location iLocation)
inline

Set the full Location structure.

Definition at line 504 of file Place.hpp.

void OPENTREP::Place::setKey ( const LocationKey iKey)
inline

Set the primary key (IATA and ICAO codes, Geonames ID) of the place.

Definition at line 511 of file Place.hpp.

References OPENTREP::Location::setKey().

void OPENTREP::Place::setIataCode ( const std::string &  iIataCode)
inline

Set the IATA code.

Definition at line 518 of file Place.hpp.

References OPENTREP::Location::setIataCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setIataType ( const std::string &  iIATAType)
inline

Set the IATA location type (e.g., A for airport).

Definition at line 525 of file Place.hpp.

References OPENTREP::Location::setIataType().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setGeonamesID ( const GeonamesID_T iGeonamesID)
inline

Set the Geonames ID.

Definition at line 532 of file Place.hpp.

References OPENTREP::Location::setGeonamesID().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setIcaoCode ( const std::string &  iIcaoCode)
inline

Set the ICAO code.

Definition at line 539 of file Place.hpp.

References OPENTREP::Location::setIcaoCode().

void OPENTREP::Place::setFaaCode ( const std::string &  iFaaCode)
inline

Set the FAA code.

Definition at line 546 of file Place.hpp.

References OPENTREP::Location::setFaaCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCommonName ( const std::string &  iName)
inline

Set the common name (usually in American English, but not necessarily in ASCII).

Definition at line 554 of file Place.hpp.

References OPENTREP::Location::setCommonName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAsciiName ( const std::string &  iName)
inline

Set the ASCII name (not necessarily in English).

Definition at line 561 of file Place.hpp.

References OPENTREP::Location::setAsciiName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAltNameShortListString ( const std::string &  iNameListString)
inline

Set the short list of alternate names (without language codes).

Definition at line 568 of file Place.hpp.

References OPENTREP::Location::setAltNameShortListString().

void OPENTREP::Place::setEnvelopeID ( const EnvelopeID_T iEnvelopeID)
inline

Set the envelope ID.

Definition at line 575 of file Place.hpp.

References OPENTREP::Location::setEnvelopeID().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setDateFrom ( const Date_T iDate)
inline

Set the beginning date of the validity period

Definition at line 582 of file Place.hpp.

References OPENTREP::Location::setDateFrom().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setDateEnd ( const Date_T iDate)
inline

Set the end date of the validity period

Definition at line 589 of file Place.hpp.

References OPENTREP::Location::setDateEnd().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setComment ( const std::string &  iComment)
inline

Set the commentaries.

Definition at line 596 of file Place.hpp.

References OPENTREP::Location::setComment().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCityCode ( const std::string &  iCityCode)
inline

Set the related/served IATA city code.

Definition at line 603 of file Place.hpp.

References OPENTREP::Location::setCityCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCityUtfName ( const std::string &  iCityUtfName)
inline

Set the city name in UTF8.

Definition at line 610 of file Place.hpp.

References OPENTREP::Location::setCityUtfName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCityAsciiName ( const std::string &  iCityAsciiName)
inline

Set the city name in ASCII (not necessarily in English).

Definition at line 617 of file Place.hpp.

References OPENTREP::Location::setCityAsciiName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCityGeonamesID ( const GeonamesID_T iGeonamesID)
inline

Set the city Geonames ID (may be 0 if unknown).

Definition at line 624 of file Place.hpp.

References OPENTREP::Location::setCityGeonamesID().

void OPENTREP::Place::setStateCode ( const std::string &  iStateCode)
inline

Set the state code.

Definition at line 631 of file Place.hpp.

References OPENTREP::Location::setStateCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCountryCode ( const std::string &  iCountryCode)
inline

Set the country code.

Definition at line 638 of file Place.hpp.

References OPENTREP::Location::setCountryCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAltCountryCode ( const std::string &  iCountryCode)
inline

Set the alternative country code.

Definition at line 645 of file Place.hpp.

References OPENTREP::Location::setAltCountryCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setCountryName ( const std::string &  iCountryName)
inline

Set the country name.

Definition at line 652 of file Place.hpp.

References OPENTREP::Location::setCountryName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setContinentCode ( const std::string &  iContinentCode)
inline

Set the continent code.

Definition at line 659 of file Place.hpp.

References OPENTREP::Location::setContinentCode().

void OPENTREP::Place::setContinentName ( const std::string &  iContinentName)
inline

Set the continent name.

Definition at line 666 of file Place.hpp.

References OPENTREP::Location::setContinentName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setTimeZone ( const std::string &  iTimeZone)
inline

Set the time-zone.

Definition at line 673 of file Place.hpp.

References OPENTREP::Location::setTimeZone().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setGMTOffset ( const GMTOffset_T iOffset)
inline

Set the GMT offset (e.g., 1)

Definition at line 680 of file Place.hpp.

References OPENTREP::Location::setGMTOffset().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setDSTOffset ( const DSTOffset_T iOffset)
inline

Set the DST offset (e.g., 2)

Definition at line 687 of file Place.hpp.

References OPENTREP::Location::setDSTOffset().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setRawOffset ( const RawOffset_T iOffset)
inline

Set the raw offset (e.g., 1)

Definition at line 694 of file Place.hpp.

References OPENTREP::Location::setRawOffset().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setLatitude ( const Latitude_T iLatitude)
inline

Set the geographical latitude.

Definition at line 701 of file Place.hpp.

References OPENTREP::Location::setLatitude().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setLongitude ( const Longitude_T iLongitude)
inline

Set the geographical longitude.

Definition at line 708 of file Place.hpp.

References OPENTREP::Location::setLongitude().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setFeatureClass ( const std::string &  iFeatClass)
inline

Set the feature class (e.g., S for spot).

Definition at line 715 of file Place.hpp.

References OPENTREP::Location::setFeatureClass().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setFeatureCode ( const std::string &  iFeatCode)
inline

Set the feature code (e.g., AIRP for airport).

Definition at line 722 of file Place.hpp.

References OPENTREP::Location::setFeatureCode().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin1Code ( const std::string &  iAdminCode)
inline

Set the administrative code of rank 1 (e.g., IL for Illinois).

Definition at line 729 of file Place.hpp.

References OPENTREP::Location::setAdmin1Code().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin1UtfName ( const std::string &  iAdminName)
inline

Set the administrative UTF8 name of rank 1 (e.g., Illinois).

Definition at line 736 of file Place.hpp.

References OPENTREP::Location::setAdmin1UtfName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin1AsciiName ( const std::string &  iAdminName)
inline

Set the administrative ASCII name of rank 1 (e.g., Illinois).

Definition at line 743 of file Place.hpp.

References OPENTREP::Location::setAdmin1AsciiName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin2Code ( const std::string &  iAdminCode)
inline

Set the administrative code of rank 2.

Definition at line 750 of file Place.hpp.

References OPENTREP::Location::setAdmin2Code().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin2UtfName ( const std::string &  iAdminName)
inline

Set the administrative UTF8 name of rank 2 (e.g., Alpes-Maritimes).

Definition at line 757 of file Place.hpp.

References OPENTREP::Location::setAdmin2UtfName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin2AsciiName ( const std::string &  iAdminName)
inline

Set the administrative ASCII name of rank 2 (e.g., Alpes-Maritimes).

Definition at line 764 of file Place.hpp.

References OPENTREP::Location::setAdmin2AsciiName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin3Code ( const std::string &  iAdminCode)
inline

Set the administrative code of rank 3.

Definition at line 771 of file Place.hpp.

References OPENTREP::Location::setAdmin3Code().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setAdmin4Code ( const std::string &  iAdminCode)
inline

Set the administrative code of rank 4.

Definition at line 778 of file Place.hpp.

References OPENTREP::Location::setAdmin4Code().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setPopulation ( const Population_T iPopulation)
inline

Set the population (number of inhabitants).

Definition at line 785 of file Place.hpp.

References OPENTREP::Location::setPopulation().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setElevation ( const Elevation_T iElevation)
inline

Set the elevation.

Definition at line 792 of file Place.hpp.

References OPENTREP::Location::setElevation().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setGTopo30 ( const GTopo30_T iGTopo30)
inline

Set the GTopo30.

Definition at line 799 of file Place.hpp.

References OPENTREP::Location::setGTopo30().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setPageRank ( const PageRank_T iPageRank)
inline

Set the PageRank.

Definition at line 806 of file Place.hpp.

References OPENTREP::Location::setPageRank().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setModificationDate ( const Date_T iModDate)
inline

Set the modification date.

Definition at line 813 of file Place.hpp.

References OPENTREP::Location::setModificationDate().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setWikiLink ( const std::string &  iWikiLink)
inline

Set the Wikipedia link.

Definition at line 820 of file Place.hpp.

References OPENTREP::Location::setWikiLink().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::setOriginalKeywords ( const std::string &  iOriginalKeywords)
inline

Set the original keywords.

Definition at line 827 of file Place.hpp.

References OPENTREP::Location::setOriginalKeywords().

Referenced by OPENTREP::Result::fillPlace().

void OPENTREP::Place::setCorrectedKeywords ( const std::string &  iCorrectedKeywords)
inline

Set the corrected keywords.

Definition at line 834 of file Place.hpp.

References OPENTREP::Location::setCorrectedKeywords().

Referenced by OPENTREP::Result::fillPlace().

void OPENTREP::Place::setPercentage ( const MatchingPercentage_T iPercentage)
inline

Set the Xapian matching percentage.

Definition at line 841 of file Place.hpp.

References OPENTREP::Location::setPercentage().

Referenced by OPENTREP::Result::fillPlace().

void OPENTREP::Place::setEditDistance ( const NbOfErrors_T iEditDistance)
inline

Set the allowed edit distance/error.

Definition at line 848 of file Place.hpp.

References OPENTREP::Location::setEditDistance().

Referenced by OPENTREP::Result::fillPlace().

void OPENTREP::Place::setAllowableEditDistance ( const NbOfErrors_T iAllowableEditDistance)
inline

Set the maxiaml allowable edit distance/error, with which the matching has been made.

Definition at line 856 of file Place.hpp.

References OPENTREP::Location::setAllowableEditDistance().

Referenced by OPENTREP::Result::fillPlace().

void OPENTREP::Place::setRawDataString ( const std::string &  iRawDataString)
inline

Set the raw data string, as stored and retrieved by Xapian.

Definition at line 863 of file Place.hpp.

References OPENTREP::Location::setRawDataString().

void OPENTREP::Place::setDocID ( const XapianDocID_T iDocID)
inline

Set the Xapian document ID.

Definition at line 870 of file Place.hpp.

Referenced by OPENTREP::Result::fillPlace().

bool OPENTREP::Place::addTermSet ( const Weight_T iWeight,
const StringSet_T iTermSet 
)

Set the (STL) set of terms (for the Xapian index for the given weight).

If no set of terms existed for the given weight, it is inserted in the (STL) map. Otherwise, the existing set of terms is just added to the existing set of terms.

Parameters
constWeight_T& Weight with which the terms should be indexed.
constStringSet_T& Set of terms (to be indexed by Xapian).

Definition at line 240 of file Place.cpp.

Referenced by addNameToXapianSets(), and buildIndexSets().

void OPENTREP::Place::addName ( const LanguageCode_T iLanguageCode,
const std::string &  iName 
)
inline

Add a name for the place.

Parameters
constLanguageCode_T& Language in which to add the name.
conststd::string& Name to be added.

Definition at line 896 of file Place.hpp.

References OPENTREP::Location::addName().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::resetMatrix ( )
inline

Reset the map of name lists.

Definition at line 904 of file Place.hpp.

References OPENTREP::Location::resetMatrix().

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

void OPENTREP::Place::resetIndexSets ( )

Reset the index/spelling (STL) sets.

Definition at line 218 of file Place.cpp.

Referenced by soci::type_conversion< OPENTREP::Place >::from_base().

const Location & OPENTREP::Place::completeLocation ( )

Get the underlying Location structure, which is an extract of the Place object. That (Location) structure is passed back to the caller of the service.

Returns
Location The Location structure just created and filled with the parameters of the Place object.

Definition at line 699 of file Place.cpp.

References OPENTREP::Location::addAlternateLocation(), OPENTREP::Location::addExtraLocation(), getLocation(), getNameList(), OPENTREP_LOG_ERROR, and toShortString().

Referenced by OPENTREP::PlaceHolder::createLocations().

void OPENTREP::Place::addNameToXapianSets ( const Weight_T iWeight,
const LocationName_T iLocationName,
const FeatureCode_T iFeatureCode,
const CityUTFName_T iCityUtfName,
const CityASCIIName_T iCityAsciiName,
const Admin1UTFName_T iAdm1UtfName,
const Admin1ASCIIName_T iAdm1AsciiName,
const Admin2UTFName_T iAdm2UtfName,
const Admin2ASCIIName_T iAdm2AsciiName,
const StateCode_T iStateCode,
const CountryCode_T iCountryCode,
const CountryName_T iCountryName,
const ContinentName_T iContinentName,
const OTransliterator iTransliterator 
)

Add the given name to the Xapian index with the given weight, and add that name to the spelling dictionary. Tokenise and re-assemble the given name, so as to replace all the punctuations and other separators by mere spaces. For instance, "Paris/FR/Gare" is transformed into "Paris FR Gare".

Parameters
constWeight_T& The weight with which the terms should be indexed
constLocationName_T& Name of the POR (point of reference)
constFeatureCode_T& Geonames feature code
constCityUTFName_T& UTF8 name of the served city
constCityASCIIName_T& ASCII name of the served city
constAdmin1UTFName_T& UTF8 Name of the administrative level 1 of the POR
constAdmin1ASCIIName_T& ASCII Name of the administrative level 1 of the POR
constAdmin2UTFName_T& UTF8 Name of the administrative level 2 of the POR
constAdmin2ASCIIName_T& ASCII Name of the administrative level 2 of the POR
constStateCode_T& Code of the state of the POR
constCountryCode_T& ISO code of the country of the POR
constCountryName_T& Name of the country of the POR
constContinentName_T& Name of the continent of the POR
constOTransliterator& Unicode transliterator

Definition at line 296 of file Place.cpp.

References addTermSet(), OPENTREP::createStringFromWordList(), getTermSet(), OPENTREP::OTransliterator::normalise(), and OPENTREP::tokeniseStringIntoWordList().

Referenced by buildIndexSets().

void OPENTREP::Place::addNameToXapianSets ( const Weight_T iWeight,
const std::string &  iBaseName,
const FeatureCode_T iFeatureCode 
)

Add the given name to the Xapian index with the given weight. Derive a list of feature names from the feature code. See the Location::getFeatureList() method for more information.

Parameters
constWeight_T& The weight with which the terms should be indexed
conststd::string& Name of the POR (point of reference)
constFeatureCode_T& Geonames feature code

Definition at line 269 of file Place.cpp.

References addTermSet(), OPENTREP::Location::getFeatureList(), and getTermSet().

void OPENTREP::Place::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 146 of file Place.cpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::BomAbstract.

Definition at line 151 of file Place.cpp.

std::string OPENTREP::Place::describeKey ( ) const
inlinevirtual

Get a string describing the whole key (IATA and ICAO codes, Geonames ID).

Implements OPENTREP::BomAbstract.

Definition at line 1002 of file Place.hpp.

References OPENTREP::Location::describeKey().

Referenced by OPENTREP::addToXapian(), and OPENTREP::DBManager::iterateOnStatement().

std::string OPENTREP::Place::describeShortKey ( ) const
inlinevirtual

Get a string describing the whole key (IATA and ICAO codes, Geonames ID).

Implements OPENTREP::BomAbstract.

Definition at line 1009 of file Place.hpp.

References OPENTREP::Location::describeShortKey().

Referenced by OPENTREP::FacPlaceHolder::initLinkWithPlace(), and OPENTREP::FacWorld::linkPlaceToWorld().

std::string OPENTREP::Place::toString ( ) const
virtual

Get the serialised version of the Place object.

Implements OPENTREP::BomAbstract.

Definition at line 83 of file Place.cpp.

References toShortString(), and OPENTREP::Location::toString().

Referenced by OPENTREP::createPlaces(), toStream(), OPENTREP::PlaceHolder::toString(), and OPENTREP::DBManager::updatePlaceInDB().

std::string OPENTREP::Place::toShortString ( ) const

Get a short display of the Business Object.

Definition at line 124 of file Place.cpp.

References OPENTREP::Location::toShortString().

Referenced by completeLocation(), OPENTREP::PlaceHolder::toShortString(), and toString().

std::string OPENTREP::Place::describeSets ( ) const

Get a string describing the (STL) sets of terms for the Xapian database.

Definition at line 155 of file Place.cpp.

Referenced by OPENTREP::addToXapian().

std::string OPENTREP::Place::display ( ) const

Display the full Place context.

Definition at line 211 of file Place.cpp.

References shortDisplay().

Referenced by OPENTREP::World::display().

std::string OPENTREP::Place::shortDisplay ( ) const

Display a short Place context.

Definition at line 200 of file Place.cpp.

References OPENTREP::Location::toBasicString().

Referenced by display().

Friends And Related Function Documentation

friend class FacWorld
friend

Definition at line 29 of file Place.hpp.

friend class FacPlace
friend

Definition at line 30 of file Place.hpp.

friend class FacPlaceHolder
friend

Definition at line 31 of file Place.hpp.

friend class DbaPlace
friend

Definition at line 32 of file Place.hpp.


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