bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HDF4RequestHandler.h
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of hdf4_handler, a data handler for the OPeNDAP data
5// server.
6
7// Copyright (c) 2002,2003 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
10// This is free software; you can redistribute it and/or modify it under the
11// terms of the GNU Lesser General Public License as published by the Free
12// Software Foundation; either version 2.1 of the License, or (at your
13// option) any later version.
14//
15// This software is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18// License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23//
24// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25
26// CDFRequestHandler.h
27
28#ifndef I_HDF4RequestHandler_H
29#define I_HDF4RequestHandler_H 1
30
31#include <string>
32
33#include "BESRequestHandler.h"
34
35class HDF4RequestHandler:public BESRequestHandler {
36
37 private:
38 static std::string _cachedir;
39 static bool hdf4_build_data_with_IDs(BESDataHandlerInterface & dhi);
40 static bool hdf4_build_dds_cf_sds(BESDataHandlerInterface & dhi);
41 static bool hdf4_build_das_cf_sds(BESDataHandlerInterface & dhi);
42 static bool hdf4_build_data_cf_sds(BESDataHandlerInterface & dhi);
43 static bool hdf4_build_data_cf_sds_with_IDs(BESDataHandlerInterface & dhi);
44 static bool hdf4_build_dmr_with_IDs(BESDataHandlerInterface & dhi);
45 static bool hdf4_build_direct_dmr(BESDataHandlerInterface & dhi);
46
47 //BES keys - check the file h4.conf.in for descriptions
48 //Key to turn on the CF option
49 static bool _usecf;
50
51 // Keys to tune the performance -general
52 static bool _pass_fileid;
53 static bool _disable_structmeta;
54 static bool _enable_special_eos;
55 static bool _disable_scaleoffset_comp;
56 static bool _disable_ecsmetadata_min;
57 static bool _disable_ecsmetadata_all;
58
59 // Keys to tune the performance - cache
60 static bool _enable_eosgeo_cachefile;
61 static bool _enable_data_cachefile;
62 static bool _enable_metadata_cachefile;
63
64 // Keys to handle vdata and vgroups
65 static bool _enable_hybrid_vdata;
66 static bool _enable_ceres_vdata;
67 static bool _enable_vdata_attr;
68 static bool _enable_vdata_desc_attr;
69 static bool _disable_vdata_nameclashing_check;
70 static bool _enable_vgroup_attr;
71
72 // Misc. keys
73 static bool _enable_check_modis_geo_file;
74 static bool _enable_swath_grid_attr;
75 static bool _enable_ceres_merra_short_name;
76 static bool _enable_check_scale_offset_type;
77 static bool _disable_swath_dim_map;
78
79 static bool _cache_latlon_path_exist;
80 static std::string _cache_latlon_path;
81 static bool _cache_latlon_prefix_exist;
82 static std::string _cache_latlon_prefix;
83 static bool _cache_latlon_size_exist;
84 static long _cache_latlon_size;
85
86 static bool _cache_metadata_path_exist;
87 static std::string _cache_metadata_path;
88
89 static bool _direct_dmr;
90
91 public:
92 explicit HDF4RequestHandler(const std::string & name);
93 ~HDF4RequestHandler(void) override = default;
94
95 static bool hdf4_build_das(BESDataHandlerInterface & dhi);
96 static bool hdf4_build_dds(BESDataHandlerInterface & dhi);
97 static bool hdf4_build_data(BESDataHandlerInterface & dhi);
98 static bool hdf4_build_dmr(BESDataHandlerInterface & dhi);
99 static bool hdf4_build_help(BESDataHandlerInterface & dhi);
100 static bool hdf4_build_version(BESDataHandlerInterface & dhi);
101
102 static bool get_direct_dmr() { return _direct_dmr; }
103
104 // CF key
105 static bool get_usecf() { return _usecf; }
106
107 // Keys to tune the performance -general
108 static bool get_pass_fileid() { return _pass_fileid; }
109 static bool get_disable_structmeta() { return _disable_structmeta; }
110 static bool get_enable_special_eos() { return _enable_special_eos; }
111 static bool get_disable_scaleoffset_comp() { return _disable_scaleoffset_comp; }
112 static bool get_disable_ecsmetadata_min() { return _disable_ecsmetadata_min; }
113 static bool get_disable_ecsmetadata_all() { return _disable_ecsmetadata_all; }
114
115 // Keys to tune the performance - cache
116 static bool get_enable_eosgeo_cachefile() { return _enable_eosgeo_cachefile;}
117 static bool get_enable_data_cachefile() { return _enable_data_cachefile;}
118 static bool get_enable_metadata_cachefile() { return _enable_metadata_cachefile;}
119
120 // Keys to handle vdata and vgroups
121 static bool get_enable_hybrid_vdata() { return _enable_hybrid_vdata; }
122 static bool get_enable_ceres_vdata() { return _enable_ceres_vdata; }
123 static bool get_enable_vdata_attr() { return _enable_vdata_attr; }
124 static bool get_enable_vdata_desc_attr() { return _enable_vdata_desc_attr; }
125 static bool get_disable_vdata_nameclashing_check() { return _disable_vdata_nameclashing_check;}
126 static bool get_enable_vgroup_attr() {return _enable_vgroup_attr;}
127
128 // Misc. keys
129 static bool get_enable_check_modis_geo_file() { return _enable_check_modis_geo_file; }
130 static bool get_enable_swath_grid_attr() { return _enable_swath_grid_attr;}
131 static bool get_enable_ceres_merra_short_name() { return _enable_ceres_merra_short_name;}
132 static bool get_enable_check_scale_offset_type() { return _enable_check_scale_offset_type;}
133 static bool get_disable_swath_dim_map() { return _disable_swath_dim_map;}
134
135 static bool get_cache_latlon_path_exist() { return _cache_latlon_path_exist; }
136 static std::string get_cache_latlon_path() {return _cache_latlon_path; }
137
138 static bool get_cache_latlon_prefix_exist() { return _cache_latlon_prefix_exist; }
139 static std::string get_cache_latlon_prefix() {return _cache_latlon_prefix;}
140
141 static bool get_cache_latlon_size_exist() { return _cache_latlon_size_exist; }
142 static long get_cache_latlon_size() { return _cache_latlon_size; }
143
144 static bool get_cache_metadata_path_exist() { return _cache_metadata_path_exist; }
145 static std::string get_cache_metadata_path() { return _cache_metadata_path;}
146
147};
148
149
150#endif
Structure storing information used by the BES to handle the request.