39 #include <BaseTypeFactory.h>
40 #include <Ancillary.h>
43 #include <D4BaseTypeFactory.h>
44 #include <mime_util.h>
45 #include <InternalErr.h>
104 Ancillary::read_ancillary_das(*das, accessed);
107 catch (InternalErr &e) {
108 throw BESDapError(e.get_error_message(),
true, e.get_error_code(), __FILE__, __LINE__);
111 throw BESDapError(e.get_error_message(),
false, e.get_error_code(), __FILE__, __LINE__);
114 throw BESDapError(
"Caught unknown error build CSV DAS response",
true, unknown_error, __FILE__, __LINE__);
129 BaseTypeFactory *factory =
new BaseTypeFactory;
130 dds->set_factory(factory);
134 dds->filename(accessed);
136 Ancillary::read_ancillary_dds(*dds, accessed);
140 Ancillary::read_ancillary_das(das, accessed);
141 dds->transfer_attributes(&das);
146 catch (InternalErr &e) {
147 throw BESDapError(e.get_error_message(),
true, e.get_error_code(), __FILE__, __LINE__);
150 throw BESDapError(e.get_error_message(),
false, e.get_error_code(), __FILE__, __LINE__);
153 throw BESDapError(
"Caught unknown error build CSV DDS response",
true, unknown_error, __FILE__, __LINE__);
168 BaseTypeFactory *factory =
new BaseTypeFactory;
169 dds->set_factory(factory);
173 dds->filename(accessed);
175 Ancillary::read_ancillary_dds(*dds, accessed);
179 Ancillary::read_ancillary_das(das, accessed);
180 dds->transfer_attributes(&das);
185 catch (InternalErr &e) {
186 throw BESDapError(e.get_error_message(),
true, e.get_error_code(), __FILE__, __LINE__);
189 throw BESDapError(e.get_error_message(),
false, e.get_error_code(), __FILE__, __LINE__);
192 throw BESDapError(
"Caught unknown error build CSV DataDDS response",
true, unknown_error, __FILE__, __LINE__);
211 BaseTypeFactory factory;
212 DDS dds(&factory, name_path(data_path),
"3.2");
213 dds.filename(data_path);
222 Ancillary::read_ancillary_das(das, data_path);
223 dds.transfer_attributes(&das);
225 catch (InternalErr &e) {
226 throw BESDapError(e.get_error_message(),
true, e.get_error_code(), __FILE__, __LINE__);
229 throw BESDapError(e.get_error_message(),
false, e.get_error_code(), __FILE__, __LINE__);
232 throw BESDapError(
"Caught unknown error build CSV DMR response",
true, unknown_error, __FILE__, __LINE__);
245 dmr->set_factory(
new D4BaseTypeFactory);
246 dmr->build_using_dds(dds);
268 info->
add_module(MODULE_NAME, MODULE_VERSION);
278 map<string, string> attrs;
283 attrs[
"handles"] = handles;
292 strm <<
BESIndent::LMarg <<
"CSVRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
static bool csv_build_dds(BESDataHandlerInterface &dhi)
brief represents simple text information in a response object, such as version and help inforamtion...
#define DAP4DATA_RESPONSE
exception thrown if inernal error encountered
CSVRequestHandler(string name)
Represents an OPeNDAP DDS DAP2 data object within the BES.
virtual void dump(ostream &strm) const
dumps information about this object
static bool csv_build_vers(BESDataHandlerInterface &dhi)
virtual void set_dap4_constraint(BESDataHandlerInterface &dhi)
set the constraint depending on the context
virtual string access()=0
returns the true name of this container
virtual void set_dap4_function(BESDataHandlerInterface &dhi)
set the constraint depending on the context
informational response object
virtual BESResponseObject * get_response_object()
return the current response object
BESResponseHandler * response_handler
static bool csv_build_dmr(BESDataHandlerInterface &dhi)
This method is used to respond to both the DMR and DAP requests because the DMR holds data (I did not...
virtual void set_constraint(BESDataHandlerInterface &dhi)
set the constraint depending on the context
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
Represents an OPeNDAP DMR DAP4 data object within the BES.
error object created from libdap error objects and can handle those errors
Represents an OPeNDAP DataDDS DAP2 data object within the BES.
void csv_read_attributes(DAS &das, const string &filename)
static bool csv_build_data(BESDataHandlerInterface &dhi)
Represents a specific data type request handler.
static bool csv_build_das(BESDataHandlerInterface &dhi)
void csv_read_descriptors(DDS &dds, const string &filename)
virtual ~CSVRequestHandler(void)
Structure storing information used by the BES to handle the request.
virtual bool add_handler(const string &handler_name, p_request_handler handler_method)
add a handler method to the request handler that knows how to fill in a specific response object ...
Represents an OPeNDAP DAS DAP2 data object within the BES.
virtual void dump(ostream &strm) const
dumps information about this object
static bool csv_build_help(BESDataHandlerInterface &dhi)
virtual void add_module(const string &n, const string &v)
Abstract base class representing a specific set of information in response to a request to the BES...
BESContainer * container
pointer to current container in this interface
virtual void end_tag(const string &tag_name)