33#include <libdap/util.h>
37#include "BESDapRequestHandler.h"
38#include "BESResponseHandler.h"
39#include "BESDapNames.h"
40#include "BESResponseNames.h"
41#include "BESVersionInfo.h"
43BESDapRequestHandler::BESDapRequestHandler(
const string &name )
46 add_method( HELP_RESPONSE, BESDapRequestHandler::dap_build_help ) ;
47 add_method( VERS_RESPONSE, BESDapRequestHandler::dap_build_version ) ;
50BESDapRequestHandler::~BESDapRequestHandler()
58 BESInfo *info =
dynamic_cast < BESInfo *
>(response) ;
60 throw BESInternalError(
"cast error", __FILE__, __LINE__ ) ;
62 map<string,string, std::less<>> attrs ;
63 attrs[
"name"] = libdap_name() ;
64 attrs[
"version"] = libdap_version() ;
65 info->begin_tag(
"module", &attrs ) ;
67 info->end_tag(
"module" ) ;
76 BESVersionInfo *info =
dynamic_cast < BESVersionInfo *
>(response) ;
78 throw BESInternalError(
"cast error", __FILE__, __LINE__ ) ;
80 info->add_library( libdap_name(), libdap_version() ) ;
81 list<string> versions ;
82 versions.push_back(
"2.0" ) ;
83 versions.push_back(
"3.0" ) ;
84 versions.push_back(
"3.2" ) ;
85 info->add_service( OPENDAP_SERVICE, versions ) ;
99 strm << BESIndent::LMarg <<
"BESDapRequestHandler::dump - ("
100 << (
void *)
this <<
")" << endl ;
101 BESIndent::Indent() ;
103 BESIndent::UnIndent() ;
virtual void dump(std::ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
virtual void add_data_from_file(const std::string &key, const std::string &name)
add data from a file to the informational object.
Represents a specific data type request handler.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual BESResponseObject * get_response_object()
return the current response object