bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
NCRequestHandler.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of nc_handler, a data handler for the OPeNDAP data
4// server.
5
6// Copyright (c) 2002,2003 OPeNDAP, Inc.
7// Author: James Gallagher <jgallagher@opendap.org>
8//
9// This is free software; you can redistribute it and/or modify it under the
10// terms of the GNU Lesser General Public License as published by the Free
11// Software Foundation; either version 2.1 of the License, or (at your
12// option) any later version.
13//
14// This software is distributed in the hope that it will be useful, but
15// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17// 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// CDFRequestHandler.h
26
27#ifndef I_NCRequestHandler_H
28#define I_NCRequestHandler_H 1
29
30#include <BESRequestHandler.h>
31
32class ObjMemCache; // in bes/dap
33
34namespace libdap {
35class DDS;
36}
37
38class NCRequestHandler: public BESRequestHandler {
39private:
40 static bool _show_shared_dims;
41 static bool _show_shared_dims_set;
42
43 static bool _ignore_unknown_types;
44 static bool _ignore_unknown_types_set;
45
46 static bool _promote_byte_to_short_set;
47 static bool _promote_byte_to_short;
48 static bool _use_mds;
49
50
51 static unsigned int _cache_entries;
52 static float _cache_purge_level;
53
54 static ObjMemCache *das_cache;
55 static ObjMemCache *dds_cache;
56 static ObjMemCache *datadds_cache;
57 static ObjMemCache *dmr_cache;
58
59 static void get_dds_with_attributes(const std::string& dataset_name, const std::string& container_name, libdap::DDS* dds);
60 static void get_dds_without_attributes(const std::string& dataset_name, const std::string& container_name, libdap::DDS* dds);
61
62public:
63 NCRequestHandler(const std::string &name);
64 virtual ~NCRequestHandler(void);
65
66 static bool nc_build_das(BESDataHandlerInterface &dhi);
67 static bool nc_build_dds(BESDataHandlerInterface &dhi);
68 static bool nc_build_data(BESDataHandlerInterface &dhi);
69 static bool nc_build_dmr(BESDataHandlerInterface &dhi);
70 static bool nc_build_help(BESDataHandlerInterface &dhi);
71 static bool nc_build_version(BESDataHandlerInterface &dhi);
72
73 static bool get_show_shared_dims()
74 {
75 return _show_shared_dims;
76 }
77 static bool get_ignore_unknown_types()
78 {
79 return _ignore_unknown_types;
80 }
81 static bool get_promote_byte_to_short()
82 {
83 return _promote_byte_to_short;
84 }
85 static bool get_use_mds()
86 {
87 return _use_mds;
88 }
89 static unsigned int get_cache_entries()
90 {
91 return _cache_entries;
92 }
93 static float get_cache_purge_level()
94 {
95 return _cache_purge_level;
96 }
97
98 // This handler supports the "not including attributes" in
99 // the data access feature. Attributes are generated only
100 // if necessary. KY 10/30/19
101 void add_attributes(BESDataHandlerInterface &dhi);
102
103};
104
105#endif
106
Structure storing information used by the BES to handle the request.
An in-memory cache for DapObj (DAS, DDS, ...) objects.
Definition ObjMemCache.h:83