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" 52 BESDDSResponseHandler::BESDDSResponseHandler(
const string &name) :
57 BESDDSResponseHandler::~BESDDSResponseHandler()
70 function_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");
133 #if ANNOTATION_SYSTEM 135 if (!d_annotation_service_url.empty()) {
137 BESDDSResponse *resp_dds = static_cast<BESDDSResponse*>(d_response_object);
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);
144 auto_ptr<AttrTable> new_dods_extra(
new AttrTable);
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);
154 mds->
add_responses(static_cast<BESDDSResponse*>(d_response_object)->get_dds(),
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();
195 BESDDSResponseHandler::DDSResponseBuilder(
const string &name)
std::string get_relative_name() const
Get the relative name of the object in this container.
Holds a DDS object within the BES.
handler object that knows how to create a specific response object
virtual void set_constraint(BESDataHandlerInterface &dhi)
set the constraint depending on the context
virtual void execute_each(BESDataHandlerInterface &dhi)
for each container in the given data handler interface, execute the given request
virtual void clear_container()
clear the container in the DAP response object
virtual void dump(ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
string get_constraint() const
retrieve the constraint expression for this container
response handler that builds an OPeNDAP DDS response object
void first_container()
set the container pointer to the first container in the containers list
virtual void dump(std::ostream &strm) const
dumps information about this object
BESContainer * container
pointer to current container in this interface
virtual void execute(BESDataHandlerInterface &dhi)
executes the command <get type="dds" definition=...>
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object