OpenTREP Logo  0.07.4
C++ Open Travel Request Parsing Library
IndexBuilder.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_CMD_INDEXBUILDER_HPP
2 #define __OPENTREP_CMD_INDEXBUILDER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // OpenTrep
9 
13 // Xapian
14 namespace Xapian {
15  class WritableDatabase;
16 }
17 
18 // SOCI (for SQL database)
19 namespace soci {
20  class session;
21  class statement;
22 }
23 
24 namespace OPENTREP {
25 
26  // Forward declarations
27  class Place;
28  class OTransliterator;
29 
33  class IndexBuilder {
34  friend class OPENTREP_Service;
35  private:
36 
44  static void addDocumentToIndex (Xapian::WritableDatabase&,
45  Place&, const OTransliterator&);
46 
59  static NbOfDBEntries_T buildSearchIndex (Xapian::WritableDatabase*,
60  const DBType&, soci::session*,
61  std::istream& iPORFileStream,
63  const OTransliterator&);
64 
77  static NbOfDBEntries_T buildSearchIndex (const PORFilePath_T&,
78  const TravelDBFilePath_T&,
79  const DBType&,
83  const shouldAddPORInSQLDB_T&,
84  const OTransliterator&);
85 
86  private:
90  IndexBuilder() {}
91 
95  IndexBuilder(const IndexBuilder&) {}
96 
100  ~IndexBuilder() {}
101  };
102 
103 }
104 #endif // __OPENTREP_CMD_INDEXBUILDER_HPP
OPENTREP::shouldIndexNonIATAPOR_T
bool shouldIndexNonIATAPOR_T
Definition: OPENTREP_Types.hpp:136
OPENTREP::NbOfDBEntries_T
unsigned int NbOfDBEntries_T
Definition: OPENTREP_Types.hpp:680
OPENTREP::OPENTREP_Service
Interface for the OPENTREP Services.
Definition: OPENTREP_Service.hpp:25
OPENTREP::IndexBuilder
Command wrapping the travel request process.
Definition: IndexBuilder.hpp:33
OPENTREP::OTransliterator
Definition: OTransliterator.hpp:18
OPENTREP::PORFilePath_T
Definition: OPENTREP_Types.hpp:37
OPENTREP::SQLDBConnectionString_T
Definition: OPENTREP_Types.hpp:56
soci
Definition: DBManager.hpp:14
OPENTREP::shouldAddPORInSQLDB_T
bool shouldAddPORInSQLDB_T
Definition: OPENTREP_Types.hpp:146
OPENTREP
Definition: BasChronometer.cpp:10
OPENTREP::TravelDBFilePath_T
Definition: OPENTREP_Types.hpp:46
OPENTREP::Place
Class modelling a place/POR (point of reference).
Definition: Place.hpp:29
OPENTREP::shouldIndexPORInXapian_T
bool shouldIndexPORInXapian_T
Definition: OPENTREP_Types.hpp:141
OPENTREP::DBType
Enumeration of database types.
Definition: DBType.hpp:17
Xapian
Definition: ResultCombination.hpp:13
OPENTREP_Types.hpp