35#include <libdap/DataDDS.h>
37#include "BESDataDDXResponseHandler.h"
38#include "BESDataDDSResponse.h"
39#include "BESRequestHandlerList.h"
40#include "BESDapNames.h"
41#include "BESDataNames.h"
42#include "BESTransmitter.h"
49BESDataDDXResponseHandler::BESDataDDXResponseHandler(
const string &name )
54BESDataDDXResponseHandler::~BESDataDDXResponseHandler( )
75 BESDEBUG(
"dap",
"Entering BESDataDDXResponseHandler::execute" << endl ) ;
77 dhi.action_name = DATADDX_RESPONSE_STR ;
81 DDS *dds =
new DDS( NULL,
"virtual" ) ;
83 d_response_object = bdds ;
87 d_response_name = DATA_RESPONSE ;
88 dhi.
action = DATA_RESPONSE ;
104 dhi.
data[POST_CONSTRAINT] = dds->get_keywords().parse_keywords(dhi.
data[POST_CONSTRAINT]);
105 if (dds->get_keywords().has_keyword(
"dap")) {
106 dds->set_dap_version(dds->get_keywords().get_keyword_value(
"dap"));
119 BESRequestHandlerList::TheList()->execute_each( dhi ) ;
122 dhi.
action = DATADDX_RESPONSE ;
123 d_response_object = bdds ;
125 BESDEBUG(
"dap",
"Leaving BESDataDDXResponseHandler::execute" << endl ) ;
144 if( d_response_object )
146 transmitter->send_response( DATADDX_SERVICE, d_response_object, dhi ) ;
159 strm << BESIndent::LMarg <<
"BESDataDDXResponseHandler::dump - ("
160 << (
void *)
this <<
")" << endl ;
161 BESIndent::Indent() ;
163 BESIndent::UnIndent() ;
167BESDataDDXResponseHandler::DataDDXResponseBuilder(
const string &name )
void set_constraint(const std::string &s)
set the constraint for this container
std::string get_constraint() const
retrieve the constraint expression for this container
std::string get_dap_client_protocol() const
Return the dap version string sent by the client (e.g., the OLFS)
std::string get_request_xml_base() const
Return the xml:base URL for this request.
Represents an OPeNDAP DataDDS DAP2 data object within the BES.
response handler that builds an OPeNDAP DDX object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'get ddx for def_name;'
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command
virtual void dump(std::ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
std::map< std::string, std::string > data
the map of string data that will be required for the current request.
std::string action
the response object requested, e.g. das, dds
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