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