OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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
14namespace Xapian {
15 class WritableDatabase;
16}
17
18// SOCI (for SQL database)
19namespace soci {
20 class session;
21 class statement;
22}
23
24namespace 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&,
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
Command wrapping the travel request process.
friend class OPENTREP_Service
Class modelling a place/POR (point of reference).
Definition Place.hpp:29
bool shouldAddPORInSQLDB_T
unsigned int NbOfDBEntries_T
bool shouldIndexPORInXapian_T
bool shouldIndexNonIATAPOR_T
Enumeration of database types.
Definition DBType.hpp:17