Commit 31f7feacf736c00bcbaf0749ead3acf2f4a2e495

Authored by Hacene SI HADJ MOHAND
1 parent a133a1e6

ajout autre info

src/ParamGetImpl/DDServerInterface/ParamGetDDBase.cc
... ... @@ -217,6 +217,24 @@ namespace AMDA {
217 217 //Dataset info
218 218 AMDA::Info::DataSetInfoSPtr datasetInfo = AMDA::Info::DataSetMgr::getInstance()->getDataSetInfoFromId(datasetId,true);
219 219  
  220 + // adding tableParams into linked params
  221 + std::map<int, boost::shared_ptr<AMDA::Info::ParamTable>> tables =paramInfo->getTables();
  222 +
  223 + if(! tables.empty()){
  224 + for(auto table : tables){
  225 + if (table.second != nullptr){
  226 + if(table.second->isVariable(&parameter.getParameterManager())){
  227 + std::map<std::string, std::string> tableParams = table.second->getTableParams(&parameter.getParameterManager());
  228 + if(! tableParams.empty())
  229 + for(auto tableParam : tableParams){
  230 + paramInfo->addLinkedParamId(tableParam.second);
  231 + }
  232 +
  233 + }
  234 + }
  235 + }
  236 + }
  237 +
220 238 if (datasetInfo == nullptr)
221 239 return;
222 240  
... ...
src/ParamOutputImpl/Download/FileWriter.cc
... ... @@ -41,6 +41,11 @@ void FileWriter::sortParametersInfoByType(std::string crtParamId,
41 41 {
42 42 //it's a base parameter
43 43 baseParamsInfoList.insert(std::pair<std::string,AMDA::Info::ParamInfoSPtr>(crtParamId,paramInfo));
  44 + if(!paramInfo->getLinkedParamList().empty())
  45 + {
  46 + for (auto linkedParamId : paramInfo->getLinkedParamList())
  47 + sortParametersInfoByType(linkedParamId, baseParamsInfoList, derivedParamsInfoList);
  48 + }
44 49 }
45 50 else
46 51 {
... ...