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

Structure modelling a (geographical) location. More...

#include <opentrep/Location.hpp>

+ Inheritance diagram for OPENTREP::Location:

Public Member Functions

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 TvlPORListString_TgetTvlPORListString () 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 LocationList_TgetExtraLocationList () const
 
const LocationList_TgetAlternateLocationList () const
 
const RawDataString_TgetRawDataString () const
 
void setKey (const LocationKey &iKey)
 
void setIataCode (const std::string &iIataCode)
 
void setIataType (const IATAType &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 setTvlPORListString (const std::string &iPORListString)
 
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 setCountryCode (const std::string &iCountryCode)
 
void setAltCountryCode (const std::string &iCountryCode)
 
void setCountryName (const std::string &iCountryName)
 
void setStateCode (const std::string &iStateCode)
 
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 addName (const LanguageCode_T &iLanguageCode, const std::string &iName)
 
void resetMatrix ()
 
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 addExtraLocation (const Location &iExtraLocation)
 
void addAlternateLocation (const Location &iAlternateLocation)
 
void setRawDataString (const std::string &iRawDataString)
 
Date_T calculateDate () const
 
void consolidateAltNameShortListString ()
 
void consolidateTvlPORListString ()
 
void toStream (std::ostream &) const
 
void fromStream (std::istream &)
 
std::string toString () const
 
std::string describeKey () const
 
std::string describeShortKey () const
 
std::string toBasicString () const
 
std::string toShortString () const
 
std::string toSingleLocationString () const
 
 Location (const IATACode_T &, const IATAType &, const GeonamesID_T &, const ICAOCode_T &, const FAACode_T &, const CommonName_T &, const ASCIIName_T &, const EnvelopeID_T &, const Date_T &iDateFrom, const Date_T &iDateEnd, const Comment_T &, const CityCode_T &, const CityUTFName_T &, const CityASCIIName_T &, const GeonamesID_T &, const StateCode_T &, const CountryCode_T &, const AltCountryCode_T &, const CountryName_T &, const ContinentName_T &, const Latitude_T &, const Longitude_T &, const FeatureClass_T &, const FeatureCode_T &, const Admin1Code_T &, const Admin1UTFName_T &, const Admin1ASCIIName_T &, const Admin2Code_T &, const Admin2UTFName_T &, const Admin2ASCIIName_T &, const Admin3Code_T &, const Admin4Code_T &, const Population_T &, const Elevation_T &, const GTopo30_T &, const TimeZone_T &, const GMTOffset_T &, const DSTOffset_T &, const RawOffset_T &, const Date_T &iModDate, const TvlPORListString_T &, const WikiLink_T &, const PageRank_T &, const std::string &iOriginalKeywords, const std::string &iCorrectedKeywords, const MatchingPercentage_T &iPercentage, const NbOfErrors_T &iEditDistance, const NbOfErrors_T &iAllowableEditDistance, const RawDataString_T &)
 
 Location ()
 
 Location (const Location &)
 
 ~Location ()
 

Static Public Member Functions

static FeatureNameList_T getFeatureList (const FeatureCode_T &)
 

Public Attributes

year_t _itYear
 
month_t _itMonth
 
day_t _itDay
 
Language::EN_Language _itLanguageCodeNum
 
LanguageCode_T _itLanguageCode
 
std::string _itLangCode2Char
 
std::string _itLangCodeExt
 
std::string _itLangCodeHist
 
AltNameShortList_T _itAltNameShortList
 
TvlPORList_T _itTvlPORList
 

Detailed Description

Structure modelling a (geographical) location.

Definition at line 24 of file Location.hpp.

Constructor & Destructor Documentation

OPENTREP::Location::Location ( const IATACode_T iIataCode,
const IATAType iIataType,
const GeonamesID_T iGeonamesID,
const ICAOCode_T iIcaoCode,
const FAACode_T iFaaCode,
const CommonName_T iCommonName,
const ASCIIName_T iASCIIName,
const EnvelopeID_T iEnvelopeID,
const Date_T iDateFrom,
const Date_T iDateEnd,
const Comment_T iComment,
const CityCode_T iCityCode,
const CityUTFName_T iCityUtfName,
const CityASCIIName_T iCityAsciiName,
const GeonamesID_T iCityGeonamesID,
const StateCode_T iStateCode,
const CountryCode_T iCountryCode,
const AltCountryCode_T iAltCountryCode,
const CountryName_T iCountryName,
const ContinentName_T iContinentName,
const Latitude_T iLatitude,
const Longitude_T iLongitude,
const FeatureClass_T iFeatureClass,
const FeatureCode_T iFeatureCode,
const Admin1Code_T iAdmin1Code,
const Admin1UTFName_T iAdmin1UtfName,
const Admin1ASCIIName_T iAdmin1AsciiName,
const Admin2Code_T iAdmin2Code,
const Admin2UTFName_T iAdmin2UtfName,
const Admin2ASCIIName_T iAdmin2AsciiName,
const Admin3Code_T iAdmin3Code,
const Admin4Code_T iAdmin4Code,
const Population_T iPopulation,
const Elevation_T iElevation,
const GTopo30_T iGTopo30,
const TimeZone_T iTimeZone,
const GMTOffset_T iGMTOffset,
const DSTOffset_T iDSTOffset,
const RawOffset_T iRawOffset,
const Date_T iModDate,
const TvlPORListString_T iTvlPORListString,
const WikiLink_T iWikiLink,
const PageRank_T iPageRank,
const std::string &  iOriginalKeywords,
const std::string &  iCorrectedKeywords,
const MatchingPercentage_T iPercentage,
const NbOfErrors_T iEditDistance,
const NbOfErrors_T iAllowableEditDistance,
const RawDataString_T iRawDataString 
)

Main Constructor.

Definition at line 102 of file Location.cpp.

OPENTREP::Location::Location ( )

Default Constructor.

Definition at line 16 of file Location.cpp.

OPENTREP::Location::Location ( const Location iLocation)

Default copy constructor.

Definition at line 55 of file Location.cpp.

OPENTREP::Location::~Location ( )

Destructor.

Definition at line 184 of file Location.cpp.

Member Function Documentation

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

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

Definition at line 30 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getKey(), and OPENTREP::Result::getPrimaryKey().

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

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

Definition at line 44 of file Location.hpp.

References OPENTREP::LocationKey::getIataType().

Referenced by OPENTREP::Place::getIataType().

const GeonamesID_T& OPENTREP::Location::getGeonamesID ( ) const
inline
const IsGeonames_T& OPENTREP::Location::isGeonames ( ) const
inline

State whether that POR is referenced by Geonames.

Definition at line 58 of file Location.hpp.

References OPENTREP::LocationKey::isGeonames().

Referenced by OPENTREP::Place::isGeonames().

const ICAOCode_T& OPENTREP::Location::getIcaoCode ( ) const
inline
const FAACode_T& OPENTREP::Location::getFaaCode ( ) const
inline
const CommonName_T& OPENTREP::Location::getCommonName ( ) const
inline

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

Definition at line 80 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getCommonName().

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

Get the ASCII name (not necessarily in English).

Definition at line 87 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getAsciiName().

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

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

Definition at line 94 of file Location.hpp.

Referenced by OPENTREP::Place::getAltNameShortListString().

const TvlPORListString_T& OPENTREP::Location::getTvlPORListString ( ) const
inline

Get the list of IATA codes of the travel-related POR.

Definition at line 101 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

Get the envelope ID.

Definition at line 108 of file Location.hpp.

Referenced by OPENTREP::Place::getEnvelopeID(), and OPENTREP::Result::getEnvelopeID().

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

Get the beginning date of the validity period

Definition at line 115 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getDateFrom().

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

Get the end date of the validity period

Definition at line 122 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getDateEnd().

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

Get the commentaries.

Definition at line 129 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getComment().

const CityCode_T& OPENTREP::Location::getCityCode ( ) const
inline
const CityUTFName_T& OPENTREP::Location::getCityUtfName ( ) const
inline
const CityASCIIName_T& OPENTREP::Location::getCityAsciiName ( ) const
inline
const GeonamesID_T& OPENTREP::Location::getCityGeonamesID ( ) const
inline

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

Definition at line 157 of file Location.hpp.

Referenced by OPENTREP::Place::getCityGeonamesID().

const StateCode_T& OPENTREP::Location::getStateCode ( ) const
inline
const CountryCode_T& OPENTREP::Location::getCountryCode ( ) const
inline
const AltCountryCode_T& OPENTREP::Location::getAltCountryCode ( ) const
inline

Get the alternative country code.

Definition at line 178 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getAltCountryCode().

const CountryName_T& OPENTREP::Location::getCountryName ( ) const
inline
const ContinentCode_T& OPENTREP::Location::getContinentCode ( ) const
inline

Get the continent code.

Definition at line 192 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getContinentCode().

const ContinentName_T& OPENTREP::Location::getContinentName ( ) const
inline
const TimeZone_T& OPENTREP::Location::getTimeZone ( ) const
inline
const GMTOffset_T& OPENTREP::Location::getGMTOffset ( ) const
inline

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

Definition at line 213 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getGMTOffset().

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

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

Definition at line 220 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getDSTOffset().

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

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

Definition at line 227 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getRawOffset().

const Latitude_T& OPENTREP::Location::getLatitude ( ) const
inline
const Longitude_T& OPENTREP::Location::getLongitude ( ) const
inline
const FeatureClass_T& OPENTREP::Location::getFeatureClass ( ) const
inline

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

Definition at line 248 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getFeatureClass().

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

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

Definition at line 255 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getFeatureCode().

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

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

Definition at line 262 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin1Code(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

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

Definition at line 269 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin1UtfName(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

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

Definition at line 276 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin1AsciiName(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

Get the administrative code of rank 2.

Definition at line 283 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin2Code(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

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

Definition at line 290 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin2UtfName(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

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

Definition at line 297 of file Location.hpp.

Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin2AsciiName(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

Get the administrative code of rank 3.

Definition at line 304 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin3Code(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

Get the administrative code of rank 4.

Definition at line 311 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAdmin4Code(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

Get the population (number of inhabitants).

Definition at line 318 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getPopulation().

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

Get the elevation.

Definition at line 325 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getElevation().

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

Get the GTopo30.

Definition at line 332 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getGTopo30().

const PageRank_T& OPENTREP::Location::getPageRank ( ) const
inline
const Date_T& OPENTREP::Location::getModificationDate ( ) const
inline

Get the modification date.

Definition at line 346 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::Place::getModificationDate().

const WikiLink_T& OPENTREP::Location::getWikiLink ( ) const
inline
const NameMatrix& OPENTREP::Location::getNameMatrix ( ) const
inline
bool OPENTREP::Location::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 373 of file Location.hpp.

References OPENTREP::NameMatrix::getNameList().

Referenced by OPENTREP::Place::getNameList().

const std::string& OPENTREP::Location::getOriginalKeywords ( ) const
inline
const std::string& OPENTREP::Location::getCorrectedKeywords ( ) const
inline
const MatchingPercentage_T& OPENTREP::Location::getPercentage ( ) const
inline
const NbOfErrors_T& OPENTREP::Location::getEditDistance ( ) const
inline

Get the allowed edit distance/error.

Definition at line 402 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getEditDistance(), and OPENTREP::BomJSONExport::jsonExportLocation().

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

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

Definition at line 410 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), OPENTREP::Place::getAllowableEditDistance(), and OPENTREP::BomJSONExport::jsonExportLocation().

const LocationList_T& OPENTREP::Location::getExtraLocationList ( ) const
inline

Get the list of extra matching (similar) locations.

Definition at line 417 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::BomJSONExport::jsonExportLocationList().

const LocationList_T& OPENTREP::Location::getAlternateLocationList ( ) const
inline

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

Definition at line 424 of file Location.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation(), and OPENTREP::BomJSONExport::jsonExportLocationList().

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

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

Definition at line 431 of file Location.hpp.

Referenced by OPENTREP::Place::getRawDataString().

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

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

Definition at line 441 of file Location.hpp.

Referenced by OPENTREP::Place::setKey().

void OPENTREP::Location::setIataCode ( const std::string &  iIataCode)
inline
void OPENTREP::Location::setIataType ( const IATAType iIATAType)
inline

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

Definition at line 455 of file Location.hpp.

References OPENTREP::LocationKey::setIataType().

Referenced by OPENTREP::PorParserHelper::storePORType::operator()(), and OPENTREP::Place::setIataType().

void OPENTREP::Location::setGeonamesID ( const GeonamesID_T iGeonamesID)
inline
void OPENTREP::Location::setIcaoCode ( const std::string &  iIcaoCode)
inline

Set the ICAO code.

Definition at line 469 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeIcaoCode::operator()(), and OPENTREP::Place::setIcaoCode().

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

Set the FAA code.

Definition at line 476 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeFaaCode::operator()(), and OPENTREP::Place::setFaaCode().

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

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

Definition at line 484 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCommonName::operator()(), and OPENTREP::Place::setCommonName().

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

Set the ASCII name (not necessarily in English).

Definition at line 491 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAsciiName::operator()(), and OPENTREP::Place::setAsciiName().

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

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

Definition at line 498 of file Location.hpp.

Referenced by consolidateAltNameShortListString(), and OPENTREP::Place::setAltNameShortListString().

void OPENTREP::Location::setTvlPORListString ( const std::string &  iPORListString)
inline

Set the list of IATA codes of the travel-related POR.

Definition at line 505 of file Location.hpp.

Referenced by consolidateTvlPORListString().

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

Set the envelope ID.

Definition at line 512 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeEnvelopeID::operator()(), and OPENTREP::Place::setEnvelopeID().

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

Set the beginning date of the validity period

Definition at line 519 of file Location.hpp.

Referenced by OPENTREP::Place::setDateFrom().

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

Set the end date of the validity period

Definition at line 526 of file Location.hpp.

Referenced by OPENTREP::Place::setDateEnd().

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

Set the commentaries.

Definition at line 533 of file Location.hpp.

Referenced by OPENTREP::Place::setComment().

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

Set the related/served IATA city code.

Definition at line 540 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCityCode::operator()(), and OPENTREP::Place::setCityCode().

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

Set the city name in UTF8.

Definition at line 547 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCityUtfName::operator()(), and OPENTREP::Place::setCityUtfName().

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

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

Definition at line 554 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCityAsciiName::operator()(), and OPENTREP::Place::setCityAsciiName().

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

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

Definition at line 561 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCityGeonamesID::operator()(), and OPENTREP::Place::setCityGeonamesID().

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

Set the country code.

Definition at line 568 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCountryCode::operator()(), and OPENTREP::Place::setCountryCode().

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

Set the alternative country code.

Definition at line 575 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAltCountryCode::operator()(), and OPENTREP::Place::setAltCountryCode().

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

Set the country name.

Definition at line 582 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeCountryName::operator()(), and OPENTREP::Place::setCountryName().

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

Set the state code.

Definition at line 589 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeStateCode::operator()(), and OPENTREP::Place::setStateCode().

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

Set the continent code.

Definition at line 596 of file Location.hpp.

Referenced by OPENTREP::Place::setContinentCode().

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

Set the continent name.

Definition at line 603 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeContinentName::operator()(), and OPENTREP::Place::setContinentName().

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

Set the time-zone.

Definition at line 610 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeTimeZone::operator()(), and OPENTREP::Place::setTimeZone().

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

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

Definition at line 617 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeGMTOffset::operator()(), and OPENTREP::Place::setGMTOffset().

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

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

Definition at line 624 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeDSTOffset::operator()(), and OPENTREP::Place::setDSTOffset().

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

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

Definition at line 631 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeRawOffset::operator()(), and OPENTREP::Place::setRawOffset().

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

Set the geographical latitude.

Definition at line 638 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeLatitude::operator()(), and OPENTREP::Place::setLatitude().

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

Set the geographical longitude.

Definition at line 645 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeLongitude::operator()(), and OPENTREP::Place::setLongitude().

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

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

Definition at line 652 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeFeatureClass::operator()(), and OPENTREP::Place::setFeatureClass().

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

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

Definition at line 659 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeFeatureCode::operator()(), and OPENTREP::Place::setFeatureCode().

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

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

Definition at line 666 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm1Code::operator()(), and OPENTREP::Place::setAdmin1Code().

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

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

Definition at line 673 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm1UtfName::operator()(), and OPENTREP::Place::setAdmin1UtfName().

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

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

Definition at line 680 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm1AsciiName::operator()(), and OPENTREP::Place::setAdmin1AsciiName().

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

Set the administrative code of rank 2.

Definition at line 687 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm2Code::operator()(), and OPENTREP::Place::setAdmin2Code().

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

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

Definition at line 694 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm2UtfName::operator()(), and OPENTREP::Place::setAdmin2UtfName().

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

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

Definition at line 701 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm2AsciiName::operator()(), and OPENTREP::Place::setAdmin2AsciiName().

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

Set the administrative code of rank 3.

Definition at line 708 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm3Code::operator()(), and OPENTREP::Place::setAdmin3Code().

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

Set the administrative code of rank 4.

Definition at line 715 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeAdm4Code::operator()(), and OPENTREP::Place::setAdmin4Code().

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

Set the population (number of inhabitants).

Definition at line 722 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storePopulation::operator()(), and OPENTREP::Place::setPopulation().

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

Set the elevation.

Definition at line 729 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeElevation::operator()(), and OPENTREP::Place::setElevation().

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

Set the GTopo30.

Definition at line 736 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeGTopo30::operator()(), and OPENTREP::Place::setGTopo30().

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

Set the PageRank.

Definition at line 743 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storePageRank::operator()(), and OPENTREP::Place::setPageRank().

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

Set the modification date.

Definition at line 750 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeModDate::operator()(), and OPENTREP::Place::setModificationDate().

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

Set the Wikipedia link.

Definition at line 757 of file Location.hpp.

Referenced by OPENTREP::PorParserHelper::storeWikiLink::operator()(), and OPENTREP::Place::setWikiLink().

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

Add a name for that location.

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

Definition at line 767 of file Location.hpp.

References OPENTREP::NameMatrix::addName().

Referenced by OPENTREP::Place::addName(), and OPENTREP::PorParserHelper::storeAltName::operator()().

void OPENTREP::Location::resetMatrix ( )
inline

Reset the map of name lists.

Definition at line 775 of file Location.hpp.

References OPENTREP::NameMatrix::reset().

Referenced by OPENTREP::Place::resetMatrix().

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

Set the original keywords.

Definition at line 782 of file Location.hpp.

Referenced by OPENTREP::Place::setOriginalKeywords().

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

Set the corrected keywords.

Definition at line 789 of file Location.hpp.

Referenced by OPENTREP::Place::setCorrectedKeywords().

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

Set the Xapian matching percentage.

Definition at line 796 of file Location.hpp.

Referenced by OPENTREP::Place::setPercentage().

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

Set the allowed edit distance/error.

Definition at line 803 of file Location.hpp.

Referenced by OPENTREP::Place::setEditDistance().

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

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

Definition at line 811 of file Location.hpp.

Referenced by OPENTREP::Place::setAllowableEditDistance().

void OPENTREP::Location::addExtraLocation ( const Location iExtraLocation)
inline

Add an extra matching location.

Definition at line 818 of file Location.hpp.

Referenced by OPENTREP::Place::completeLocation().

void OPENTREP::Location::addAlternateLocation ( const Location iAlternateLocation)
inline

Add an alternate matching location.

Definition at line 825 of file Location.hpp.

Referenced by OPENTREP::Place::completeLocation().

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

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

Definition at line 832 of file Location.hpp.

Referenced by OPENTREP::Place::setRawDataString().

Date_T OPENTREP::Location::calculateDate ( ) const
void OPENTREP::Location::consolidateAltNameShortListString ( )

Aggregate the temporary alternate names into the short list of alternate names.

Definition at line 313 of file Location.cpp.

References _itAltNameShortList, and setAltNameShortListString().

Referenced by OPENTREP::PorParserHelper::storeAltNameShortListString::operator()().

void OPENTREP::Location::consolidateTvlPORListString ( )

Aggregate the temporary IATA codes into the list of travel-related POR.

Definition at line 331 of file Location.cpp.

References _itTvlPORList, and setTvlPORListString().

Referenced by OPENTREP::PorParserHelper::storeTvlPORListString::operator()().

FeatureNameList_T OPENTREP::Location::getFeatureList ( const FeatureCode_T iFeatureCode)
static

Derive a list from a (Geonames) feature code. For instance, the 'AIRP' feature code provides:

  • airport
  • airdrome
  • aerodrome
  • airfield
  • airstrip
  • airbase
Parameters
constFeatureCode_T& The feature code.
Returns
const FeatureNameList_T The list of feature names.

Definition at line 349 of file Location.cpp.

Referenced by OPENTREP::Place::addNameToXapianSets().

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

Dump a structure into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 188 of file Location.cpp.

References toString().

void OPENTREP::Location::fromStream ( std::istream &  )
virtual

Read a structure from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 193 of file Location.cpp.

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

Display of the Location structure with its associated names.

The alternate and extra matches are also fully displayed.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 269 of file Location.cpp.

References OPENTREP::NameMatrix::describe(), toShortString(), and toSingleLocationString().

Referenced by toStream(), and OPENTREP::Place::toString().

std::string OPENTREP::Location::describeKey ( ) const

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

Definition at line 204 of file Location.cpp.

References describeShortKey().

Referenced by OPENTREP::Place::describeKey().

std::string OPENTREP::Location::describeShortKey ( ) const

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

Definition at line 197 of file Location.cpp.

References OPENTREP::LocationKey::describe().

Referenced by describeKey(), OPENTREP::Place::describeShortKey(), and toBasicString().

std::string OPENTREP::Location::toBasicString ( ) const

Basic display of the Location structure.

The names are not displayed. No information is displayed about alternate and extra matches.

Definition at line 209 of file Location.cpp.

References describeShortKey().

Referenced by OPENTREP::Place::shortDisplay(), toShortString(), and toSingleLocationString().

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

Short display of the Location structure.

The names are not displayed. Basic information is displayed about alternate and extra matches.

Definition at line 245 of file Location.cpp.

References toBasicString().

Referenced by OPENTREP::Place::toShortString(), and toString().

std::string OPENTREP::Location::toSingleLocationString ( ) const

Display of the Location structure with its associated names.

Contrary to the toString() method, the alternate and extra matches are not displayed.

Definition at line 262 of file Location.cpp.

References toBasicString().

Referenced by toString().

Member Data Documentation

year_t OPENTREP::Location::_itYear
month_t OPENTREP::Location::_itMonth
day_t OPENTREP::Location::_itDay
Language::EN_Language OPENTREP::Location::_itLanguageCodeNum

Staging alternate names.

Definition at line 1282 of file Location.hpp.

std::string OPENTREP::Location::_itLangCodeExt
std::string OPENTREP::Location::_itLangCodeHist
AltNameShortList_T OPENTREP::Location::_itAltNameShortList
TvlPORList_T OPENTREP::Location::_itTvlPORList

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