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 |
typedef std::list< std::string > | CityNameList_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 UNLOCodeList_T & | getUNLOCodeList () const |
const UICCodeList_T & | getUICCodeList () 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 CityDetailsList_T & | getCityList () const |
const StateCode_T & | getStateCode () const |
const CountryCode_T & | getCountryCode () const |
const AltCountryCode_T & | getAltCountryCode () const |
const CountryName_T & | getCountryName () const |
const WAC_T & | getWAC () const |
const WACName_T & | getWACName () const |
const CurrencyCode_T & | getCurrencyCode () 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 Latitude_T & | getGeonameLatitude () const |
const Longitude_T & | getGeonameLongitude () 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 | 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 Location & | completeLocation () |
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 |
typedef std::set<std::string> OPENTREP::Place::StringSet_T |
typedef std::map<const Weight_T, StringSet_T> OPENTREP::Place::TermSetMap_T |
typedef std::list<std::string> OPENTREP::Place::CityNameList_T |
|
inline |
|
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().
|
inline |
Get the IATA code.
Definition at line 66 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB(), 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 73 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
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().
|
inline |
State whether that POR is referenced by Geonames.
Definition at line 87 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
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().
|
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().
|
inline |
Get the list of UN/LOCODE five-letter codes.
Definition at line 108 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
inline |
Get the list of UIC codes.
Definition at line 115 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
inline |
|
inline |
|
inline |
|
inline |
Get the envelope ID.
Definition at line 144 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
inline |
Get the beginning date of the validity period
Definition at line 151 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
inline |
Get the end date of the validity period
Definition at line 158 of file Place.hpp.
Referenced by OPENTREP::DBManager::insertPlaceInDB().
|
inline |
|
inline |
|
inline |
Get the state code.
Definition at line 179 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
Get the country code.
Definition at line 186 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
|
inline |
Get the country name.
Definition at line 200 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
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().
|
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().
|
inline |
|
inline |
|
inline |
Get the continent name.
Definition at line 235 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
Get the time-zone.
Definition at line 242 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
|
inline |
|
inline |
|
inline |
Get the geographical latitude.
Definition at line 270 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
Get the geographical longitude.
Definition at line 277 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the PageRank/importance.
Definition at line 375 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
|
inline |
Get the Wikipedia link.
Definition at line 389 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::to_base().
|
inline |
|
inline |
|
inline |
Get the map of name lists.
Definition at line 410 of file Place.hpp.
References OPENTREP::NameMatrix::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 423 of file Place.hpp.
Referenced by completeLocation().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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().
|
inline |
Get the Xapian document ID.
Definition at line 474 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 495 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 228 of file Place.cpp.
References getTermSet().
Referenced by addNameToXapianSets(), addNameToXapianSets(), buildIndexSets(), and getTermSet().
|
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().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the IATA code.
Definition at line 547 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
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().
|
inline |
Set the Geonames ID.
Definition at line 561 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
|
inline |
Set the FAA code.
Definition at line 575 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
|
inline |
|
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().
|
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().
|
inline |
|
inline |
Set the envelope ID.
Definition at line 618 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
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().
|
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().
|
inline |
Set the commentaries.
Definition at line 639 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
|
inline |
Set the state code.
Definition at line 653 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the country code.
Definition at line 660 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the alternative country code.
Definition at line 667 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the country name.
Definition at line 674 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
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().
|
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().
|
inline |
|
inline |
Set the continent name.
Definition at line 702 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the time-zone.
Definition at line 709 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
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().
|
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().
|
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().
|
inline |
Set the geographical latitude.
Definition at line 737 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the geographical longitude.
Definition at line 744 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
inline |
Set the population (number of inhabitants).
Definition at line 821 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the elevation.
Definition at line 828 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the GTopo30.
Definition at line 835 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the PageRank.
Definition at line 842 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the modification date.
Definition at line 849 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Set the Wikipedia link.
Definition at line 856 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
|
inline |
|
inline |
Set the original keywords.
Definition at line 877 of file Place.hpp.
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the corrected keywords.
Definition at line 884 of file Place.hpp.
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the Xapian matching percentage.
Definition at line 891 of file Place.hpp.
Referenced by OPENTREP::Result::fillPlace().
|
inline |
Set the allowed edit distance/error.
Definition at line 898 of file Place.hpp.
Referenced by OPENTREP::Result::fillPlace().
|
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().
|
inline |
|
inline |
Set the Xapian document ID.
Definition at line 920 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 242 of file Place.cpp.
References addTermSet().
Referenced by addNameToXapianSets(), addNameToXapianSets(), addTermSet(), 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 946 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
|
inline |
Reset the map of name lists.
Definition at line 954 of file Place.hpp.
Referenced by soci::type_conversion< OPENTREP::Place >::from_base().
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().
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 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().
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".
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 | CityNameList_T& UTF8 names of the list of served cities |
const | CityNameList_T& ASCII names of the list of served cities |
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 298 of file Place.cpp.
References addNameToXapianSets(), addTermSet(), createStringFromWordList(), getTermSet(), OPENTREP::OTransliterator::normalise(), and tokeniseStringIntoWordList().
Referenced by addNameToXapianSets(), addNameToXapianSets(), and 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 465 of file Place.cpp.
References OPENTREP::WordCombinationHolder::_list, addNameToXapianSets(), addTermSet(), buildIndexSets(), OPENTREP::CityDetails::getAsciiName(), OPENTREP::CityDetails::getIataCode(), OPENTREP::Names::getNameList(), OPENTREP::NameMatrix::getNameMatrix(), getTermSet(), OPENTREP::CityDetails::getUtfName(), OPENTREP::K_DEFAULT_INDEXING_EXTRA_WEIGHT, OPENTREP::K_DEFAULT_INDEXING_STD_WEIGHT, and OPENTREP::OTransliterator::normalise().
Referenced by buildIndexSets().
void OPENTREP::Place::addNameToXapianSets | ( | const Weight_T & | iWeight, |
const std::string & | iBaseName, | ||
const FeatureCode_T & | iFeatureCode ) |
Add the given name to the Xapian index with the given weight. Derive a list of feature names from the feature code. See the Location::getFeatureList() method for more information.
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 271 of file Place.cpp.
References addNameToXapianSets(), 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 148 of file Place.cpp.
References toStream(), and toString().
Referenced by toStream().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements OPENTREP::BomAbstract.
Definition at line 153 of file Place.cpp.
References fromStream().
Referenced by fromStream().
|
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().
|
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().
|
virtual |
Get the serialised version of the Place object.
Implements OPENTREP::BomAbstract.
Definition at line 85 of file Place.cpp.
References toShortString(), and toString().
Referenced by OPENTREP::createPlaces(), OPENTREP::DBManager::insertPlaceInDB(), toString(), OPENTREP::PlaceHolder::toString(), and OPENTREP::DBManager::updatePlaceInDB().
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().
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().
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().
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().
|
friend |
|
friend |
|
friend |
|
friend |