33#ifndef MODULES_NGAP_MODULE_NGAPAPI_H_
34#define MODULES_NGAP_MODULE_NGAPAPI_H_
40#include "BESCatalogUtils.h"
47 std::string d_cmr_hostname;
48 std::string d_cmr_search_endpoint_path;
50 std::string get_cmr_search_endpoint_url();
51 std::string find_get_data_url_in_granules_umm_json_v1_4(
const std::string &restified_path, rapidjson::Document &cmr_granule_response);
52 std::string build_cmr_query_url(
const std::string &restified_path);
53 std::string build_cmr_query_url_old_rpath_format(
const std::string &restified_path);
55 friend class NgapApiTest;
62 const std::string &restified_path,
63 const std::string &uid=
"");
65 static bool signed_url_is_expired(
const http::url &signed_url) ;
68 void get_years(std::string collection_name, std::vector<std::string> &years_result);
69 void get_months(std::string collection_name, std::string year, std::vector<std::string> &months_result);
70 void get_days(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &days_result);
71 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);
72 void get_granule_ids(std::string collection_name, std::string r_year, std::string r_month, std::vector<std::string> &granules_result);
73 void get_granules(std::string collection_name, std::string r_year, std::string r_month, std::string r_day, std::vector<ngap::Granule *> &granules);
74 void get_collection_ids(std::vector<std::string> &collection_ids);
75 unsigned long granule_count(std::string collection_name,std:: string r_year, std::string r_month, std::string r_day);
76 ngap::Granule *get_granule(
const std::string path);
77 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.