JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
JSONFileSource.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 30/11/2018.
3 //
4 
5 #ifndef JODA_JSONFILESOURCE_H
6 #define JODA_JSONFILESOURCE_H
7 
8 #include "IImportSource.h"
9 
10 namespace joda::docparsing {
15  public:
16  JSONFileSource(const std::string &filePath, const double sample = 1);
17  JSONFileSource(std::string filePath, bool lineSeparated,
18  const double sample = 1.0);
19  void feedSources(
21  &queue,
23  ptok_t &ptok) override;
24  void feedSources(
27  &ptok) override;
28  size_t estimatedSize() override;
29  const std::string toString() override;
30  const std::string toQueryString() override;
31 
32  private:
33  std::string filePath;
34  double sample;
35  bool lineSeparated;
36 };
37 } // namespace joda::docparsing
38 
39 #endif // JODA_JSONFILESOURCE_H
Definition: IImportSource.h:16
Definition: JSONFileSource.h:14
const std::string toString() override
Definition: JSONFileSource.cpp:37
JSONFileSource(const std::string &filePath, const double sample=1)
Definition: JSONFileSource.cpp:10
size_t estimatedSize() override
Definition: JSONFileSource.cpp:67
const std::string toQueryString() override
Definition: JSONFileSource.cpp:43
void feedSources(JODA_READER_QUEUE< JODA_JSON_FILE_LINESEPERATED_READER_FLAG >::queue_t &queue, JODA_READER_QUEUE< JODA_JSON_FILE_LINESEPERATED_READER_FLAG >::queue_t::ptok_t &ptok) override
Definition: JSONFileSource.cpp:14
Definition: IImportSource.h:12
Definition: ReaderFlags.h:88