33 #ifndef MODULES_NGAP_MODULE_NGAPAPI_H_
34 #define MODULES_NGAP_MODULE_NGAPAPI_H_
40 #include "BESCatalogUtils.h"
51 std::string d_cmr_hostname;
52 std::string d_cmr_search_endpoint_path;
54 std::string get_cmr_search_endpoint_url();
55 std::string find_get_data_url_in_granules_umm_json_v1_4(
const std::string &restified_path,
rapidjson::Document &cmr_granule_response);
56 std::string build_cmr_query_url(
const std::string &restified_path);
58 friend class NgapApiTest;
65 const std::string &restified_path,
66 const std::string &uid=
"");
68 static bool signed_url_is_expired(
const http::url &signed_url) ;
71 void get_years(std::string collection_name, std::vector<std::string> &years_result);
72 void get_months(std::string collection_name, std::string year, std::vector<std::string> &months_result);
73 void get_days(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &days_result);
74 void get_granule_ids(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::vector<std::string> &granules_result);
75 void get_granule_ids(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &granules_result);
76 void get_granules(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::vector<ngap::Granule *> &granules);
77 void get_collection_ids(std::vector<std::string> &collection_ids);
78 unsigned long granule_count(std::string collection_name,std:: string r_year, std::string r_month, std::string r_day);
79 ngap::Granule *get_granule(
const std::string path);
80 ngap::Granule *get_granule(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::string granule_id);
std::string convert_ngap_resty_path_to_data_access_url(const std::string &restified_path, const std::string &uid="")
Converts an NGAP restified granule path into a CMR metadata query for the granule.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.