OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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_TTermSetMap_T
 
typedef std::list< std::string > CityNameList_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 UNLOCodeList_TgetUNLOCodeList () const
 
const UICCodeList_TgetUICCodeList () 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 CityDetailsList_TgetCityList () const
 
const StateCode_TgetStateCode () const
 
const CountryCode_TgetCountryCode () const
 
const AltCountryCode_TgetAltCountryCode () const
 
const CountryName_TgetCountryName () const
 
const WAC_TgetWAC () const
 
const WACName_TgetWACName () const
 
const CurrencyCode_TgetCurrencyCode () 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 Latitude_TgetGeonameLatitude () const
 
const Longitude_TgetGeonameLongitude () 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 addUNLOCode (const UNLOCode_T &iUNLOCode)
 
void addUICCode (const UICCode_T &iUICCode)
 
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 setCityList (const CityDetailsList_T &iCityList)
 
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 setWAC (const WAC_T &iWAC)
 
void setWACName (const std::string &iWACName)
 
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 setGeonameLatitude (const Latitude_T &iLatitude)
 
void setGeonameLongitude (const Longitude_T &iLongitude)
 
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 CityNameList_T &iCityUtfNameList, const CityNameList_T &iCityAsciiNameList, 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 29 of file Place.hpp.

Member Typedef Documentation

◆ StringSet_T

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 40 of file Place.hpp.

◆ TermSetMap_T

Definition at line 41 of file Place.hpp.

◆ CityNameList_T

typedef std::list<std::string> OPENTREP::Place::CityNameList_T

Definition at line 42 of file Place.hpp.

Member Function Documentation

◆ getLocation()

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 52 of file Place.hpp.

Referenced by completeLocation().

◆ getKey()

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

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

Definition at line 59 of file Place.hpp.

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

◆ getIataCode()

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

◆ getIataType()

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

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

Definition at line 73 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getGeonamesID()

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

Get the Geonames ID.

Definition at line 80 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB(), and soci::type_conversion< OPENTREP::Place >::to_base().

◆ isGeonames()

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

State whether that POR is referenced by Geonames.

Definition at line 87 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getIcaoCode()

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

Get the ICAO code.

Definition at line 94 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB(), and soci::type_conversion< OPENTREP::Place >::to_base().

◆ getFaaCode()

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

Get the FAA code.

Definition at line 101 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB(), and soci::type_conversion< OPENTREP::Place >::to_base().

◆ getUNLOCodeList()

const UNLOCodeList_T & OPENTREP::Place::getUNLOCodeList ( ) const
inline

Get the list of UN/LOCODE five-letter codes.

Definition at line 108 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getUICCodeList()

const UICCodeList_T & OPENTREP::Place::getUICCodeList ( ) const
inline

Get the list of UIC codes.

Definition at line 115 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getCommonName()

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

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

Definition at line 123 of file Place.hpp.

◆ getAsciiName()

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

Get the ASCII name (not necessarily in English).

Definition at line 130 of file Place.hpp.

◆ getAltNameShortListString()

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

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

Definition at line 137 of file Place.hpp.

◆ getEnvelopeID()

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

Get the envelope ID.

Definition at line 144 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getDateFrom()

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

Get the beginning date of the validity period

Definition at line 151 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getDateEnd()

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

Get the end date of the validity period

Definition at line 158 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getComment()

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

Get the commentaries.

Definition at line 165 of file Place.hpp.

◆ getCityList()

const CityDetailsList_T & OPENTREP::Place::getCityList ( ) const
inline

Get the list of served cities.

Definition at line 172 of file Place.hpp.

◆ getStateCode()

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

Get the state code.

Definition at line 179 of file Place.hpp.

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

◆ getCountryCode()

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

Get the country code.

Definition at line 186 of file Place.hpp.

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

◆ getAltCountryCode()

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

Get the alternative country code.

Definition at line 193 of file Place.hpp.

◆ getCountryName()

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

Get the country name.

Definition at line 200 of file Place.hpp.

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

◆ getWAC()

const WAC_T & OPENTREP::Place::getWAC ( ) const
inline

Get the US DOT World Area Code (WAC).

Definition at line 207 of file Place.hpp.

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

◆ getWACName()

const WACName_T & OPENTREP::Place::getWACName ( ) const
inline

Get the US DOT World Area Code (WAC) name.

Definition at line 214 of file Place.hpp.

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

◆ getCurrencyCode()

const CurrencyCode_T & OPENTREP::Place::getCurrencyCode ( ) const
inline

Get the currency code.

Definition at line 221 of file Place.hpp.

◆ getContinentCode()

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

Get the continent code.

Definition at line 228 of file Place.hpp.

◆ getContinentName()

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

Get the continent name.

Definition at line 235 of file Place.hpp.

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

◆ getTimeZone()

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

Get the time-zone.

Definition at line 242 of file Place.hpp.

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

◆ getGMTOffset()

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

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

Definition at line 249 of file Place.hpp.

◆ getDSTOffset()

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

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

Definition at line 256 of file Place.hpp.

◆ getRawOffset()

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

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

Definition at line 263 of file Place.hpp.

◆ getLatitude()

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

Get the geographical latitude.

Definition at line 270 of file Place.hpp.

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

◆ getLongitude()

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

Get the geographical longitude.

Definition at line 277 of file Place.hpp.

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

◆ getFeatureClass()

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

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

Definition at line 284 of file Place.hpp.

◆ getFeatureCode()

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

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

Definition at line 291 of file Place.hpp.

◆ getAdmin1Code()

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

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

Definition at line 298 of file Place.hpp.

◆ getAdmin1UtfName()

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

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

Definition at line 305 of file Place.hpp.

◆ getAdmin1AsciiName()

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

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

Definition at line 312 of file Place.hpp.

◆ getAdmin2Code()

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

Get the administrative code of rank 2.

Definition at line 319 of file Place.hpp.

◆ getAdmin2UtfName()

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

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

Definition at line 326 of file Place.hpp.

◆ getAdmin2AsciiName()

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

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

Definition at line 333 of file Place.hpp.

◆ getAdmin3Code()

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

Get the administrative code of rank 3.

Definition at line 340 of file Place.hpp.

◆ getAdmin4Code()

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

Get the administrative code of rank 4.

Definition at line 347 of file Place.hpp.

◆ getPopulation()

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

Get the population (number of inhabitants).

Definition at line 354 of file Place.hpp.

◆ getElevation()

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

Get the elevation.

Definition at line 361 of file Place.hpp.

◆ getGTopo30()

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

Get the GTopo30.

Definition at line 368 of file Place.hpp.

◆ getPageRank()

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

Get the PageRank/importance.

Definition at line 375 of file Place.hpp.

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

◆ getModificationDate()

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

Get the modification date.

Definition at line 382 of file Place.hpp.

◆ getWikiLink()

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

Get the Wikipedia link.

Definition at line 389 of file Place.hpp.

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

◆ getGeonameLatitude()

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

Get the Geonames latitude.

Definition at line 396 of file Place.hpp.

◆ getGeonameLongitude()

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

Get the Geonames longitude.

Definition at line 403 of file Place.hpp.

◆ getNameMatrix()

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

Get the map of name lists.

Definition at line 410 of file Place.hpp.

References OPENTREP::NameMatrix::getNameMatrix().

◆ getNameList()

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 423 of file Place.hpp.

Referenced by completeLocation().

◆ getOriginalKeywords()

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

Get the original keywords.

Definition at line 431 of file Place.hpp.

◆ getCorrectedKeywords()

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

Get the corrected keywords.

Definition at line 438 of file Place.hpp.

◆ getPercentage()

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

Get the matching percentage.

Definition at line 445 of file Place.hpp.

◆ getEditDistance()

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

Get the allowed edit distance/error.

Definition at line 452 of file Place.hpp.

◆ getAllowableEditDistance()

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 460 of file Place.hpp.

◆ getRawDataString()

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

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

Definition at line 467 of file Place.hpp.

Referenced by OPENTREP::DBManager::insertPlaceInDB().

◆ getDocID()

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

Get the Xapian document ID.

Definition at line 474 of file Place.hpp.

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

◆ getExtraPlaceList()

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

Get the list of extra matching (similar) places.

Definition at line 481 of file Place.hpp.

◆ getAlternatePlaceList()

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

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

Definition at line 488 of file Place.hpp.

◆ getTermSetMap()

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

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

Definition at line 495 of file Place.hpp.

Referenced by OPENTREP::addToXapian().

◆ getTermSet()

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 228 of file Place.cpp.

References getTermSet().

Referenced by addNameToXapianSets(), addNameToXapianSets(), buildIndexSets(), and getTermSet().

◆ getSpellingSet()

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

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

Definition at line 509 of file Place.hpp.

Referenced by OPENTREP::addToXapian().

◆ getStemmingSet()

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

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

Definition at line 516 of file Place.hpp.

◆ getSynonymSet()

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

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

Definition at line 523 of file Place.hpp.

◆ setLocation()

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

Set the full Location structure.

Definition at line 533 of file Place.hpp.

◆ setKey()

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

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

Definition at line 540 of file Place.hpp.

◆ setIataCode()

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

Set the IATA code.

Definition at line 547 of file Place.hpp.

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

◆ setIataType()

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

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

Definition at line 554 of file Place.hpp.

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

◆ setGeonamesID()

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

Set the Geonames ID.

Definition at line 561 of file Place.hpp.

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

◆ setIcaoCode()

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

Set the ICAO code.

Definition at line 568 of file Place.hpp.

◆ setFaaCode()

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

Set the FAA code.

Definition at line 575 of file Place.hpp.

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

◆ addUNLOCode()

void OPENTREP::Place::addUNLOCode ( const UNLOCode_T & iUNLOCode)
inline

Add a UN/LOCODE five-letter code to the underlying list.

Definition at line 582 of file Place.hpp.

◆ addUICCode()

void OPENTREP::Place::addUICCode ( const UICCode_T & iUICCode)
inline

Add a UIC code to the underlying list.

Definition at line 589 of file Place.hpp.

◆ setCommonName()

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 597 of file Place.hpp.

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

◆ setAsciiName()

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

Set the ASCII name (not necessarily in English).

Definition at line 604 of file Place.hpp.

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

◆ setAltNameShortListString()

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

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

Definition at line 611 of file Place.hpp.

◆ setEnvelopeID()

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

Set the envelope ID.

Definition at line 618 of file Place.hpp.

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

◆ setDateFrom()

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

Set the beginning date of the validity period

Definition at line 625 of file Place.hpp.

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

◆ setDateEnd()

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

Set the end date of the validity period

Definition at line 632 of file Place.hpp.

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

◆ setComment()

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

Set the commentaries.

Definition at line 639 of file Place.hpp.

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

◆ setCityList()

void OPENTREP::Place::setCityList ( const CityDetailsList_T & iCityList)
inline

Set the list of served cities.

Definition at line 646 of file Place.hpp.

◆ setStateCode()

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

Set the state code.

Definition at line 653 of file Place.hpp.

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

◆ setCountryCode()

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

Set the country code.

Definition at line 660 of file Place.hpp.

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

◆ setAltCountryCode()

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

Set the alternative country code.

Definition at line 667 of file Place.hpp.

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

◆ setCountryName()

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

Set the country name.

Definition at line 674 of file Place.hpp.

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

◆ setWAC()

void OPENTREP::Place::setWAC ( const WAC_T & iWAC)
inline

Set the US DOT World Area Code (WAC).

Definition at line 681 of file Place.hpp.

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

◆ setWACName()

void OPENTREP::Place::setWACName ( const std::string & iWACName)
inline

Set the US DOT World Area Code (WAC) name.

Definition at line 688 of file Place.hpp.

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

◆ setContinentCode()

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

Set the continent code.

Definition at line 695 of file Place.hpp.

◆ setContinentName()

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

Set the continent name.

Definition at line 702 of file Place.hpp.

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

◆ setTimeZone()

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

Set the time-zone.

Definition at line 709 of file Place.hpp.

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

◆ setGMTOffset()

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

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

Definition at line 716 of file Place.hpp.

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

◆ setDSTOffset()

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

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

Definition at line 723 of file Place.hpp.

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

◆ setRawOffset()

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

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

Definition at line 730 of file Place.hpp.

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

◆ setLatitude()

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

Set the geographical latitude.

Definition at line 737 of file Place.hpp.

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

◆ setLongitude()

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

Set the geographical longitude.

Definition at line 744 of file Place.hpp.

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

◆ setFeatureClass()

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

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

Definition at line 751 of file Place.hpp.

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

◆ setFeatureCode()

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

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

Definition at line 758 of file Place.hpp.

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

◆ setAdmin1Code()

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

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

Definition at line 765 of file Place.hpp.

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

◆ setAdmin1UtfName()

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

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

Definition at line 772 of file Place.hpp.

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

◆ setAdmin1AsciiName()

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

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

Definition at line 779 of file Place.hpp.

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

◆ setAdmin2Code()

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

Set the administrative code of rank 2.

Definition at line 786 of file Place.hpp.

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

◆ setAdmin2UtfName()

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

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

Definition at line 793 of file Place.hpp.

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

◆ setAdmin2AsciiName()

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

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

Definition at line 800 of file Place.hpp.

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

◆ setAdmin3Code()

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

Set the administrative code of rank 3.

Definition at line 807 of file Place.hpp.

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

◆ setAdmin4Code()

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

Set the administrative code of rank 4.

Definition at line 814 of file Place.hpp.

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

◆ setPopulation()

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

Set the population (number of inhabitants).

Definition at line 821 of file Place.hpp.

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

◆ setElevation()

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

Set the elevation.

Definition at line 828 of file Place.hpp.

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

◆ setGTopo30()

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

Set the GTopo30.

Definition at line 835 of file Place.hpp.

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

◆ setPageRank()

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

Set the PageRank.

Definition at line 842 of file Place.hpp.

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

◆ setModificationDate()

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

Set the modification date.

Definition at line 849 of file Place.hpp.

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

◆ setWikiLink()

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

Set the Wikipedia link.

Definition at line 856 of file Place.hpp.

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

◆ setGeonameLatitude()

void OPENTREP::Place::setGeonameLatitude ( const Latitude_T & iLatitude)
inline

Set the Geonames latitude.

Definition at line 863 of file Place.hpp.

◆ setGeonameLongitude()

void OPENTREP::Place::setGeonameLongitude ( const Longitude_T & iLongitude)
inline

Set the Geonames longitude.

Definition at line 870 of file Place.hpp.

◆ setOriginalKeywords()

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

Set the original keywords.

Definition at line 877 of file Place.hpp.

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

◆ setCorrectedKeywords()

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

Set the corrected keywords.

Definition at line 884 of file Place.hpp.

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

◆ setPercentage()

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

Set the Xapian matching percentage.

Definition at line 891 of file Place.hpp.

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

◆ setEditDistance()

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

Set the allowed edit distance/error.

Definition at line 898 of file Place.hpp.

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

◆ setAllowableEditDistance()

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 906 of file Place.hpp.

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

◆ setRawDataString()

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

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

Definition at line 913 of file Place.hpp.

◆ setDocID()

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

Set the Xapian document ID.

Definition at line 920 of file Place.hpp.

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

◆ addTermSet()

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 242 of file Place.cpp.

References addTermSet().

Referenced by addNameToXapianSets(), addNameToXapianSets(), addTermSet(), and buildIndexSets().

◆ addName()

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 946 of file Place.hpp.

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

◆ resetMatrix()

void OPENTREP::Place::resetMatrix ( )
inline

Reset the map of name lists.

Definition at line 954 of file Place.hpp.

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

◆ resetIndexSets()

void OPENTREP::Place::resetIndexSets ( )

Reset the index/spelling (STL) sets.

Definition at line 220 of file Place.cpp.

References resetIndexSets().

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

◆ completeLocation()

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 761 of file Place.cpp.

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

Referenced by completeLocation(), and OPENTREP::PlaceHolder::createLocations().

◆ addNameToXapianSets() [1/2]

void OPENTREP::Place::addNameToXapianSets ( const Weight_T & iWeight,
const LocationName_T & iLocationName,
const FeatureCode_T & iFeatureCode,
const CityNameList_T & iCityUtfNameList,
const CityNameList_T & iCityAsciiNameList,
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
constCityNameList_T& UTF8 names of the list of served cities
constCityNameList_T& ASCII names of the list of served cities
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 298 of file Place.cpp.

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

Referenced by addNameToXapianSets(), addNameToXapianSets(), and buildIndexSets().

◆ buildIndexSets()

◆ addNameToXapianSets() [2/2]

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 271 of file Place.cpp.

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

◆ toStream()

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 148 of file Place.cpp.

References toStream(), and toString().

Referenced by toStream().

◆ fromStream()

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 153 of file Place.cpp.

References fromStream().

Referenced by fromStream().

◆ describeKey()

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 1053 of file Place.hpp.

Referenced by OPENTREP::addToXapian().

◆ describeShortKey()

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 1060 of file Place.hpp.

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

◆ toString()

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

◆ toShortString()

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

Get a short display of the Business Object.

Definition at line 126 of file Place.cpp.

References toShortString().

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

◆ describeSets()

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

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

Definition at line 157 of file Place.cpp.

References describeSets().

Referenced by OPENTREP::addToXapian(), and describeSets().

◆ display()

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

Display the full Place context.

Definition at line 213 of file Place.cpp.

References display(), and shortDisplay().

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

◆ shortDisplay()

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

Display a short Place context.

Definition at line 202 of file Place.cpp.

References shortDisplay().

Referenced by display(), and shortDisplay().

Friends And Related Symbol Documentation

◆ FacWorld

friend class FacWorld
friend

Definition at line 30 of file Place.hpp.

References FacWorld.

Referenced by FacWorld.

◆ FacPlace

friend class FacPlace
friend

Definition at line 31 of file Place.hpp.

References FacPlace.

Referenced by FacPlace.

◆ FacPlaceHolder

friend class FacPlaceHolder
friend

Definition at line 32 of file Place.hpp.

References FacPlaceHolder.

Referenced by FacPlaceHolder.

◆ DbaPlace

friend class DbaPlace
friend

Definition at line 33 of file Place.hpp.

References DbaPlace.

Referenced by DbaPlace.


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