OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
HDF5CF::File Class Referenceabstract

This class retrieves all information from an HDF5 file. More...

#include <HDF5CF.h>

Inheritance diagram for HDF5CF::File:
Inheritance graph
Collaboration diagram for HDF5CF::File:
Collaboration graph

Public Member Functions

virtual void Add_Supplement_Attrs (bool) throw (Exception)
 Add supplemental attributes such as fullpath and original name. More...
 
virtual void Adjust_Dim_Name ()=0
 Adjust dimension names based on different products. More...
 
virtual void Adjust_Obj_Name ()=0
 Adjust object names based on different products. More...
 
virtual void Flatten_Obj_Name (bool) throw (Exception)
 Flatten the object name. More...
 
const vector< Attribute * > & getAttributes () const
 Public interface to obtain information of all attributes under the root group. More...
 
const hid_t getFileID () const
 Obtain the HDF5 file ID. More...
 
const vector< Group * > & getGroups () const
 Public interface to obtain all the group info. More...
 
const string & getPath () const
 Obtain the path of the file. More...
 
const vector< Var * > & getVars () const
 Public interface to obtain information of all variables. More...
 
virtual void Handle_Coor_Attr ()=0
 Handle "coordinates" attributes. More...
 
virtual void Handle_CVar ()=0
 Handle coordinate variables. More...
 
virtual void Handle_DimNameClashing ()=0
 Handle dimension name clashing. Since COARDS requires the change of cv names, So we need to handle dimension name clashing specially. More...
 
virtual void Handle_SpVar ()=0
 Handle special variables. More...
 
virtual void Handle_SpVar_Attr ()=0
 Handle special variable attributes. More...
 
virtual void Handle_Unsupported_Dspace () throw (Exception)
 Handle unsupported HDF5 dataspaces for datasets. More...
 
virtual void Handle_Unsupported_Dtype (bool) throw (Exception)
 Handle unsupported HDF5 datatypes. More...
 
virtual void Retrieve_H5_Info (const char *path, hid_t file_id, bool include_attr) throw (Exception)
 Retrieve DDS information from the HDF5 file. The reason to separate reading DDS from DAS is: DAP needs to hold all values of attributes in the memory, building DDS doesn't need the attributes. So to reduce huge memory allocation for some HDF5 files, we separate the access of DAS from DDS although internally they still share common routines. More...
 
virtual void Retrieve_H5_Supported_Attr_Values () throw (Exception)
 Retrieve attribute values for the supported HDF5 datatypes. More...
 
virtual ~File ()
 

Protected Member Functions

void Add_One_FakeDim_Name (Dimension *dim) throw (Exception)
 
void Add_One_Float_Attr (Attribute *attr, const string &attrname, float float_value) throw (Exception)
 
void Add_Str_Attr (Attribute *attr, const string &attrname, const string &strvalue) throw (Exception)
 
void Adjust_Duplicate_FakeDim_Name (Dimension *dim) throw (Exception)
 
void Change_Attr_One_Str_to_Others (Attribute *attr, Var *var) throw (Exception)
 
 File (const char *path, hid_t file_id)
 
virtual string get_CF_string (string)
 
template<typename T >
void Handle_General_NameClashing (set< string > &objnameset, vector< T * > &objvec) throw (Exception)
 
void Handle_GeneralObj_NameClashing (bool, set< string > &objnameset) throw (Exception)
 
void Handle_Obj_AttrNameClashing () throw (Exception)
 
void Handle_RootGroup_NameClashing (set< string > &objnameset) throw (Exception)
 
void Handle_Var_NameClashing (set< string > &objnameset) throw (Exception)
 
void Insert_One_NameSizeMap_Element (string name, hsize_t size) throw (Exception)
 
void Insert_One_NameSizeMap_Element2 (map< string, hsize_t > &, string name, hsize_t size) throw (Exception)
 
virtual void Replace_Var_Attrs (Var *src, Var *target)
 
virtual void Replace_Var_Info (Var *src, Var *target)
 
void Retrieve_H5_Attr_Info (Attribute *, hid_t obj_id, const int j, bool &unsup_attr_dtype) throw (Exception)
 
void Retrieve_H5_Attr_Value (Attribute *attr, string) throw (Exception)
 
void Retrieve_H5_Obj (hid_t grp_id, const char *gname, bool include_attr) throw (Exception)
 
void Retrieve_H5_VarDim (Var *, hid_t dset_id, const string &varname, bool &unsup_var_dspace) throw (Exception)
 
void Retrieve_H5_VarType (Var *, hid_t dset_id, const string &varname, bool &unsup_var_dtype) throw (Exception)
 

Protected Attributes

int addeddimindex
 
map< string, hsize_t > dimname_to_dimsize
 
set< string > dimnamelist
 
map< hsize_t, string > dimsize_to_fakedimname
 Handle added dimension names. More...
 
hid_t fileid
 
vector< Group * > groups
 Non-root group vectors. More...
 
string path
 
vector< Attribute * > root_attrs
 Root attribute vectors. More...
 
hid_t rootid
 
bool unsupported_attr_dtype
 
bool unsupported_var_dspace
 
bool unsupported_var_dtype
 
vector< Var * > vars
 Var vectors. More...
 

Detailed Description

This class retrieves all information from an HDF5 file.

Definition at line 506 of file HDF5CF.h.

Constructor & Destructor Documentation

File::~File ( )
virtual

Definition at line 47 of file HDF5CF.cc.

References fileid, groups, root_attrs, rootid, and vars.

HDF5CF::File::File ( const char *  path,
hid_t  file_id 
)
inlineprotected

Definition at line 621 of file HDF5CF.h.

Member Function Documentation

void File::Add_One_FakeDim_Name ( Dimension dim)
throw (Exception
)
protected
void File::Add_One_Float_Attr ( Attribute attr,
const string &  attrname,
float  float_value 
)
throw (Exception
)
protected
void File::Add_Str_Attr ( Attribute attr,
const string &  attrname,
const string &  strvalue 
)
throw (Exception
)
protected
void File::Add_Supplement_Attrs ( bool  add_path)
throw (Exception
)
virtual

Add supplemental attributes such as fullpath and original name.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 1322 of file HDF5CF.cc.

Referenced by HDF5CF::GMFile::Add_Supplement_Attrs(), and HDF5CF::EOS5File::Add_Supplement_Attrs().

virtual void HDF5CF::File::Adjust_Dim_Name ( )
pure virtual

Adjust dimension names based on different products.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

void File::Adjust_Duplicate_FakeDim_Name ( Dimension dim)
throw (Exception
)
protected

Definition at line 1130 of file HDF5CF.cc.

References HDF5CFUtil::gen_unique_name(), and throw2.

Referenced by HDF5CF::GMFile::Add_Dim_Name_ACOS_L2S(), HDF5CF::GMFile::Add_Dim_Name_Mea_Ozonel3z(), and HDF5CF::GMFile::Add_Dim_Name_SMAP().

Here is the call graph for this function:

virtual void HDF5CF::File::Adjust_Obj_Name ( )
pure virtual

Adjust object names based on different products.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

void File::Change_Attr_One_Str_to_Others ( Attribute attr,
Var var 
)
throw (Exception
)
protected
void File::Flatten_Obj_Name ( bool  include_attr)
throw (Exception
)
virtual

Flatten the object name.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 866 of file HDF5CF.cc.

Referenced by HDF5CF::GMFile::Flatten_Obj_Name(), and HDF5CF::EOS5File::Flatten_Obj_Name().

string File::get_CF_string ( string  s)
protectedvirtual

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 1026 of file HDF5CF.cc.

Referenced by HDF5CF::GMFile::get_CF_string(), and HDF5CF::EOS5File::get_CF_string().

const vector< Attribute * >& HDF5CF::File::getAttributes ( ) const
inline

Public interface to obtain information of all attributes under the root group.

Definition at line 578 of file HDF5CF.h.

References root_attrs.

Referenced by gen_eos5_cfdas(), and gen_gmh5_cfdas().

const hid_t HDF5CF::File::getFileID ( ) const
inline

Obtain the HDF5 file ID.

Definition at line 559 of file HDF5CF.h.

References fileid.

Referenced by gen_eos5_cfdds(), and gen_gmh5_cfdds().

const vector< Group * >& HDF5CF::File::getGroups ( ) const
inline

Public interface to obtain all the group info.

Definition at line 584 of file HDF5CF.h.

References groups.

Referenced by gen_eos5_cfdas(), and gen_gmh5_cfdas().

const string& HDF5CF::File::getPath ( ) const
inline

Obtain the path of the file.

Definition at line 566 of file HDF5CF.h.

References path.

Referenced by gen_eos5_cfdds(), and gen_gmh5_cfdds().

const vector< Var * >& HDF5CF::File::getVars ( ) const
inline

Public interface to obtain information of all variables.

Definition at line 572 of file HDF5CF.h.

References vars.

Referenced by gen_eos5_cfdas(), gen_eos5_cfdds(), gen_gmh5_cfdas(), and gen_gmh5_cfdds().

virtual void HDF5CF::File::Handle_Coor_Attr ( )
pure virtual

Handle "coordinates" attributes.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

virtual void HDF5CF::File::Handle_CVar ( )
pure virtual

Handle coordinate variables.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

virtual void HDF5CF::File::Handle_DimNameClashing ( )
pure virtual

Handle dimension name clashing. Since COARDS requires the change of cv names, So we need to handle dimension name clashing specially.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

template<class T >
void File::Handle_General_NameClashing ( set< string > &  objnameset,
vector< T * > &  objvec 
)
throw (Exception
)
protected
void File::Handle_GeneralObj_NameClashing ( bool  include_attr,
set< string > &  objnameset 
)
throw (Exception
)
protected
void File::Handle_Obj_AttrNameClashing ( )
throw (Exception
)
protected

Definition at line 939 of file HDF5CF.cc.

References groups, Handle_General_NameClashing(), root_attrs, and vars.

Here is the call graph for this function:

void File::Handle_RootGroup_NameClashing ( set< string > &  objnameset)
throw (Exception
)
protected

Definition at line 911 of file HDF5CF.cc.

References HDF5CFUtil::gen_unique_name().

Here is the call graph for this function:

virtual void HDF5CF::File::Handle_SpVar ( )
pure virtual

Handle special variables.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

virtual void HDF5CF::File::Handle_SpVar_Attr ( )
pure virtual

Handle special variable attributes.

Implemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

void File::Handle_Unsupported_Dspace ( )
throw (Exception
)
virtual

Handle unsupported HDF5 dataspaces for datasets.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 850 of file HDF5CF.cc.

References unsupported_var_dspace, and vars.

Referenced by HDF5CF::GMFile::Handle_Unsupported_Dspace(), and HDF5CF::EOS5File::Handle_Unsupported_Dspace().

void File::Handle_Unsupported_Dtype ( bool  include_attr)
throw (Exception
)
virtual

Handle unsupported HDF5 datatypes.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 776 of file HDF5CF.cc.

References HDF5CFUtil::cf_strict_support_type().

Referenced by HDF5CF::GMFile::Handle_Unsupported_Dtype(), and HDF5CF::EOS5File::Handle_Unsupported_Dtype().

Here is the call graph for this function:

void File::Handle_Var_NameClashing ( set< string > &  objnameset)
throw (Exception
)
protected

Definition at line 906 of file HDF5CF.cc.

void File::Insert_One_NameSizeMap_Element2 ( map< string, hsize_t > &  name_to_size,
string  name,
hsize_t  size 
)
throw (Exception
)
protected

Definition at line 1054 of file HDF5CF.cc.

References throw4.

void File::Retrieve_H5_Attr_Info ( Attribute attr,
hid_t  obj_id,
const int  j,
bool &  unsup_attr_dtype 
)
throw (Exception
)
protected

Definition at line 461 of file HDF5CF.cc.

References HDF5CFUtil::cf_strict_support_type(), HDF5CFUtil::H5type_to_H5DAPtype(), NULL, throw1, and throw2.

Here is the call graph for this function:

void File::Retrieve_H5_Info ( const char *  path,
hid_t  file_id,
bool  include_attr 
)
throw (Exception
)
virtual

Retrieve DDS information from the HDF5 file. The reason to separate reading DDS from DAS is: DAP needs to hold all values of attributes in the memory, building DDS doesn't need the attributes. So to reduce huge memory allocation for some HDF5 files, we separate the access of DAS from DDS although internally they still share common routines.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 83 of file HDF5CF.cc.

References throw1.

Referenced by HDF5CF::GMFile::Retrieve_H5_Info(), and HDF5CF::EOS5File::Retrieve_H5_Info().

void File::Retrieve_H5_Obj ( hid_t  grp_id,
const char *  gname,
bool  include_attr 
)
throw (Exception
)
protected
void File::Retrieve_H5_Supported_Attr_Values ( )
throw (Exception
)
virtual

Retrieve attribute values for the supported HDF5 datatypes.

Reimplemented in HDF5CF::EOS5File, and HDF5CF::GMFile.

Definition at line 588 of file HDF5CF.cc.

References groups, Retrieve_H5_Attr_Value(), root_attrs, and vars.

Referenced by HDF5CF::GMFile::Retrieve_H5_Supported_Attr_Values(), and HDF5CF::EOS5File::Retrieve_H5_Supported_Attr_Values().

Here is the call graph for this function:

void File::Retrieve_H5_VarDim ( Var var,
hid_t  dset_id,
const string &  varname,
bool &  unsup_var_dspace 
)
throw (Exception
)
protected

Definition at line 367 of file HDF5CF.cc.

References throw2.

void File::Retrieve_H5_VarType ( Var var,
hid_t  dset_id,
const string &  varname,
bool &  unsup_var_dtype 
)
throw (Exception
)
protected

Definition at line 334 of file HDF5CF.cc.

References HDF5CFUtil::cf_strict_support_type(), HDF5CFUtil::H5type_to_H5DAPtype(), and throw2.

Here is the call graph for this function:

Member Data Documentation

int HDF5CF::File::addeddimindex
protected

Definition at line 657 of file HDF5CF.h.

map<string,hsize_t> HDF5CF::File::dimname_to_dimsize
protected
map<hsize_t,string> HDF5CF::File::dimsize_to_fakedimname
protected

Handle added dimension names.

Definition at line 656 of file HDF5CF.h.

hid_t HDF5CF::File::fileid
protected

Definition at line 635 of file HDF5CF.h.

Referenced by getFileID(), and ~File().

string HDF5CF::File::path
protected

Definition at line 634 of file HDF5CF.h.

Referenced by getPath().

vector< Attribute * > HDF5CF::File::root_attrs
protected
hid_t HDF5CF::File::rootid
protected

Definition at line 636 of file HDF5CF.h.

Referenced by ~File().

bool HDF5CF::File::unsupported_attr_dtype
protected

Definition at line 648 of file HDF5CF.h.

bool HDF5CF::File::unsupported_var_dspace
protected
bool HDF5CF::File::unsupported_var_dtype
protected

Definition at line 647 of file HDF5CF.h.

vector< Var * > HDF5CF::File::vars
protected

Var vectors.

Definition at line 639 of file HDF5CF.h.

Referenced by HDF5CF::GMFile::Add_Aqu_Attrs(), HDF5CF::GMFile::Add_Dim_Name(), HDF5CF::GMFile::Add_Dim_Name_ACOS_L2S(), HDF5CF::GMFile::Add_Dim_Name_Aqu_L3(), HDF5CF::GMFile::Add_Dim_Name_Dimscale_General_Product(), HDF5CF::GMFile::Add_Dim_Name_GPM(), HDF5CF::GMFile::Add_Dim_Name_Mea_Ozonel3z(), HDF5CF::GMFile::Add_Dim_Name_Mea_SeaWiFS(), HDF5CF::GMFile::Add_Dim_Name_SMAP(), HDF5CF::GMFile::Add_GPM_Attrs(), HDF5CF::GMFile::Add_SeaWiFS_Attrs(), HDF5CF::EOS5File::Adjust_Attr_Name(), HDF5CF::EOS5File::Adjust_Attr_Value(), HDF5CF::GMFile::Adjust_Dim_Name(), HDF5CF::EOS5File::Adjust_Dim_Name(), HDF5CF::GMFile::Adjust_GPM_L3_Obj_Name(), HDF5CF::GMFile::Adjust_Mea_Ozone_Obj_Name(), HDF5CF::GMFile::Adjust_Obj_Name(), HDF5CF::EOS5File::Adjust_SharedLatLon_Grid_Var_Dim_Name(), HDF5CF::EOS5File::Adjust_Var_Dim_NewName_Before_Flattening(), HDF5CF::EOS5File::Adjust_Var_NewName_After_Parsing(), HDF5CF::EOS5File::Check_Augmentation_Status(), HDF5CF::GMFile::Check_General_Product_Pattern(), getVars(), HDF5CF::GMFile::Handle_Coor_Attr(), HDF5CF::EOS5File::Handle_Coor_Attr(), HDF5CF::GMFile::Handle_CVar_Aqu_L3(), HDF5CF::GMFile::Handle_CVar_Dimscale_General_Product(), HDF5CF::GMFile::Handle_CVar_GPM_L1(), HDF5CF::GMFile::Handle_CVar_Mea_Ozone(), HDF5CF::GMFile::Handle_CVar_Mea_SeaWiFS(), HDF5CF::GMFile::Handle_CVar_OBPG_L3(), HDF5CF::GMFile::Handle_CVar_SMAP(), HDF5CF::GMFile::Handle_DimNameClashing(), HDF5CF::EOS5File::Handle_DimNameClashing(), HDF5CF::GMFile::Handle_GPM_l1_Coor_Attr(), Handle_Obj_AttrNameClashing(), HDF5CF::GMFile::Handle_SpVar(), HDF5CF::EOS5File::Handle_SpVar(), HDF5CF::GMFile::Handle_SpVar_ACOS(), Handle_Unsupported_Dspace(), HDF5CF::EOS5File::Remove_MultiDim_LatLon_EOS5CFGrid(), Retrieve_H5_Supported_Attr_Values(), and ~File().


The documentation for this class was generated from the following files: