crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
DataEntry.hpp
Go to the documentation of this file.
1 /*
2  *
3  * ---
4  *
5  * Copyright (C) 2020 Anselm Schmidt (ans[ät]ohai.su)
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version in addition to the terms of any
11  * licences already herein identified.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  *
21  * ---
22  *
23  * DataEntry.hpp
24  *
25  * Parsed or extracted data (content ID, parsed ID, parsed date/time, parsed or extracted fields).
26  *
27  * Created on: Oct 11, 2018
28  * Author: ans
29  */
30 
31 #ifndef STRUCT_DATAENTRY_HPP_
32 #define STRUCT_DATAENTRY_HPP_
33 
34 #include <cstdint> // std::uint64_t
35 #include <string> // std::string
36 #include <vector> // std::vector
37 
38 namespace crawlservpp::Struct {
39 
41 
45  struct DataEntry {
48 
50  std::uint64_t contentId;
51 
53  std::string dataId;
54 
56  std::string dateTime;
57 
59  std::vector<std::string> fields;
60 
64 
65  // Constructor setting the content ID.
71  explicit DataEntry(std::uint64_t setContentId) : contentId(setContentId) {}
72 
74  };
75 
76 } /* namespace crawlservpp::Struct */
77 
78 #endif /* STRUCT_DATAENTRY_HPP_ */
A data entry containing either parsed or extracted data.
Definition: DataEntry.hpp:45
DataEntry(std::uint64_t setContentId)
Definition: DataEntry.hpp:71
std::string dataId
The ID of the data that has been either parsed or extracted.
Definition: DataEntry.hpp:53
std::uint64_t contentId
The ID of the content from which the data has been either parsed or extracted.
Definition: DataEntry.hpp:50
std::vector< std::string > fields
A vector containing the data fields that have been either parsed or extracted.
Definition: DataEntry.hpp:59
std::string dateTime
The date/time of the data that has been either parsed or extracted.
Definition: DataEntry.hpp:56
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43