31 #ifdef HAVE_UUID_UUID_H 32 #include <uuid/uuid.h> 33 #elif defined(HAVE_UUID_H) 36 #error "Could not find UUID library header" 57 #define CLEAR_LOCAL_DATA 58 #undef FUNCTION_CACHING 59 #undef USE_LOCAL_TIMEOUT_SCHEME 63 #include <Structure.h> 64 #include <ConstraintEvaluator.h> 65 #include <DDXParserSAX2.h> 66 #include <Ancillary.h> 67 #include <XDRStreamMarshaller.h> 68 #include <XDRFileUnMarshaller.h> 72 #include <XMLWriter.h> 73 #include <D4AsyncUtil.h> 74 #include <D4StreamMarshaller.h> 75 #include <chunked_ostream.h> 76 #include <chunked_istream.h> 77 #include <D4ConstraintEvaluator.h> 78 #include <D4FunctionEvaluator.h> 79 #include <D4BaseTypeFactory.h> 81 #include <ServerFunctionsList.h> 83 #include <mime_util.h> 86 #if USE_LOCAL_TIMEOUT_SCHEME 88 #include <SignalHandler.h> 89 #include <EventHandler.h> 90 #include <AlarmHandler.h> 94 #include "TheBESKeys.h" 95 #include "BESDapResponseBuilder.h" 96 #include "BESContextManager.h" 97 #include "BESDapResponseCache.h" 98 #include "BESStoredDapResultCache.h" 100 #include "BESDebug.h" 101 #include "BESStopWatch.h" 102 #include "DapFunctionUtils.h" 107 const string CRLF =
"\r\n";
108 const string BES_KEY_TIMEOUT_CANCEL =
"BES.CancelTimeoutOnSend";
117 string cancel_timeout_on_send =
"";
119 if (found && !cancel_timeout_on_send.empty()) {
121 downcase(cancel_timeout_on_send);
122 if (cancel_timeout_on_send ==
"yes" || cancel_timeout_on_send ==
"true")
123 d_cancel_timeout_on_send =
true;
127 BESDapResponseBuilder::~BESDapResponseBuilder()
129 #if USE_LOCAL_TIMEOUT_SCHEME 133 delete dynamic_cast<AlarmHandler*
>(SignalHandler::instance()->remove_handler(SIGALRM));
160 d_dap2ce = www2id(_ce,
"%",
"%20");
183 d_dap4ce = www2id(_ce,
"%",
"%20");
191 return d_dap4function;
207 d_dap4function = www2id(_func,
"%",
"%20");
210 std::string BESDapResponseBuilder::get_store_result()
const 212 return d_store_result;
215 void BESDapResponseBuilder::set_store_result(std::string _sr)
217 d_store_result = _sr;
218 BESDEBUG(
"dap",
"BESDapResponseBuilder::set_store_result() - store_result: " << _sr << endl);
221 std::string BESDapResponseBuilder::get_async_accepted()
const 223 return d_async_accepted;
226 void BESDapResponseBuilder::set_async_accepted(std::string _aa)
228 d_async_accepted = _aa;
229 BESDEBUG(
"dap",
"BESDapResponseBuilder::set_async_accepted() - async_accepted: " << _aa << endl);
257 d_dataset = www2id(ds,
"%",
"%20");
285 #if USE_LOCAL_TIMEOUT_SCHEME 300 #if USE_LOCAL_TIMEOUT_SCHEME 323 if (d_cancel_timeout_on_send)
337 #if USE_LOCAL_TIMEOUT_SCHEME 339 SignalHandler *sh = SignalHandler::instance();
340 EventHandler *old_eh = sh->register_handler(SIGALRM,
new AlarmHandler());
354 #if USE_LOCAL_TIMEOUT_SCHEME 357 SignalHandler *sh = SignalHandler::instance();
358 EventHandler *old_eh = sh->register_handler(SIGALRM,
new AlarmHandler());
371 #if USE_LOCAL_TIMEOUT_SCHEME 376 static string::size_type find_closing_paren(
const string &ce, string::size_type pos)
383 pos = ce.find_first_of(
"()", pos + 1);
384 if (pos == string::npos)
385 throw Error(malformed_expr,
"Expected to find a matching closing parenthesis in " + ce);
405 BESDEBUG(
"dap",
"BESDapResponseBuilder::split_ce() - source expression: " << expr << endl);
413 BESDEBUG(
"dap",
"BESDapResponseBuilder::split_ce() - ce: " << ce << endl);
415 string btp_function_ce =
"";
416 string::size_type pos = 0;
420 string::size_type first_paren = ce.find(
"(", pos);
421 string::size_type closing_paren = string::npos;
422 if (first_paren != string::npos) closing_paren = find_closing_paren(ce, first_paren);
424 while (first_paren != string::npos && closing_paren != string::npos) {
426 string name = ce.substr(pos, first_paren - pos);
430 if (eval.find_function(name, &f)) {
432 if (!btp_function_ce.empty()) btp_function_ce +=
",";
433 btp_function_ce += ce.substr(pos, closing_paren + 1 - pos);
434 ce.erase(pos, closing_paren + 1 - pos);
435 if (ce[pos] ==
',') ce.erase(pos, 1);
438 pos = closing_paren + 1;
440 if (pos < ce.length() && ce.at(pos) ==
',') ++pos;
443 first_paren = ce.find(
"(", pos);
444 closing_paren = ce.find(
")", pos);
448 d_btp_func_ce = btp_function_ce;
450 BESDEBUG(
"dap",
"BESDapResponseBuilder::split_ce() - Modified constraint: " << d_dap2ce << endl);
451 BESDEBUG(
"dap",
"BESDapResponseBuilder::split_ce() - BTP Function part: " << btp_function_ce << endl);
452 BESDEBUG(
"dap",
"BESDapResponseBuilder::split_ce() - END" << endl);
469 void BESDapResponseBuilder::send_das(ostream &out, DAS &das,
bool with_mime_headers)
const 471 if (with_mime_headers) set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset),
"2.0");
495 void BESDapResponseBuilder::send_das(ostream &out, DDS &dds, ConstraintEvaluator &eval,
bool constrained,
496 bool with_mime_headers)
498 #if USE_LOCAL_TIMEOUT_SCHEME 500 establish_timeout(out);
501 dds.set_timeout(d_timeout);
504 if (with_mime_headers) set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset),
"2.0");
506 conditional_timeout_cancel();
519 if (!d_btp_func_ce.empty()) {
521 string cache_token =
"";
522 ConstraintEvaluator func_eval;
526 fdds = responseCache->cache_dataset(dds, d_btp_func_ce,
this, &func_eval, cache_token);
529 func_eval.parse_constraint(d_btp_func_ce, dds);
530 fdds = func_eval.eval_function_clauses(dds);
533 if (with_mime_headers)
534 set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
536 conditional_timeout_cancel();
539 fdds->print_das(out);
547 eval.parse_constraint(d_dap2ce, dds);
549 if (with_mime_headers)
550 set_mime_text(out, dods_das, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
552 conditional_timeout_cancel();
567 static bool ends_with (
const string &full_string,
const string &ending) {
568 if (full_string.length() >= ending.length()) {
569 return (0 == full_string.compare (full_string.length() - ending.length(), ending.length(), ending));
603 static DDS *promote_function_output_structure(DDS *fdds)
607 bool found_promotable_member =
false;
608 for (DDS::Vars_citer di = fdds->var_begin(), de = fdds->var_end(); di != de && !found_promotable_member; ++di) {
609 Structure *collection =
dynamic_cast<Structure *
>(*di);
610 if (collection && ends_with(collection->name(),
"_unwrap")) {
611 found_promotable_member =
true;
616 if (found_promotable_member) {
625 DDS *temp_dds =
new DDS(fdds->get_factory(), fdds->get_dataset_name(), fdds->get_dap_version());
627 for (DDS::Vars_citer di = fdds->var_begin(), de = fdds->var_end(); di != de; ++di) {
628 Structure *collection =
dynamic_cast<Structure *
>(*di);
629 if (collection && ends_with(collection->name(),
"_unwrap")) {
631 Structure::Vars_iter vi;
632 for (vi =collection->var_begin(); vi != collection->var_end(); ++vi) {
633 temp_dds->add_var(*vi);
637 temp_dds->add_var(*di);
670 bool with_mime_headers)
673 if (with_mime_headers)
674 set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
676 conditional_timeout_cancel();
684 #if USE_LOCAL_TIMEOUT_SCHEME 686 establish_timeout(out);
687 dds.set_timeout(d_timeout);
696 if (!d_btp_func_ce.empty()) {
697 string cache_token =
"";
699 ConstraintEvaluator func_eval;
704 fdds = responseCache->cache_dataset(dds, d_btp_func_ce,
this, &func_eval, cache_token);
707 func_eval.parse_constraint(d_btp_func_ce, dds);
708 fdds = func_eval.eval_function_clauses(dds);
716 fdds->mark_all(
false);
718 eval.parse_constraint(d_dap2ce, *fdds);
720 if (with_mime_headers)
721 set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
733 promote_function_output_structures(fdds);
735 conditional_timeout_cancel();
738 fdds->print_constrained(out);
746 eval.parse_constraint(d_dap2ce, dds);
748 if (with_mime_headers)
749 set_mime_text(out, dods_dds, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
751 conditional_timeout_cancel();
754 dds.print_constrained(out);
776 if (get_store_result().empty())
return false;
778 string serviceUrl = get_store_result();
789 string *stylesheet_ref = 0, ss_ref_value;
791 if (found && ss_ref_value.length() > 0) {
792 stylesheet_ref = &ss_ref_value;
796 if (resultCache == NULL) {
803 string msg =
"The Stored Result request cannot be serviced. ";
804 msg +=
"Unable to acquire StoredResultCache instance. ";
805 msg +=
"This is most likely because the StoredResultCache is not (correctly) configured.";
807 BESDEBUG(
"dap",
"[WARNING] " << msg << endl);
809 d4au.writeD4AsyncResponseRejected(xmlWrtr, UNAVAILABLE, msg, stylesheet_ref);
810 out << xmlWrtr.get_doc();
813 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap2_result() - Sent AsyncRequestRejected" << endl);
815 else if (get_async_accepted().length() != 0) {
820 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap2_result() - serviceUrl="<< serviceUrl << endl);
823 string storedResultId =
"";
827 "BESDapResponseBuilder::store_dap2_result() - storedResultId='"<< storedResultId <<
"'" << endl);
830 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap2_result() - targetURL='"<< targetURL <<
"'" << endl);
833 d4au.writeD4AsyncAccepted(xmlWrtr, 0, 0, targetURL, stylesheet_ref);
834 out << xmlWrtr.get_doc();
837 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap2_result() - sent DAP4 AsyncAccepted response" << endl);
844 d4au.writeD4AsyncRequired(xmlWrtr, 0, 0, stylesheet_ref);
845 out << xmlWrtr.get_doc();
848 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap2_result() - sent DAP4 AsyncRequired response" << endl);
861 if (BESISDEBUG(TIMING_LOG)) sw.
start(
"BESDapResponseBuilder::serialize_dap2_data_dds",
"");
863 BESDEBUG(
"dap",
"BESDapResponseBuilder::serialize_dap2_data_dds() - BEGIN" << endl);
865 dds.print_constrained(out);
869 XDRStreamMarshaller m(out);
873 conditional_timeout_cancel();
877 for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++) {
878 if ((*i)->send_p()) {
879 (*i)->serialize(eval, dds, m, ce_eval);
880 #ifdef CLEAR_LOCAL_DATA 881 (*i)->clear_local_data();
886 BESDEBUG(
"dap",
"BESDapResponseBuilder::serialize_dap2_data_dds() - END" << endl);
898 const string &boundary,
const string &start,
bool ce_eval)
900 BESDEBUG(
"dap", __PRETTY_FUNCTION__ <<
" BEGIN" << endl);
903 libdap::set_mime_ddx_boundary(out, boundary, start, dods_ddx, x_plain);
909 uuid_unparse(uu, &uuid[0]);
911 if (getdomainname(domain, 255) != 0 || strlen(domain) == 0) strncpy(domain,
"opendap.org", 255);
913 string cid = string(&uuid[0]) +
"@" + string(&domain[0]);
917 dds.print_xml_writer(out,
true, cid);
920 set_mime_data_boundary(out, boundary, cid, dods_data_ddx , x_plain);
922 XDRStreamMarshaller m(out);
924 conditional_timeout_cancel();
928 for (DDS::Vars_iter i = dds.var_begin(); i != dds.var_end(); i++) {
929 if ((*i)->send_p()) {
930 (*i)->serialize(eval, dds, m, ce_eval);
931 #ifdef CLEAR_LOCAL_DATA 932 (*i)->clear_local_data();
937 BESDEBUG(
"dap", __PRETTY_FUNCTION__ <<
" END" << endl);
957 bool with_mime_headers)
959 BESDEBUG(
"dap",
"BESDapResponseBuilder::send_dap2_data() - BEGIN"<< endl);
961 #if USE_LOCAL_TIMEOUT_SCHEME 963 establish_timeout(data_stream);
964 dds.set_timeout(d_timeout);
973 if (!get_btp_func_ce().empty()) {
975 "BESDapResponseBuilder::send_dap2_data() - Found function(s) in CE: " << get_btp_func_ce() << endl);
977 string cache_token =
"";
982 ConstraintEvaluator func_eval;
991 "BESDapResponseBuilder::send_dap2_data() - Using the cache for the server function CE" << endl);
992 fdds = responseCache->cache_dataset(dds, get_btp_func_ce(),
this, &func_eval, cache_token);
995 BESDEBUG(
"dap",
"BESDapResponseBuilder::send_dap2_data() - Cache not found; (re)calculating" << endl);
996 func_eval.parse_constraint(get_btp_func_ce(), dds);
997 fdds = func_eval.eval_function_clauses(dds);
1005 fdds->mark_all(
false);
1017 promote_function_output_structures(fdds);
1019 eval.parse_constraint(get_ce(), *fdds);
1021 fdds->tag_nested_sequences();
1023 if (fdds->get_response_limit() != 0 && fdds->get_request_size(
true) > fdds->get_response_limit()) {
1024 string msg =
"The Request for " + long_to_string(dds.get_request_size(
true) / 1024)
1025 +
"KB is too large; requests for this user are limited to " 1026 + long_to_string(dds.get_response_limit() / 1024) +
"KB.";
1030 if (with_mime_headers)
1031 set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
1033 #if FUNCTION_CACHING 1035 if (!store_dap2_result(data_stream, dds, eval)) {
1036 serialize_dap2_data_dds(data_stream, *fdds, eval,
true );
1042 serialize_dap2_data_dds(data_stream, *fdds, eval,
true );
1048 BESDEBUG(
"dap",
"BESDapResponseBuilder::send_dap2_data() - Simple constraint" << endl);
1050 eval.parse_constraint(get_ce(), dds);
1052 dds.tag_nested_sequences();
1054 if (dds.get_response_limit() != 0 && dds.get_request_size(
true) > dds.get_response_limit()) {
1055 string msg =
"The Request for " + long_to_string(dds.get_request_size(
true) / 1024)
1056 +
"KB is too large; requests for this user are limited to " 1057 + long_to_string(dds.get_response_limit() / 1024) +
"KB.";
1061 if (with_mime_headers)
1062 set_mime_binary(data_stream, dods_data, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
1065 if (!store_dap2_result(data_stream, dds, eval)) {
1066 serialize_dap2_data_dds(data_stream, dds, eval);
1070 data_stream << flush;
1072 BESDEBUG(
"dap",
"BESDapResponseBuilder::send_dap2_data() - END"<< endl);
1092 if (d_dap2ce.empty()) {
1093 if (with_mime_headers)
1094 set_mime_text(out, dods_ddx, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
1096 dds.print_xml_writer(out,
false ,
"");
1102 #if USE_LOCAL_TIMEOUT_SCHEME 1104 establish_timeout(out);
1105 dds.set_timeout(d_timeout);
1114 if (!d_btp_func_ce.empty()) {
1115 string cache_token =
"";
1117 ConstraintEvaluator func_eval;
1120 #if FUNCTION_CACHING 1124 if (responseCache) {
1125 fdds = responseCache->cache_dataset(dds, d_btp_func_ce,
this, &func_eval, cache_token);
1128 func_eval.parse_constraint(d_btp_func_ce, dds);
1129 fdds = func_eval.eval_function_clauses(dds);
1137 fdds->mark_all(
false);
1149 promote_function_output_structures(fdds);
1151 eval.parse_constraint(d_dap2ce, *fdds);
1153 if (with_mime_headers)
1154 set_mime_text(out, dods_ddx, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
1156 conditional_timeout_cancel();
1159 fdds->print_xml_writer(out,
true,
"");
1161 #if FUNCTION_CACHING 1169 eval.parse_constraint(d_dap2ce, dds);
1171 if (with_mime_headers)
1172 set_mime_text(out, dods_ddx, x_plain, last_modified_time(d_dataset), dds.get_dap_version());
1174 conditional_timeout_cancel();
1178 dds.print_xml_writer(out,
true,
"");
1184 void BESDapResponseBuilder::send_dmr(ostream &out, DMR &dmr,
bool with_mime_headers)
1189 if (!d_dap4ce.empty()) {
1191 BESDEBUG(
"dap",
"BESDapResponseBuilder::send_dmr() - Parsing DAP4 constraint: '"<< d_dap4ce <<
"'"<< endl);
1193 D4ConstraintEvaluator parser(&dmr);
1194 bool parse_ok = parser.parse(d_dap4ce);
1195 if (!parse_ok)
throw Error(malformed_expr,
"Constraint Expression (" + d_dap4ce +
") failed to parse.");
1201 dmr.root()->set_send_p(
true);
1204 if (with_mime_headers) set_mime_text(out, dap4_dmr, x_plain, last_modified_time(d_dataset), dmr.dap_version());
1206 conditional_timeout_cancel();
1210 dmr.print_dap4(xml, !d_dap4ce.empty() );
1211 out << xml.get_doc() << flush;
1214 void BESDapResponseBuilder::send_dap4_data_using_ce(ostream &out, DMR &dmr,
bool with_mime_headers)
1216 if (!d_dap4ce.empty()) {
1217 D4ConstraintEvaluator parser(&dmr);
1218 bool parse_ok = parser.parse(d_dap4ce);
1219 if (!parse_ok)
throw Error(malformed_expr,
"Constraint Expression (" + d_dap4ce +
") failed to parse.");
1225 dmr.root()->set_send_p(
true);
1228 if (dmr.response_limit() != 0 && dmr.request_size(
true) > dmr.response_limit()) {
1229 string msg =
"The Request for " + long_to_string(dmr.request_size(
true) / 1024)
1230 +
"MB is too large; requests for this user are limited to " + long_to_string(dmr.response_limit() / 1024)
1235 if (!store_dap4_result(out, dmr)) {
1236 serialize_dap4_data(out, dmr, with_mime_headers);
1240 void BESDapResponseBuilder::send_dap4_data(ostream &out, DMR &dmr,
bool with_mime_headers)
1245 if (!d_dap4function.empty()) {
1246 D4BaseTypeFactory d4_factory;
1247 DMR function_result(&d4_factory,
"function_results");
1251 if (!ServerFunctionsList::TheList())
1253 "The function expression could not be evaluated because there are no server functions defined on this server");
1255 D4FunctionEvaluator parser(&dmr, ServerFunctionsList::TheList());
1256 bool parse_ok = parser.parse(d_dap4function);
1257 if (!parse_ok)
throw Error(
"Function Expression (" + d_dap4function +
") failed to parse.");
1259 parser.eval(&function_result);
1263 send_dap4_data_using_ce(out, function_result, with_mime_headers);
1266 send_dap4_data_using_ce(out, dmr, with_mime_headers);
1275 BESDEBUG(
"dap",
"BESDapResponseBuilder::serialize_dap4_data() - BEGIN" << endl);
1277 if (with_mime_headers) set_mime_binary(out, dap4_data, x_plain, last_modified_time(d_dataset), dmr.dap_version());
1281 dmr.print_dap4(xml, !d_dap4ce.empty());
1286 chunked_ostream cos(out, max((
unsigned int) CHUNK_SIZE, xml.get_doc_size() + 2));
1288 conditional_timeout_cancel();
1291 cos << xml.get_doc() << CRLF << flush;
1294 D4StreamMarshaller m(cos);
1295 dmr.root()->serialize(m, dmr, !d_dap4ce.empty());
1296 #ifdef CLEAR_LOCAL_DATA 1297 dmr.root()->clear_local_data();
1301 BESDEBUG(
"dap",
"BESDapResponseBuilder::serialize_dap4_data() - END" << endl);
1320 if (get_store_result().length() != 0) {
1321 string serviceUrl = get_store_result();
1328 string *stylesheet_ref = 0, ss_ref_value;
1330 if (found && ss_ref_value.length() > 0) {
1331 stylesheet_ref = &ss_ref_value;
1335 if (resultCache == NULL) {
1342 string msg =
"The Stored Result request cannot be serviced. ";
1343 msg +=
"Unable to acquire StoredResultCache instance. ";
1344 msg +=
"This is most likely because the StoredResultCache is not (correctly) configured.";
1346 BESDEBUG(
"dap",
"[WARNING] " << msg << endl);
1347 d4au.writeD4AsyncResponseRejected(xmlWrtr, UNAVAILABLE, msg, stylesheet_ref);
1348 out << xmlWrtr.get_doc();
1350 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap4_result() - Sent AsyncRequestRejected" << endl);
1355 if (get_async_accepted().length() != 0) {
1360 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap4_result() - serviceUrl="<< serviceUrl << endl);
1362 string storedResultId =
"";
1366 "BESDapResponseBuilder::store_dap4_result() - storedResultId='"<< storedResultId <<
"'" << endl);
1369 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap4_result() - targetURL='"<< targetURL <<
"'" << endl);
1371 d4au.writeD4AsyncAccepted(xmlWrtr, 0, 0, targetURL, stylesheet_ref);
1372 out << xmlWrtr.get_doc();
1374 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap4_result() - sent AsyncAccepted" << endl);
1382 d4au.writeD4AsyncRequired(xmlWrtr, 0, 0, stylesheet_ref);
1383 out << xmlWrtr.get_doc();
1385 BESDEBUG(
"dap",
"BESDapResponseBuilder::store_dap4_result() - sent AsyncAccepted" << endl);
virtual std::string get_ce() const
Get the constraint expression.
virtual std::string get_dap4ce() const
Get the DAP4 constraint expression.
virtual void serialize_dap2_data_dds(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool ce_eval=true)
static BESDapResponseCache * get_instance()
virtual void send_dap2_data(std::ostream &data_stream, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool with_mime_headers=true)
Transmit data.
virtual string store_dap4_result(libdap::DMR &dmr, const string &constraint, BESDapResponseBuilder *rb)
virtual bool start(string name)
virtual std::string get_dap4function() const
Get the DAP4 server side function expression.
static string assemblePath(const string &firstPart, const string &secondPart, bool addLeadingSlash=false)
Assemble path fragments making sure that they are separated by a single '/' character.
void register_timeout() const
static BESStoredDapResultCache * get_instance()
virtual void split_ce(libdap::ConstraintEvaluator &eval, const std::string &expr="")
virtual void remove_timeout() const
void set_timeout(int timeout=0)
virtual void set_dataset_name(const std::string _dataset)
Set the dataset pathname.
virtual void set_dap4function(std::string _func)
virtual void send_ddx(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool with_mime_headers=true)
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
virtual void serialize_dap2_data_ddx(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, const std::string &boundary, const std::string &start, bool ce_eval=true)
virtual void set_ce(std::string _ce)
void conditional_timeout_cancel()
bool store_dap2_result(ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval)
static BESKeys * TheKeys()
virtual void establish_timeout(std::ostream &stream) const
virtual bool store_dap4_result(ostream &out, libdap::DMR &dmr)
virtual std::string get_dataset_name() const
Get the dataset name.
virtual void set_dap4ce(std::string _ce)
virtual void unlock_and_close(const string &target)
virtual string store_dap2_result(libdap::DDS &dds, const std::string &constraint, BESDapResponseBuilder *rb, libdap::ConstraintEvaluator *eval)
virtual void serialize_dap4_data(std::ostream &out, libdap::DMR &dmr, bool with_mime_headers=true)
virtual void send_dds(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool constrained=false, bool with_mime_headers=true)
Transmit a DDS.