bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESDMRResponse.cc
1// BESDMRResponse.cc
2
3// This file is part of bes, A C++ back-end server implementation framework
4// for the OPeNDAP Data Access Protocol.
5
6// Copyright (c) 2013 OPeNDAP, Inc.
7// Author: Patrick West <pwest@rpi.edu>
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Lesser General Public
11// License as published by the Free Software Foundation; either
12// version 2.1 of the License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25#include "config.h"
26
27#include "BESDMRResponse.h"
28#include "BESDebug.h"
29
30using std::endl;
31using std::string;
32using std::ostream;
33
34#define MODULE "dap"
35#define prolog std::string("BESDMRResponse::").append(__func__).append("() - ")
36
37BESDMRResponse::BESDMRResponse(DMR *dmr) : BESDapResponse(), _dmr(dmr) {
38 string xml_base = get_request_xml_base();
39 _dmr->set_request_xml_base(xml_base);
40 BESDEBUG(MODULE, prolog << "_dmr->request_xml_base(): \"" << _dmr->request_xml_base()
41 << "\" (dmr: " << (void *) _dmr << ")" << endl);
42}
43
44BESDMRResponse::~BESDMRResponse() {
45 delete _dmr ;
46}
47
52void BESDMRResponse::set_container(const string &/*cn*/)
53{
54 // FIXME Add container support
55#if 0
56 if( _dmr && get_explicit_containers() )
57 {
58 _dmr->container_name( cn );
59 }
60#endif
61}
62
66{
67#if 0
68 if( _dmr )
69 {
70 _dmr->container_name( "" );
71 }
72#endif
73}
74
82void BESDMRResponse::dump(ostream &strm) const
83{
84 strm << BESIndent::LMarg << "BESDMRResponse::dump - (" << (void *) this << ")" << endl;
85 BESIndent::Indent();
86 if (_dmr) {
87 strm << BESIndent::LMarg << "DMR:" << endl;
88 BESIndent::Indent();
89 BESIndent::SetIndent(BESIndent::GetIndent());
90 _dmr->dump(strm);
91 BESIndent::Reset();
92 BESIndent::UnIndent();
93 }
94 else {
95 strm << BESIndent::LMarg << "DMR: null" << endl;
96 }
97 BESIndent::UnIndent();
98}
99
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void clear_container()
clear the container in the DAP response object
virtual void set_container(const std::string &cn)
set the container in the DAP response object
Represents an OPeNDAP DAP response object within the BES.
bool get_explicit_containers() const
Should containers be explicitly represented in the DD* responses?