29#include "FoCovJsonRequestHandler.h"
30#include <BESResponseHandler.h>
31#include <BESResponseNames.h>
32#include <BESVersionInfo.h>
33#include <BESDataNames.h>
34#include <BESDataNames.h>
35#include <TheBESKeys.h>
43bool FoCovJsonRequestHandler::_may_ignore_z_axis =
true;
44bool FoCovJsonRequestHandler::_simple_geo =
true;
47bool FoCovJsonRequestHandler::obtain_beskeys_info(
const string & key,
bool &has_key) {
49 bool ret_value =
false;
53 const string dosettrue =
"true";
54 const string dosetyes =
"yes";
56 ret_value = (dosettrue == doset || dosetyes == doset);
71 BESRequestHandler(name)
76 bool key_value = obtain_beskeys_info(
"FoCovJson.MAY_IGNORE_Z_AXIS",has_key);
78 _may_ignore_z_axis = key_value;
79 key_value = obtain_beskeys_info(
"FoCovJson.SIMPLE_GEO",has_key);
81 _simple_geo = key_value;
84if(_may_ignore_z_axis ==
true)
85std::cerr<<
"IGNORE mode "<<endl;
87std::cerr<<
"Strict mode "<<endl;
115 string key =
"FoCovJson.Reference";
118 if (ref.empty()) ref =
"https://docs.opendap.org/index.php/BES_-_Modules_-_FileOut_COVJSON";
119 map<string, string, std::less<>> attrs;
120 attrs[
"name"] = MODULE_NAME;
121 attrs[
"version"] = MODULE_VERSION;
123 attrs[
"reference"] = ref;
124 info->begin_tag(
"module", &attrs);
125 info->end_tag(
"module");
143 info->add_module(MODULE_NAME, MODULE_VERSION);
156 strm << BESIndent::LMarg <<
"FoCovJsonRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
159 BESIndent::UnIndent();
Structure storing information used by the BES to handle the request.
informational response object
exception thrown if internal error encountered
virtual bool add_handler(const std::string &name, p_request_handler_method method)
Backward compatibility with the older version of this class.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual BESResponseObject * get_response_object()
return the current response object
Abstract base class representing a specific set of information in response to a request to the BES.
static std::string lowercase(const std::string &s)
static bool build_version(BESDataHandlerInterface &dhi)
add version information to a version response
FoCovJsonRequestHandler(const std::string &name)
Constructor for FileOut Coverage JSON module.
virtual ~FoCovJsonRequestHandler(void)
Any cleanup that needs to take place.
virtual void dump(std::ostream &strm) const
dumps information about this object
static bool build_help(BESDataHandlerInterface &dhi)
adds help information for FileOut Coverage JSON to a help request
void get_value(const std::string &s, std::string &val, bool &found)
Retrieve the value of a given key, if set.
static TheBESKeys * TheKeys()
Access to the singleton.