bes
Updated for version 3.20.6
|
32 #include <D4Attributes.h>
33 #include <D4BaseTypeFactory.h>
35 #include "BESDMRResponseHandler.h"
36 #include "BESDMRResponse.h"
37 #include "BESRequestHandlerList.h"
38 #include "BESDapNames.h"
39 #include "BESDapTransmit.h"
40 #include "BESContextManager.h"
41 #include "GlobalMetadataStore.h"
49 BESDMRResponseHandler::BESDMRResponseHandler(
const string &name) :
54 BESDMRResponseHandler::~BESDMRResponseHandler()
77 dhi.action_name = DMR_RESPONSE_STR;
79 bool xml_base_found =
false;
80 string xml_base = BESContextManager::TheManager()->
get_context(
"xml:base", xml_base_found);
96 d_response_object = 0;
104 if (xml_base_found && !xml_base.empty()) dmr->set_request_xml_base(xml_base);
113 d_response_object = bdmr;
118 if (xml_base_found && !xml_base.empty()) dmr->set_request_xml_base(xml_base);
127 #if ANNOTATION_SYSTEM
129 if (!d_annotation_service_url.empty()) {
130 unique_ptr<D4Attribute> annotation_url(
new D4Attribute(DODS_EXTRA_ANNOTATION_ATTR, attr_str_c));
131 annotation_url->add_value(d_annotation_service_url);
134 if (dmr->root() && dmr->root()->attributes()->get(DODS_EXTRA_ATTR_TABLE)) {
135 dmr->root()->attributes()->get(DODS_EXTRA_ATTR_TABLE)->attributes()->add_attribute_nocopy(annotation_url.release());
139 unique_ptr<D4Attribute> dods_extra(
new D4Attribute(DODS_EXTRA_ATTR_TABLE, attr_container_c));
140 dods_extra->attributes()->add_attribute_nocopy(annotation_url.release());
144 unique_ptr<D4BaseTypeFactory> factory(
new D4BaseTypeFactory);
145 dmr->set_factory(factory.get());
146 dmr->root()->attributes()->add_attribute_nocopy(dods_extra.release());
150 dmr->root()->attributes()->add_attribute_nocopy(dods_extra.release());
178 if (d_response_object) {
179 transmitter->send_response(DMR_SERVICE, d_response_object, dhi);
191 strm << BESIndent::LMarg <<
"BESDMRResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
194 BESIndent::UnIndent();
198 BESDMRResponseHandler::DMRResponseBuilder(
const string &name)
BESContainer * container
pointer to current container in this interface
virtual void set_dap4_constraint(BESDataHandlerInterface &dhi)
set the constraint depending on the context
virtual void dump(std::ostream &strm) const
dumps information about this object
std::string get_dap4_function() const
retrieve the constraint expression for this container
virtual void dump(std::ostream &strm) const
dumps information about this object
std::string get_relative_name() const
Get the relative name of the object in this container.
virtual void execute_each(BESDataHandlerInterface &dhi)
for each container in the given data handler interface, execute the given request
response handler that builds an OPeNDAP DMR response object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command <get type-"dmr" definition="..">
handler object that knows how to create a specific response object
virtual void clear_container()
clear the container in the DAP response object
void first_container()
set the container pointer to the first container in the containers list
virtual std::string get_context(const std::string &name, bool &found)
retrieve the value of the specified context from the BES
Structure storing information used by the BES to handle the request.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
std::string get_dap4_constraint() const
retrieve the constraint expression for this container
Represents an OPeNDAP DMR DAP4 data object within the BES.
- dap
- BESDMRResponseHandler.cc