33 #include <sys/types.h>
40 #include <InternalErr.h>
57 #include "HDF5CFGeoCF1D.h"
58 #include "HDF5CFGeoCFProj.h"
64 using namespace HDF5CF;
67 void gen_dap_onevar_dds(DDS &dds,
const HDF5CF::Var* var,
const hid_t file_id,
const string & filename)
70 BESDEBUG(
"h5",
"Coming to gen_dap_onevar_dds() "<<endl);
71 const vector<HDF5CF::Dimension *>& dims = var->
getDimensions();
73 if (0 == dims.size()) {
76 DMR * dmr = HDF5RequestHandler::get_dmr_64bit_int();
80 D4Group* root_grp = dmr->root();
87 string error_message =
"Cannot allocate the HDF5CFInt64: " + error_message;
88 throw InternalErr(__FILE__, __LINE__, error_message);
90 sca_int64->set_is_dap4(
true);
91 map_cfh5_attrs_to_dap4(var,sca_int64);
92 root_grp->add_var_nocopy(sca_int64);
95 else if(H5UINT64 == var->
getType()) {
101 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFInt64.");
103 sca_uint64->set_is_dap4(
true);
104 map_cfh5_attrs_to_dap4(var,sca_uint64);
105 root_grp->add_var_nocopy(sca_uint64);
111 else if (H5FSTRING == var->
getType() || H5VSTRING == var->
getType()) {
117 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFStr.");
119 dds.add_var(sca_str);
131 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFByte.");
133 dds.add_var(sca_uchar);
145 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFInt16.");
147 dds.add_var(sca_int16);
157 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFUInt16.");
159 dds.add_var(sca_uint16);
169 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFInt32.");
171 dds.add_var(sca_int32);
181 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFUInt32.");
183 dds.add_var(sca_uint32);
193 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFFloat32.");
195 dds.add_var(sca_float32);
205 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFFloat64.");
207 dds.add_var(sca_float64);
213 throw InternalErr(__FILE__, __LINE__,
"unsupported data type.");
222 bool dap4_int64 =
false;
224 DMR * dmr = HDF5RequestHandler::get_dmr_64bit_int();
233 D4Group* root_grp = dmr->root();
236 bt->transform_to_dap4(root_grp,root_grp);
243 if(
true == dap4_int64) {
246 else if(var->
getType() == H5UINT64)
252 #define HANDLE_CASE(tid,type) \
254 bt = new (type)(var->getNewName(),var->getFullPath()); \
272 HANDLE_CASE(H5FSTRING, Str)
274 HANDLE_CASE(H5VSTRING, Str)
277 throw InternalErr(__FILE__, __LINE__,
"unsupported data type.");
282 vector<HDF5CF::Dimension*>::const_iterator it_d;
283 vector<size_t> dimsizes;
284 dimsizes.resize(var->
getRank());
285 for (
int i = 0; i < var->
getRank(); i++)
286 dimsizes[i] = (dims[i])->getSize();
295 throw InternalErr(__FILE__, __LINE__,
"Cannot allocate the HDF5CFStr.");
298 for (it_d = dims.begin(); it_d != dims.end(); ++it_d) {
299 if (
"" == (*it_d)->getNewName())
300 ar->append_dim((*it_d)->getSize());
302 ar->append_dim((*it_d)->getSize(), (*it_d)->getNewName());
306 if(dap4_int64 ==
true) {
307 DMR * dmr = HDF5RequestHandler::get_dmr_64bit_int();
308 D4Group* root_grp = dmr->root();
310 BaseType* d4_var = ar->h5cfdims_transform_to_dap4(root_grp);
312 map_cfh5_attrs_to_dap4(var,d4_var);
313 root_grp->add_var_nocopy(d4_var);
330 return (((
"_FillValue" == attr->getNewName()) && (var->
getType() != attr->getType())) ?
true :
false);
337 BESDEBUG(
"h5",
"Coming to gen_dap_special_oneobj_das() "<<endl);
338 if (attr->getCount() != 1)
throw InternalErr(__FILE__, __LINE__,
"FillValue attribute can only have one element.");
340 H5DataType var_dtype = var->
getType();
341 if ((
true == HDF5RequestHandler::get_fillvalue_check())
342 && (
false == is_fvalue_valid(var_dtype, attr))) {
343 string msg =
"The attribute value is out of the range.\n";
344 msg +=
"The variable name: " + var->
getNewName() +
"\n";
345 msg +=
"The attribute name: " + attr->getNewName() +
"\n";
346 msg +=
"The error occurs inside the gen_dap_special_oneobj_das function in h5commoncfdap.cc.";
347 throw InternalErr(msg);
349 string print_rep = HDF5CFDAPUtil::print_attr(attr->getType(), 0, (
void*) (&(attr->getValue()[0])));
350 at->append_attr(attr->getNewName(), HDF5CFDAPUtil::print_type(var_dtype), print_rep);
357 BESDEBUG(
"h5",
"Coming to is_fvalue_valid() "<<endl);
358 bool ret_value =
true;
360 switch (attr->getType()) {
362 signed char final_fill_value = *((
signed char*) ((
void*) (&(attr->getValue()[0]))));
363 if ((var_dtype == H5UCHAR) && (final_fill_value<0))
369 short final_fill_value = *((
short*) ((
void*) (&(attr->getValue()[0]))));
370 if ((var_dtype == H5UCHAR) &&(final_fill_value > 255 || final_fill_value < 0))
374 else if ((var_dtype == H5UINT16) && (final_fill_value < 0))
379 unsigned short final_fill_value = *((
unsigned short*) ((
void*) (&(attr->getValue()[0]))));
380 if ((var_dtype == H5UCHAR) &&(final_fill_value > 255)) {
383 else if ((var_dtype == H5INT16) && (final_fill_value >32767)){
396 unsigned char final_fill_value = *((
unsigned char*)((
void*)(&(attr->getValue()[0]))));
397 if(var_dtype == H5CHAR) {
398 if(final_fill_value >127)
418 if (attr->getCount() != 1)
419 throw InternalErr(__FILE__,__LINE__,
"FillValue attribute can only have one element.");
421 H5DataType var_dtype = var->
getType();
426 unsigned char final_fill_value = *((
unsigned char*)((
void*)(&(attr->getValue()[0]))));
427 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
434 short final_fill_value = *((
short*)((
void*)(&(attr->getValue()[0]))));
435 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
440 short final_fill_value = *((
short*)((
void*)(&(attr->getValue()[0]))));
441 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
446 unsigned short final_fill_value = *((
unsigned short*)((
void*)(&(attr->getValue()[0]))));
447 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
453 int final_fill_value = *((
int*)((
void*)(&(attr->getValue()[0]))));
454 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
459 unsigned int final_fill_value = *((
unsigned int*)((
void*)(&(attr->getValue()[0]))));
460 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
465 float final_fill_value = *((
float*)((
void*)(&(attr->getValue()[0]))));
468 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
473 double final_fill_value = *((
double*)((
void*)(&(attr->getValue()[0]))));
474 print_rep = HDF5CFDAPUtil::print_attr(var_dtype,0,(
void*)&final_fill_value);
478 throw InternalErr(__FILE__,__LINE__,
"unsupported data type.");
481 at->append_attr(attr->getNewName(), HDF5CFDAPUtil::print_type(var_dtype), print_rep);
489 BESDEBUG(
"h5",
"Coming to gen_dap_oneobj_das() "<<endl);
491 if (H5INT64 == attr->getType() || H5UINT64 == attr->getType()) {
496 else if ((H5FSTRING == attr->getType()) || (H5VSTRING == attr->getType())) {
497 gen_dap_str_attr(at, attr);
505 size_t mem_dtype_size = (attr->getBufSize()) / (attr->getCount());
506 H5DataType mem_dtype = HDF5CFDAPUtil::get_mem_dtype(attr->getType(), mem_dtype_size);
508 for (
unsigned int loc = 0; loc < attr->getCount(); loc++) {
509 string print_rep = HDF5CFDAPUtil::print_attr(mem_dtype, loc, (
void*) &(attr->getValue()[0]));
510 at->append_attr(attr->getNewName(), HDF5CFDAPUtil::print_type(attr->getType()), print_rep);
522 bool special_attr_handling = need_special_attribute_handling(attr, var);
523 if (
true == special_attr_handling) {
524 gen_dap_special_oneobj_das(at, attr, var);
531 size_t mem_dtype_size = (attr->getBufSize()) / (attr->getCount());
532 H5DataType mem_dtype = HDF5CFDAPUtil::get_mem_dtype(attr->getType(), mem_dtype_size);
534 for (
unsigned int loc = 0; loc < attr->getCount(); loc++) {
535 string print_rep = HDF5CFDAPUtil::print_attr(mem_dtype, loc, (
void*) &(attr->getValue()[0]));
536 at->append_attr(attr->getNewName(), HDF5CFDAPUtil::print_type(attr->getType()), print_rep);
546 BESDEBUG(
"h5",
"Coming to gen_dap_str_attr() "<<endl);
547 const vector<size_t>& strsize = attr->getStrSize();
548 unsigned int temp_start_pos = 0;
549 bool is_cset_ascii = attr->getCsetType();
550 for (
unsigned int loc = 0; loc < attr->getCount(); loc++) {
551 if (strsize[loc] != 0) {
552 string tempstring(attr->getValue().begin() + temp_start_pos,
553 attr->getValue().begin() + temp_start_pos + strsize[loc]);
554 temp_start_pos += strsize[loc];
562 if ((attr->getNewName() !=
"origname") && (attr->getNewName() !=
"fullnamepath") && (
true == is_cset_ascii))
564 at->append_attr(attr->getNewName(),
"String", tempstring);
574 void add_cf_grid_cvs(DDS & dds, EOS5GridPCType cv_proj_code,
float cv_point_lower,
float cv_point_upper,
575 float cv_point_left,
float cv_point_right,
const vector<HDF5CF::Dimension*>& dims)
580 if (HE5_GCTP_SNSOID == cv_proj_code || HE5_GCTP_LAMAZ == cv_proj_code || HE5_GCTP_PS == cv_proj_code) {
583 vector<HDF5CF::Dimension*>::const_iterator it_d;
584 string dim0name = dims[0]->getNewName();
585 int dim0size = dims[0]->getSize();
586 string dim1name = dims[1]->getNewName();
587 int dim1size = dims[1]->getSize();
590 BaseType *bt_dim0 = NULL;
591 BaseType *bt_dim1 = NULL;
602 ar_dim0 =
new HDF5CFGeoCF1D(HE5_GCTP_SNSOID, cv_point_upper, cv_point_lower, dim0size, dim0name, bt_dim0);
603 ar_dim0->append_dim(dim0size, dim0name);
605 ar_dim1 =
new HDF5CFGeoCF1D(HE5_GCTP_SNSOID, cv_point_left, cv_point_right, dim1size, dim1name, bt_dim1);
606 ar_dim1->append_dim(dim1size, dim1name);
607 dds.add_var(ar_dim0);
608 dds.add_var(ar_dim1);
612 if (bt_dim0)
delete bt_dim0;
613 if (bt_dim1)
delete bt_dim1;
614 if (ar_dim0)
delete ar_dim0;
615 if (ar_dim1)
delete ar_dim1;
616 throw InternalErr(__FILE__, __LINE__,
"Unable to allocate the HDFEOS2GeoCF1D instance.");
619 if (bt_dim0)
delete bt_dim0;
620 if (bt_dim1)
delete bt_dim1;
621 if (ar_dim0)
delete ar_dim0;
622 if (ar_dim1)
delete ar_dim1;
628 void add_cf_grid_mapinfo_var(DDS & dds,
const EOS5GridPCType grid_proj_code,
const unsigned short g_suffix)
633 string cf_projection_base =
"eos_cf_projection";
636 if(HE5_GCTP_SNSOID == grid_proj_code) {
639 dummy_proj_cf =
new HDF5CFGeoCFProj(cf_projection_base, cf_projection_base);
640 dds.add_var(dummy_proj_cf);
644 stringstream t_suffix_ss;
645 t_suffix_ss << g_suffix;
646 string cf_projection_name = cf_projection_base +
"_" + t_suffix_ss.str();
647 dummy_proj_cf =
new HDF5CFGeoCFProj(cf_projection_name, cf_projection_name);
648 dds.add_var(dummy_proj_cf);
650 if (dummy_proj_cf)
delete dummy_proj_cf;
656 void add_cf_grid_cv_attrs(DAS & das,
const vector<HDF5CF::Var*>& vars, EOS5GridPCType cv_proj_code,
657 float ,
float ,
float ,
float ,
658 const vector<HDF5CF::Dimension*>& dims,
const vector<double> &eos5_proj_params,
const unsigned short g_suffix)
660 void add_cf_grid_cv_attrs(DAS & das,
const vector<HDF5CF::Var*>& vars, EOS5GridPCType cv_proj_code,
661 const vector<HDF5CF::Dimension*>& dims,
const vector<double> &eos5_proj_params,
const unsigned short g_suffix)
666 if (HE5_GCTP_SNSOID == cv_proj_code || HE5_GCTP_PS == cv_proj_code || HE5_GCTP_LAMAZ== cv_proj_code) {
668 string dim0name = (dims[0])->getNewName();
669 int dim0size = dims[0]->getSize();
670 string dim1name = (dims[1])->getNewName();
671 int dim1size = dims[1]->getSize();
674 AttrTable *at = das.get_table(dim0name);
676 at = das.add_table(dim0name,
new AttrTable);
677 at->append_attr(
"standard_name",
"String",
"projection_y_coordinate");
679 string long_name =
"y coordinate of projection ";
680 at->append_attr(
"long_name",
"String", long_name);
683 at->append_attr(
"units",
"string",
"meter");
685 at->append_attr(
"_CoordinateAxisType",
"string",
"GeoY");
687 at = das.get_table(dim1name);
688 if (!at) at = das.add_table(dim1name,
new AttrTable);
690 at->append_attr(
"standard_name",
"String",
"projection_x_coordinate");
692 long_name =
"x coordinate of projection ";
693 at->append_attr(
"long_name",
"String", long_name);
696 at->append_attr(
"units",
"string",
"meter");
699 at->append_attr(
"_CoordinateAxisType",
"string",
"GeoX");
702 string cf_projection_base =
"eos_cf_projection";
703 string cf_projection;
704 if(HE5_GCTP_SNSOID == cv_proj_code)
705 cf_projection = cf_projection_base;
707 stringstream t_suffix_ss;
708 t_suffix_ss << g_suffix;
709 cf_projection = cf_projection_base +
"_" + t_suffix_ss.str();
711 add_cf_projection_attrs(das,cv_proj_code,eos5_proj_params,cf_projection);
715 add_cf_grid_mapping_attr(das, vars, cf_projection, dim0name, dim0size, dim1name, dim1size);
722 void add_cf_projection_attrs(DAS &das,EOS5GridPCType cv_proj_code,
const vector<double> &eos5_proj_params,
const string& cf_projection) {
724 AttrTable* at = das.get_table(cf_projection);
726 at = das.add_table(cf_projection,
new AttrTable);
728 if (HE5_GCTP_SNSOID == cv_proj_code) {
729 at->append_attr(
"grid_mapping_name",
"String",
"sinusoidal");
730 at->append_attr(
"longitude_of_central_meridian",
"Float64",
"0.0");
731 at->append_attr(
"earth_radius",
"Float64",
"6371007.181");
732 at->append_attr(
"_CoordinateAxisTypes",
"string",
"GeoX GeoY");
734 else if (HE5_GCTP_PS == cv_proj_code) {
740 double vert_lon_pole = HE5_EHconvAng(eos5_proj_params[4],HE5_HDFE_DMS_DEG);
743 double lat_true_scale = HE5_EHconvAng(eos5_proj_params[5],HE5_HDFE_DMS_DEG);
746 double fe = eos5_proj_params[6];
749 double fn = eos5_proj_params[7];
751 at->append_attr(
"grid_mapping_name",
"String",
"polar_stereographic");
753 ostringstream s_vert_lon_pole;
754 s_vert_lon_pole << vert_lon_pole;
758 at->append_attr(
"straight_vertical_longitude_from_pole",
"Float64", s_vert_lon_pole.str());
759 ostringstream s_lat_true_scale;
760 s_lat_true_scale << lat_true_scale;
762 at->append_attr(
"standard_parallel",
"Float64", s_lat_true_scale.str());
765 at->append_attr(
"false_easting",
"Float64",
"0.0");
769 at->append_attr(
"false_easting",
"Float64",s_fe.str());
774 at->append_attr(
"false_northing",
"Float64",
"0.0");
778 at->append_attr(
"false_northing",
"Float64",s_fn.str());
782 if(lat_true_scale >0)
783 at->append_attr(
"latitude_of_projection_origin",
"Float64",
"+90.0");
785 at->append_attr(
"latitude_of_projection_origin",
"Float64",
"-90.0");
788 at->append_attr(
"_CoordinateAxisTypes",
"string",
"GeoX GeoY");
795 else if(HE5_GCTP_LAMAZ == cv_proj_code) {
796 double lon_proj_origin = HE5_EHconvAng(eos5_proj_params[4],HE5_HDFE_DMS_DEG);
797 double lat_proj_origin = HE5_EHconvAng(eos5_proj_params[5],HE5_HDFE_DMS_DEG);
798 double fe = eos5_proj_params[6];
799 double fn = eos5_proj_params[7];
801 at->append_attr(
"grid_mapping_name",
"String",
"lambert_azimuthal_equal_area");
803 ostringstream s_lon_proj_origin;
804 s_lon_proj_origin << lon_proj_origin;
805 at->append_attr(
"longitude_of_projection_origin",
"Float64", s_lon_proj_origin.str());
807 ostringstream s_lat_proj_origin;
808 s_lat_proj_origin << lat_proj_origin;
810 at->append_attr(
"latitude_of_projection_origin",
"Float64", s_lat_proj_origin.str());
814 at->append_attr(
"false_easting",
"Float64",
"0.0");
818 at->append_attr(
"false_easting",
"Float64",s_fe.str());
823 at->append_attr(
"false_northing",
"Float64",
"0.0");
827 at->append_attr(
"false_northing",
"Float64",s_fn.str());
830 at->append_attr(
"_CoordinateAxisTypes",
"string",
"GeoX GeoY");
841 void add_cf_grid_mapping_attr(DAS &das,
const vector<HDF5CF::Var*>& vars,
const string& cf_projection,
842 const string & dim0name, hsize_t dim0size,
const string &dim1name, hsize_t dim1size)
846 cerr<<
"dim0name is "<<dim0name <<endl;
847 cerr<<
"dim1name is "<<dim1name <<endl;
848 cerr<<
"dim0size is "<<dim0size <<endl;
849 cerr<<
"dim1size is "<<dim1size <<endl;
853 vector<HDF5CF::Var *>::const_iterator it_v;
854 for (it_v = vars.begin(); it_v != vars.end(); ++it_v) {
856 if ((*it_v)->getRank() > 1) {
857 bool has_dim0 =
false;
858 bool has_dim1 =
false;
859 const vector<HDF5CF::Dimension*>& dims = (*it_v)->getDimensions();
860 for (vector<HDF5CF::Dimension *>::const_iterator j = dims.begin(); j != dims.end(); ++j) {
861 if ((*j)->getNewName() == dim0name && (*j)->getSize() == dim0size)
863 else if ((*j)->getNewName() == dim1name && (*j)->getSize() == dim1size)
867 if (
true == has_dim0 &&
true == has_dim1) {
868 AttrTable *at = das.get_table((*it_v)->getNewName());
869 if (!at) at = das.add_table((*it_v)->getNewName(),
new AttrTable);
872 at->append_attr(
"grid_mapping",
"String", cf_projection);
880 void add_ll_valid_range(AttrTable* at,
bool is_lat) {
882 at->append_attr(
"valid_min",
"Float64",
"-90.0");
883 at->append_attr(
"valid_max",
"Float64",
"90.0");
886 at->append_attr(
"valid_min",
"Float64",
"-180.0");
887 at->append_attr(
"valid_max",
"Float64",
"180.0");
892 bool need_attr_values_for_dap4(
const HDF5CF::Var *var) {
893 bool ret_value =
false;
894 if((HDF5RequestHandler::get_dmr_64bit_int()!=NULL) &&
901 void map_cfh5_attrs_to_dap4(
const HDF5CF::Var *var,BaseType* d4_var) {
903 vector<HDF5CF::Attribute *>::const_iterator it_ra;
904 for (it_ra = var->getAttributes().begin();
905 it_ra != var->getAttributes().end(); ++it_ra) {
908 size_t mem_dtype_size = ((*it_ra)->getBufSize()) / ((*it_ra)->getCount());
909 H5DataType mem_dtype = HDF5CFDAPUtil::get_mem_dtype((*it_ra)->getType(), mem_dtype_size);
911 string dap2_attrtype = HDF5CFDAPUtil::print_type(mem_dtype);
913 D4Attribute *d4_attr =
new D4Attribute((*it_ra)->getNewName(),dap4_attrtype);
914 if(dap4_attrtype == attr_str_c) {
915 const vector<size_t>& strsize = (*it_ra)->getStrSize();
916 unsigned int temp_start_pos = 0;
917 for (
unsigned int loc = 0; loc < (*it_ra)->getCount(); loc++) {
918 if (strsize[loc] != 0) {
919 string tempstring((*it_ra)->getValue().begin() + temp_start_pos,
920 (*it_ra)->getValue().begin() + temp_start_pos + strsize[loc]);
921 temp_start_pos += strsize[loc];
922 if (((*it_ra)->getNewName() !=
"origname") && ((*it_ra)->getNewName() !=
"fullnamepath"))
924 d4_attr->add_value(tempstring);
929 for (
unsigned int loc = 0; loc < (*it_ra)->getCount(); loc++) {
930 string print_rep = HDF5CFDAPUtil::print_attr(mem_dtype, loc, (
void*) &((*it_ra)->getValue()[0]));
931 d4_attr->add_value(print_rep);
934 d4_var->attributes()->add_attribute_nocopy(d4_attr);
939 void check_update_int64_attr(
const string & obj_name,
const HDF5CF::Attribute * attr) {
940 if(attr->getType() == H5INT64 || attr->getType() == H5UINT64) {
941 DMR * dmr = HDF5RequestHandler::get_dmr_64bit_int();
943 string dap2_attrtype = HDF5CFDAPUtil::print_type(attr->getType());
945 D4Attribute *d4_attr =
new D4Attribute(attr->getNewName(),dap4_attrtype);
946 for (
unsigned int loc = 0; loc < attr->getCount(); loc++) {
947 string print_rep = HDF5CFDAPUtil::print_attr(attr->getType(), loc, (
void*) &(attr->getValue()[0]));
948 d4_attr->add_value(print_rep);
950 D4Group * root_grp = dmr->root();
951 D4Attribute *d4_hg_container;
952 if(root_grp->attributes()->empty() ==
true){
957 d4_hg_container =
new D4Attribute;
958 d4_hg_container->set_name(
"HDF5_GLOBAL_integer_64");
959 d4_hg_container->set_type(attr_container_c);
960 root_grp->attributes()->add_attribute_nocopy(d4_hg_container);
966 d4_hg_container = root_grp->attributes()->get(
"HDF5_GLOBAL_integer_64");
968 string test_obj_name =
"HDF5_GLOBAL_integer_64."+obj_name;
973 D4Attribute *d4_container = root_grp->attributes()->get(test_obj_name);
979 if(d4_container == NULL) {
980 d4_container =
new D4Attribute;
981 d4_container->set_name(obj_name);
982 d4_container->set_type(attr_container_c);
991 d4_container->attributes()->add_attribute_nocopy(d4_attr);
996 if(d4_hg_container->attributes()->get(obj_name)==NULL)
997 d4_hg_container->attributes()->add_attribute_nocopy(d4_container);
1001 d4_hg_container->attributes()->add_attribute_nocopy(d4_attr);