bes Updated for version 3.20.13
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
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
46 //BES keys - check the file h4.conf.in for descriptions
47 //Key to turn on the CF option
48 static bool _usecf;
49
50 // Keys to tune the performance -general
51 static bool _pass_fileid;
52 static bool _disable_structmeta;
53 static bool _enable_special_eos;
54 static bool _disable_scaleoffset_comp;
55 static bool _disable_ecsmetadata_min;
56 static bool _disable_ecsmetadata_all;
57
58 // Keys to tune the performance - cache
59 static bool _enable_eosgeo_cachefile;
60 static bool _enable_data_cachefile;
61 static bool _enable_metadata_cachefile;
62
63 // Keys to handle vdata and vgroups
64 static bool _enable_hybrid_vdata;
65 static bool _enable_ceres_vdata;
66 static bool _enable_vdata_attr;
67 static bool _enable_vdata_desc_attr;
68 static bool _disable_vdata_nameclashing_check;
69 static bool _enable_vgroup_attr;
70
71 // Misc. keys
72 static bool _enable_check_modis_geo_file;
73 static bool _enable_swath_grid_attr;
74 static bool _enable_ceres_merra_short_name;
75 static bool _enable_check_scale_offset_type;
76 static bool _disable_swath_dim_map;
77
78 static bool _cache_latlon_path_exist;
79 static std::string _cache_latlon_path;
80 static bool _cache_latlon_prefix_exist;
81 static std::string _cache_latlon_prefix;
82 static bool _cache_latlon_size_exist;
83 static long _cache_latlon_size;
84
85 static bool _cache_metadata_path_exist;
86 static std::string _cache_metadata_path;
87
88 public:
89 explicit HDF4RequestHandler(const std::string & name);
90 ~HDF4RequestHandler(void) override = default;
91
92 static bool hdf4_build_das(BESDataHandlerInterface & dhi);
93 static bool hdf4_build_dds(BESDataHandlerInterface & dhi);
94 static bool hdf4_build_data(BESDataHandlerInterface & dhi);
95 static bool hdf4_build_dmr(BESDataHandlerInterface & dhi);
96 static bool hdf4_build_help(BESDataHandlerInterface & dhi);
97 static bool hdf4_build_version(BESDataHandlerInterface & dhi);
98
99 // CF key
100 static bool get_usecf() { return _usecf; }
101
102 // Keys to tune the performance -general
103 static bool get_pass_fileid() { return _pass_fileid; }
104 static bool get_disable_structmeta() { return _disable_structmeta; }
105 static bool get_enable_special_eos() { return _enable_special_eos; }
106 static bool get_disable_scaleoffset_comp() { return _disable_scaleoffset_comp; }
107 static bool get_disable_ecsmetadata_min() { return _disable_ecsmetadata_min; }
108 static bool get_disable_ecsmetadata_all() { return _disable_ecsmetadata_all; }
109
110 // Keys to tune the performance - cache
111 static bool get_enable_eosgeo_cachefile() { return _enable_eosgeo_cachefile;}
112 static bool get_enable_data_cachefile() { return _enable_data_cachefile;}
113 static bool get_enable_metadata_cachefile() { return _enable_metadata_cachefile;}
114
115 // Keys to handle vdata and vgroups
116 static bool get_enable_hybrid_vdata() { return _enable_hybrid_vdata; }
117 static bool get_enable_ceres_vdata() { return _enable_ceres_vdata; }
118 static bool get_enable_vdata_attr() { return _enable_vdata_attr; }
119 static bool get_enable_vdata_desc_attr() { return _enable_vdata_desc_attr; }
120 static bool get_disable_vdata_nameclashing_check() { return _disable_vdata_nameclashing_check;}
121 static bool get_enable_vgroup_attr() {return _enable_vgroup_attr;}
122
123 // Misc. keys
124 static bool get_enable_check_modis_geo_file() { return _enable_check_modis_geo_file; }
125 static bool get_enable_swath_grid_attr() { return _enable_swath_grid_attr;}
126 static bool get_enable_ceres_merra_short_name() { return _enable_ceres_merra_short_name;}
127 static bool get_enable_check_scale_offset_type() { return _enable_check_scale_offset_type;}
128 static bool get_disable_swath_dim_map() { return _disable_swath_dim_map;}
129
130 static bool get_cache_latlon_path_exist() { return _cache_latlon_path_exist; }
131 static std::string get_cache_latlon_path() {return _cache_latlon_path; }
132
133 static bool get_cache_latlon_prefix_exist() { return _cache_latlon_prefix_exist; }
134 static std::string get_cache_latlon_prefix() {return _cache_latlon_prefix;}
135
136 static bool get_cache_latlon_size_exist() { return _cache_latlon_size_exist; }
137 static long get_cache_latlon_size() { return _cache_latlon_size; }
138
139 static bool get_cache_metadata_path_exist() { return _cache_metadata_path_exist; }
140 static std::string get_cache_metadata_path() { return _cache_metadata_path;}
141
142};
143
144
145#if 0
146void close_fileid(const int sdfd, const int fileid,const int gridfd, const int swathfd);
147void close_hdf4_fileid(const int sdfd,const int fileid);
148#endif
149
150#endif
Structure storing information used by the BES to handle the request.
Represents a specific data type request handler.
void close_fileid(hid_t fid)
Definition: h5get.cc:434