JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
JSONFileDirectorySource.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 30/11/2018.
3 //
4 
5 #ifndef JODA_JSONFILEDIRECTORYSOURCE_H
6 #define JODA_JSONFILEDIRECTORYSOURCE_H
7 
8 #include "IImportSource.h"
9 
10 namespace joda::docparsing {
11 
16  public:
17  explicit JSONFileDirectorySource(const std::string &dirPath,
18  const double sample = 1);
19  explicit JSONFileDirectorySource(std::string dirPath, bool lineSeparated,
20  const double sample = 1.0);
21  void feedSources(
23  &queue,
25  ptok_t &ptok) override;
26  void feedSources(
29  &ptok) override;
30  size_t estimatedSize() override;
31  const std::string toString() override;
32  const std::string toQueryString() override;
33 
34  private:
35  bool lineSeparated;
36  std::string dirPath;
37  double sample;
38 };
39 } // namespace joda::docparsing
40 
41 #endif // JODA_JSONFILEDIRECTORYSOURCE_H
Definition: IImportSource.h:16
Definition: JSONFileDirectorySource.h:15
size_t estimatedSize() override
Definition: JSONFileDirectorySource.cpp:76
const std::string toQueryString() override
Definition: JSONFileDirectorySource.cpp:53
JSONFileDirectorySource(const std::string &dirPath, const double sample=1)
Definition: JSONFileDirectorySource.cpp:11
const std::string toString() override
Definition: JSONFileDirectorySource.cpp:47
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: JSONFileDirectorySource.cpp:15
Definition: IImportSource.h:12
Definition: ReaderFlags.h:88