37#include <libdap/DDS.h>
39#include "BESDDSResponseHandler.h"
40#include "BESDDSResponse.h"
41#include "BESRequestHandlerList.h"
42#include "BESDapNames.h"
43#include "BESDataNames.h"
44#include "BESTransmitter.h"
46#include "GlobalMetadataStore.h"
52BESDDSResponseHandler::BESDDSResponseHandler(
const string &name) :
57BESDDSResponseHandler::~BESDDSResponseHandler()
70function_in_ce(
const string &ce)
73 return ce.find(
"(") != string::npos || ce.find(
"%28") != string::npos;
97 dhi.action_name = DDS_RESPONSE_STR;
110 d_response_object = 0;
122 d_response_object = bdds;
125 dds =
new DDS(NULL,
"virtual");
129 BESRequestHandlerList::TheList()->execute_each(dhi);
135 if (!d_annotation_service_url.empty()) {
140 AttrTable *dods_extra = resp_dds->
get_dds()->get_attr_table().find_container(DODS_EXTRA_ATTR_TABLE);
142 dods_extra->append_attr(DODS_EXTRA_ANNOTATION_ATTR,
"String", d_annotation_service_url);
145 new_dods_extra->append_attr(DODS_EXTRA_ANNOTATION_ATTR,
"String", d_annotation_service_url);
146 resp_dds->
get_dds()->get_attr_table().append_container(new_dods_extra.release(), DODS_EXTRA_ATTR_TABLE);
175 if (d_response_object) {
176 transmitter->send_response(DDS_SERVICE, d_response_object, dhi);
188 strm << BESIndent::LMarg <<
"BESDDSResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
191 BESIndent::UnIndent();
195BESDDSResponseHandler::DDSResponseBuilder(
const string &name)
std::string get_relative_name() const
Get the relative name of the object in this container.
std::string get_constraint() const
retrieve the constraint expression for this container
response handler that builds an OPeNDAP DDS response object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command <get type="dds" definition=...>
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
Holds a DDS object within the BES.
virtual void clear_container()
clear the container in the DAP response object
virtual void set_constraint(BESDataHandlerInterface &dhi)
set the constraint depending on the context
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