2 #include <SimoxUtility/algorithm/vector.hpp>
12 const std::string& prefix)
14 if (not defs->hasDefinition(prefix +
"packageName"))
17 prefix +
"packageName",
18 "The name of the prior knowledge data package.");
31 const std::filesystem::path absPathToDataset = this->
getFullPath(dataset);
32 if (std::filesystem::is_regular_file(absPathToDataset))
38 for (
const auto& d : std::filesystem::directory_iterator(absPathToDataset))
40 if (!d.is_directory())
45 std::string k = d.path().filename();
51 if (not this->
check(dataset, k))
63 if (std::filesystem::is_regular_file(absPath))
69 for (
const auto& d : std::filesystem::directory_iterator(absPath))
71 if (!d.is_directory())
76 std::string k = d.path().filename();
103 const std::filesystem::path idPath = std::filesystem::path(dataset) / id;
104 const std::filesystem::path absPathToId = this->
getFullPath(idPath);
106 return this->
accept(absPathToId);
113 if (std::filesystem::is_regular_file(absPath))
119 for (
const auto& d : std::filesystem::directory_iterator(absPath))
121 if (!d.is_directory())
126 std::string k = d.path().filename();
132 if (this->
check(k,
id))
140 std::optional<PKDatasetFinderInfo>
143 const std::filesystem::path idPath = std::filesystem::path(dataset) / id;
144 const std::filesystem::path absPathToId = this->
getFullPath(idPath);
146 if (this->
check(dataset,
id))
158 std::optional<PKDatasetFinderInfo>
162 if (std::filesystem::is_regular_file(absPath))
168 std::vector<PKDatasetFinderInfo>
ret;
169 for (
const auto& d : std::filesystem::directory_iterator(absPath))
171 if (!d.is_directory())
176 std::string k = d.path().filename();
182 if (
auto op = this->
find(k,
id); op.has_value())
190 std::vector<PKDatasetFinderInfo>
194 if (std::filesystem::is_regular_file(absPath))
200 std::vector<PKDatasetFinderInfo>
ret;
201 for (
const auto& d : std::filesystem::directory_iterator(absPath))
203 if (!d.is_directory())
208 std::string k = d.path().filename();
214 auto idsForDataset = this->
findAll(k);
215 simox::alg::append(
ret, idsForDataset);
220 std::vector<PKDatasetFinderInfo>
223 const std::filesystem::path absPathToDataset = this->
getFullPath(dataset);
224 if (std::filesystem::is_regular_file(absPathToDataset))
230 std::vector<PKDatasetFinderInfo>
ret;
231 for (
const auto& d : std::filesystem::directory_iterator(absPathToDataset))
233 if (!d.is_directory())
238 std::string k = d.path().filename();
244 if (
auto op = this->
find(dataset, k); op.has_value())
246 ret.emplace_back(op.value());