crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
TargetTableProperties.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  * TargetTableProperties.hpp
24  *
25  * Target table properties (type, website, URL list, table name and full name, columns and compression).
26  *
27  * Created on: Mar 4, 2019
28  * Author: ans
29  */
30 
31 
32 #ifndef STRUCT_TARGETTABLEPROPERTIES_HPP_
33 #define STRUCT_TARGETTABLEPROPERTIES_HPP_
34 
35 #include "TableColumn.hpp"
36 
37 #include <cstdint> // std::uint64_t
38 #include <string> // std::string
39 #include <vector> // std::vector
40 
41 namespace crawlservpp::Struct {
42 
47 
49 
52  std::string type;
53 
55  std::uint64_t website{};
56 
58  std::uint64_t urlList{};
59 
61  std::string name;
62 
64  std::string fullName;
65 
67  std::vector<TableColumn> columns;
68 
70  bool compressed{false};
71 
75 
77  TargetTableProperties() = default;
78 
80 
102  const std::string& setType,
103  std::uint64_t setWebsite,
104  std::uint64_t setUrlList,
105  const std::string& setName,
106  const std::string& setFullName,
107  bool setCompressed
108  ) : type(setType),
109  website(setWebsite),
110  urlList(setUrlList),
111  name(setName),
112  fullName(setFullName),
113  compressed(setCompressed) {}
114 
116 
141  const std::string& setType,
142  std::uint64_t setWebsite,
143  std::uint64_t setUrlList,
144  const std::string& setName,
145  const std::string& setFullName,
146  const std::vector<TableColumn>& setColumns,
147  bool setCompressed
148  ) : type(setType),
149  website(setWebsite),
150  urlList(setUrlList),
151  name(setName),
152  fullName(setFullName),
153  columns(setColumns),
154  compressed(setCompressed) {}
155 
157  };
158 
159 } /* namespace crawlservpp::Struct */
160 
161 #endif /* STRUCT_TARGETTABLEPROPERTIES_HPP_ */
162 
TargetTableProperties()=default
Default constructor.
std::string name
View of a string containing the name of the table.
Definition: TargetTableProperties.hpp:61
Target table properties containing its type, website, URL list, table names, columns, and compression.
Definition: TargetTableProperties.hpp:44
bool compressed
Indicates whether compression is active for this table.
Definition: TargetTableProperties.hpp:70
std::string fullName
The full name of the table.
Definition: TargetTableProperties.hpp:64
TargetTableProperties(const std::string &setType, std::uint64_t setWebsite, std::uint64_t setUrlList, const std::string &setName, const std::string &setFullName, const std::vector< TableColumn > &setColumns, bool setCompressed)
Constructor setting properties and columns of the target table.
Definition: TargetTableProperties.hpp:140
std::vector< TableColumn > columns
Vector containing the columns of the table.
Definition: TargetTableProperties.hpp:67
std::string type
The type of the data stored in the table.
Definition: TargetTableProperties.hpp:52
std::uint64_t website
The ID of the website used for retrieving data to be stored in the table.
Definition: TargetTableProperties.hpp:55
TargetTableProperties(const std::string &setType, std::uint64_t setWebsite, std::uint64_t setUrlList, const std::string &setName, const std::string &setFullName, bool setCompressed)
Constructor setting properties, but not the columns of the target table.
Definition: TargetTableProperties.hpp:101
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43
std::uint64_t urlList
The ID of the URL list used for retrieving data to be stored in the table.
Definition: TargetTableProperties.hpp:58