Class modelling a place/POR (point of reference). More...
#include <opentrep/bom/Place.hpp>
Public Types | |
typedef std::set< std::string > | StringSet_T |
typedef std::map< const Weight_T, StringSet_T > | TermSetMap_T |
Public Member Functions | |
const Location & | getLocation () const |
const LocationKey & | getKey () const |
const IATACode_T & | getIataCode () const |
const IATAType & | getIataType () const |
const GeonamesID_T & | getGeonamesID () const |
const IsGeonames_T & | isGeonames () const |
const ICAOCode_T & | getIcaoCode () const |
const FAACode_T & | getFaaCode () const |
const CommonName_T & | getCommonName () const |
const ASCIIName_T & | getAsciiName () const |
const AltNameShortListString_T & | getAltNameShortListString () const |
const EnvelopeID_T & | getEnvelopeID () const |
const Date_T & | getDateFrom () const |
const Date_T & | getDateEnd () const |
const Comment_T & | getComment () const |
const CityCode_T & | getCityCode () const |
const CityUTFName_T & | getCityUtfName () const |
const CityASCIIName_T & | getCityAsciiName () const |
const GeonamesID_T & | getCityGeonamesID () const |
const StateCode_T & | getStateCode () const |
const CountryCode_T & | getCountryCode () const |
const AltCountryCode_T & | getAltCountryCode () const |
const CountryName_T & | getCountryName () const |
const ContinentCode_T & | getContinentCode () const |
const ContinentName_T & | getContinentName () const |
const TimeZone_T & | getTimeZone () const |
const GMTOffset_T & | getGMTOffset () const |
const DSTOffset_T & | getDSTOffset () const |
const RawOffset_T & | getRawOffset () const |
const Latitude_T & | getLatitude () const |
const Longitude_T & | getLongitude () const |
const FeatureClass_T & | getFeatureClass () const |
const FeatureCode_T & | getFeatureCode () const |
const Admin1Code_T & | getAdmin1Code () const |
const Admin1UTFName_T & | getAdmin1UtfName () const |
const Admin1ASCIIName_T & | getAdmin1AsciiName () const |
const Admin2Code_T & | getAdmin2Code () const |
const Admin2UTFName_T & | getAdmin2UtfName () const |
const Admin2ASCIIName_T & | getAdmin2AsciiName () const |
const Admin3Code_T & | getAdmin3Code () const |
const Admin4Code_T & | getAdmin4Code () const |
const Population_T & | getPopulation () const |
const Elevation_T & | getElevation () const |
const GTopo30_T & | getGTopo30 () const |
const PageRank_T & | getPageRank () const |
const Date_T & | getModificationDate () const |
const WikiLink_T & | getWikiLink () const |
const NameMatrix & | getNameMatrix () const |
bool | getNameList (const LanguageCode_T &iLanguageCode, NameList_T &ioNameList) const |
const std::string & | getOriginalKeywords () const |
const std::string & | getCorrectedKeywords () const |
const MatchingPercentage_T & | getPercentage () const |
const NbOfErrors_T & | getEditDistance () const |
const NbOfErrors_T & | getAllowableEditDistance () const |
const RawDataString_T & | getRawDataString () const |
const XapianDocID_T & | getDocID () const |
const PlaceOrderedList_T & | getExtraPlaceList () const |
const PlaceOrderedList_T & | getAlternatePlaceList () const |
const TermSetMap_T & | getTermSetMap () const |
StringSet_T | getTermSet (const Weight_T &) const |
const StringSet_T & | getSpellingSet () const |
const StringSet_T & | getStemmingSet () const |
const StringSet_T & | getSynonymSet () 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 Location & | completeLocation () |
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 |
typedef std::set<std::string> OPENTREP::Place::StringSet_T |
typedef std::map<const Weight_T, StringSet_T> OPENTREP::Place::TermSetMap_T |
|
inline |
|
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().
|
inline |
Get the IATA code.
Definition at line 65 of file Place.hpp.
References OPENTREP::Location::getIataCode().
Referenced by soci::type_conversion< OPENTREP::Place >::to_base(), and OPENTREP::DBManager::updatePlaceInDB().
|
inline |
Get the IATA location type (e.g., A for airport).
Definition at line 72 of file Place.hpp.
References OPENTREP::Location::getIataType().
|
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().
|
inline |
State whether that POR is referenced by Geonames.
Definition at line 86 of file Place.hpp.
References OPENTREP::Location::isGeonames().
|
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().
|
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().
|
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().
|
inline |
Get the ASCII name (not necessarily in English).
Definition at line 115 of file Place.hpp.
References OPENTREP::Location::getAsciiName().
|
inline |
Get the short list of alternate names (without language codes).
Definition at line 122 of file Place.hpp.
References OPENTREP::Location::getAltNameShortListString().
|
inline |
Get the envelope ID.
Definition at line 129 of file Place.hpp.
References OPENTREP::Location::getEnvelopeID().
|
inline |
Get the beginning date of the validity period
Definition at line 136 of file Place.hpp.
References OPENTREP::Location::getDateFrom().
|
inline |
Get the end date of the validity period
Definition at line 143 of file Place.hpp.
References OPENTREP::Location::getDateEnd().
|
inline |
Get the commentaries.
Definition at line 150 of file Place.hpp.
References OPENTREP::Location::getComment().
|
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().
|
inline |
Get the city name in UTF8.
Definition at line 164 of file Place.hpp.
References OPENTREP::Location::getCityUtfName().
|
inline |
Get the city name in ASCII (not necessarily in English).
Definition at line 171 of file Place.hpp.
References OPENTREP::Location::getCityAsciiName().
|
inline |
Get the city Geonames ID (may be 0 if unknown).
Definition at line 178 of file Place.hpp.
References OPENTREP::Location::getCityGeonamesID().
|
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().
|
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().
|
inline |
Get the alternative country code.
Definition at line 199 of file Place.hpp.
References OPENTREP::Location::getAltCountryCode().
|
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().
|
inline |
Get the continent code.
Definition at line 213 of file Place.hpp.
References OPENTREP::Location::getContinentCode().
|
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().
|
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().
|
inline |
Get the GMT offset (e.g., 1)
Definition at line 234 of file Place.hpp.
References OPENTREP::Location::getGMTOffset().
|
inline |
Get the DST offset (e.g., 2)
Definition at line 241 of file Place.hpp.
References OPENTREP::Location::getDSTOffset().
|
inline |
Get the raw offset (e.g., -1)
Definition at line 248 of file Place.hpp.
References OPENTREP::Location::getRawOffset().
|
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().
|
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().
|
inline |
Get the feature class (e.g., S for spot).
Definition at line 269 of file Place.hpp.
References OPENTREP::Location::getFeatureClass().
|
inline |
Get the feature code (e.g., AIRP for airport).
Definition at line 276 of file Place.hpp.
References OPENTREP::Location::getFeatureCode().
|
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().
|
inline |
Get the administrative UTF8 name of rank 1 (e.g., Illinois).
Definition at line 290 of file Place.hpp.
References OPENTREP::Location::getAdmin1UtfName().
|
inline |
Get the administrative ASCII name of rank 1 (e.g., Illinois).
Definition at line 297 of file Place.hpp.
References OPENTREP::Location::getAdmin1AsciiName().
|
inline |
Get the administrative code of rank 2.
Definition at line 304 of file Place.hpp.
References OPENTREP::Location::getAdmin2Code().
|
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().
|
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().
|
inline |
Get the administrative code of rank 3.
Definition at line 325 of file Place.hpp.
References OPENTREP::Location::getAdmin3Code().
|
inline |
Get the administrative code of rank 4.
Definition at line 332 of file Place.hpp.
References OPENTREP::Location::getAdmin4Code().
|
inline |
Get the population (number of inhabitants).
Definition at line 339 of file Place.hpp.
References OPENTREP::Location::getPopulation().
|
inline |
Get the elevation.
Definition at line 346 of file Place.hpp.
References OPENTREP::Location::getElevation().
|
inline |
Get the GTopo30.
Definition at line 353 of file Place.hpp.
References OPENTREP::Location::getGTopo30().
|
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().
|
inline |
Get the modification date.
Definition at line 367 of file Place.hpp.
References OPENTREP::Location::getModificationDate().
|
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().
|
inline |
Get the map of name lists.
Definition at line 381 of file Place.hpp.
References OPENTREP::Location::getNameMatrix().
|
inline |
Get, for a given language (code), the corresponding list of names.
const | LanguageCode_T& Language code. |
NameList_T& | Empty list of names, which will be filled by the method if a list exists for that language code. |
Definition at line 394 of file Place.hpp.
References OPENTREP::Location::getNameList().
Referenced by completeLocation().
|
inline |
Get the original keywords.
Definition at line 402 of file Place.hpp.
References OPENTREP::Location::getOriginalKeywords().
|
inline |
Get the corrected keywords.
Definition at line 409 of file Place.hpp.
References OPENTREP::Location::getCorrectedKeywords().
|
inline |
Get the matching percentage.
Definition at line 416 of file Place.hpp.
References OPENTREP::Location::getPercentage().
|
inline |
Get the allowed edit distance/error.
Definition at line 423 of file Place.hpp.
References OPENTREP::Location::getEditDistance().
|
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().
|
inline |
Get the raw data string, as stored and retrieved by Xapian.
Definition at line 438 of file Place.hpp.
References OPENTREP::Location::getRawDataString().
|
inline |
Get the Xapian document ID.
Definition at line 445 of file Place.hpp.
Referenced by OPENTREP::FacWorld::linkPlaceToWorld(), and OPENTREP::DBManager::updatePlaceInDB().
|
inline |
|
inline |
|
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).
const | Weight_T& Weight with which the terms should be indexed. |
Definition at line 226 of file Place.cpp.
Referenced by addNameToXapianSets(), and buildIndexSets().
|
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().
|
inline |
|
inline |
|
inline |
|
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().
|
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().
|
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().
|
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().
|
inline |
Set the ICAO code.
Definition at line 539 of file Place.hpp.
References OPENTREP::Location::setIcaoCode().
|
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().
|
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().
|
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().
|
inline |
Set the short list of alternate names (without language codes).
Definition at line 568 of file Place.hpp.
References OPENTREP::Location::setAltNameShortListString().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
inline |
Set the city Geonames ID (may be 0 if unknown).
Definition at line 624 of file Place.hpp.
References OPENTREP::Location::setCityGeonamesID().
|
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().
|
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().
|
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().
|
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().
|
inline |
Set the continent code.
Definition at line 659 of file Place.hpp.
References OPENTREP::Location::setContinentCode().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
inline |
Set the original keywords.
Definition at line 827 of file Place.hpp.
References OPENTREP::Location::setOriginalKeywords().
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the corrected keywords.
Definition at line 834 of file Place.hpp.
References OPENTREP::Location::setCorrectedKeywords().
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the Xapian matching percentage.
Definition at line 841 of file Place.hpp.
References OPENTREP::Location::setPercentage().
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the allowed edit distance/error.
Definition at line 848 of file Place.hpp.
References OPENTREP::Location::setEditDistance().
Referenced by OPENTREP::Result::fillPlace().
|
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().
|
inline |
Set the raw data string, as stored and retrieved by Xapian.
Definition at line 863 of file Place.hpp.
References OPENTREP::Location::setRawDataString().
|
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.
const | Weight_T& Weight with which the terms should be indexed. |
const | StringSet_T& Set of terms (to be indexed by Xapian). |
Definition at line 240 of file Place.cpp.
Referenced by addNameToXapianSets(), and buildIndexSets().
|
inline |
Add a name for the place.
const | LanguageCode_T& Language in which to add the name. |
const | std::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().
|
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.
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".
const | Weight_T& The weight with which the terms should be indexed |
const | LocationName_T& Name of the POR (point of reference) |
const | FeatureCode_T& Geonames feature code |
const | CityUTFName_T& UTF8 name of the served city |
const | CityASCIIName_T& ASCII name of the served city |
const | Admin1UTFName_T& UTF8 Name of the administrative level 1 of the POR |
const | Admin1ASCIIName_T& ASCII Name of the administrative level 1 of the POR |
const | Admin2UTFName_T& UTF8 Name of the administrative level 2 of the POR |
const | Admin2ASCIIName_T& ASCII Name of the administrative level 2 of the POR |
const | StateCode_T& Code of the state of the POR |
const | CountryCode_T& ISO code of the country of the POR |
const | CountryName_T& Name of the country of the POR |
const | ContinentName_T& Name of the continent of the POR |
const | OTransliterator& 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::buildIndexSets | ( | const OTransliterator & | iTransliterator | ) |
Build the (STL) sets of (Xapian-related) terms, spelling, synonyms, etc.
const | OTransliterator& Unicode transliterator |
Definition at line 445 of file Place.cpp.
References OPENTREP::WordCombinationHolder::_list, addNameToXapianSets(), addTermSet(), OPENTREP::Location::getAdmin1AsciiName(), OPENTREP::Location::getAdmin1Code(), OPENTREP::Location::getAdmin1UtfName(), OPENTREP::Location::getAdmin2AsciiName(), OPENTREP::Location::getAdmin2UtfName(), OPENTREP::Location::getAsciiName(), OPENTREP::Location::getCityAsciiName(), OPENTREP::Location::getCityCode(), OPENTREP::Location::getCityUtfName(), OPENTREP::Location::getCommonName(), OPENTREP::Location::getContinentName(), OPENTREP::Location::getCountryCode(), OPENTREP::Location::getCountryName(), OPENTREP::Location::getFaaCode(), OPENTREP::Location::getFeatureCode(), OPENTREP::Location::getGeonamesID(), OPENTREP::Location::getIataCode(), OPENTREP::Location::getIcaoCode(), OPENTREP::Names::getNameList(), OPENTREP::NameMatrix::getNameMatrix(), OPENTREP::Location::getNameMatrix(), OPENTREP::Location::getPageRank(), OPENTREP::Location::getStateCode(), getTermSet(), OPENTREP::K_DEFAULT_INDEXING_EXTRA_WEIGHT, OPENTREP::K_DEFAULT_INDEXING_STD_WEIGHT, and OPENTREP::OTransliterator::normalise().
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.
const | Weight_T& The weight with which the terms should be indexed |
const | std::string& Name of the POR (point of reference) |
const | FeatureCode_T& Geonames feature code |
Definition at line 269 of file Place.cpp.
References addTermSet(), OPENTREP::Location::getFeatureList(), and getTermSet().
|
virtual |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Implements OPENTREP::BomAbstract.
Definition at line 146 of file Place.cpp.
References toString().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements OPENTREP::BomAbstract.
|
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().
|
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().
|
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().
|
friend |