27#include <libdap/DMR.h>
29#include "BESDap4ResponseHandler.h"
30#include "BESDMRResponse.h"
31#include "BESRequestHandlerList.h"
32#include "BESDapNames.h"
33#include "BESDapTransmit.h"
34#include "BESContextManager.h"
35#include "TheBESKeys.h"
38#include "GlobalMetadataStore.h"
43BESDap4ResponseHandler::BESDap4ResponseHandler(
const string &name)
50BESDap4ResponseHandler::~BESDap4ResponseHandler()
63 dhi.action_name = DAP4DATA_RESPONSE_STR;
86 unique_ptr<DMR> dmr(
new DMR());
89 int response_size_limit = BESContextManager::TheManager()->get_context_int(
"max_response_size", found);
92 dmr->set_response_limit_kb(response_size_limit);
96 BESRequestHandlerList::TheList()->execute_each(dhi);
113 if (d_response_object) {
114 transmitter->send_response(DAP4DATA_SERVICE, d_response_object, dhi);
126 strm << BESIndent::LMarg <<
"BESDap4ResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
129 BESIndent::UnIndent();
133BESDap4ResponseHandler::Dap4ResponseBuilder(
const string &name)
void set_container_type(const std::string &type)
set the type of data that this container represents, such as cedar or netcdf.
std::string get_relative_name() const
Get the relative name of the object in this container.
void set_attributes(const std::string &attrs)
set desired attributes for this container
Represents an OPeNDAP DMR DAP4 data object within the BES.
response handler that builds an OPeNDAP Dap4 data response
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'get dap for def_name;'
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
Structure storing information used by the BES to handle the request.
void first_container()
set the container pointer to the first container in the containers list
BESContainer * container
pointer to current container in this interface
handler object that knows how to create a specific response object
void dump(std::ostream &strm) const override
dumps information about this object
static TheBESKeys * TheKeys()
Access to the singleton.
static bool read_bool_key(const std::string &key, bool default_value)
Read a boolean-valued key from the bes.conf file.
static std::string read_string_key(const std::string &key, const std::string &default_value)
Read a string-valued key from the bes.conf file.