diff --git a/config/xsd/info/paramInfo.xsd b/config/xsd/info/paramInfo.xsd
index 58a54ad..a02cb4b 100644
--- a/config/xsd/info/paramInfo.xsd
+++ b/config/xsd/info/paramInfo.xsd
@@ -18,6 +18,7 @@
+
diff --git a/src/Info/ParamTable.cc b/src/Info/ParamTable.cc
index 328e889..b40ae7b 100644
--- a/src/Info/ParamTable.cc
+++ b/src/Info/ParamTable.cc
@@ -113,28 +113,7 @@ namespace AMDA {
* @brief Get if it's a variable table
*/
bool ParamTable::isFullVariable(ParameterManager* parameterManager) {
- bool isVariable = true;
- std::list allLinkedParams;
- std::map& tableParams = this->getTableParams(parameterManager);
- if (!tableParams.empty()) {
- for (auto tableParam : tableParams) {
- std::list allParams ;
- allParams.push_back(tableParam.second);
- addRelatedParams( parameterManager, tableParam.second, allParams);
- for (auto pId: allParams){
- AMDA::Parameters::ParameterSPtr pParam = parameterManager->getParameter(pId);
- Process* lProcess = dynamic_cast (pParam->getDataWriterTemplate().get());
- if (lProcess != NULL) {
- AMDA::Parameters::SemiVariableTable semiVariableTable = lProcess ->getSemiVariableTable();
- std::list::iterator it;
- if (!semiVariableTable.tabHeader.empty()) {
- isVariable = false;
- }
- }
- }
- }
- }
- return isVariable;
+ return _fullVariable;
}
void ParamTable::addRelatedParams(ParameterManager *parameterManager, std::string paramId, std::listrelatedParams){
@@ -252,8 +231,11 @@ namespace AMDA {
// recuperer les centres
bool variableSizes = false;
unsigned int nModes = semiVariableTable.tabValues.size();
- unsigned int nValues = semiVariableTable.tabHeader.size();
+ unsigned int index =0;
+ unsigned nValues = 0;
for (auto tabValues : semiVariableTable.tabValues) {
+ if (index == 0)
+ nValues = tabValues.second.size();
if (tabValues.second.size() != nValues)
variableSizes = true;
}
diff --git a/src/Info/ParamTableNode.cc b/src/Info/ParamTableNode.cc
index a1bc808..737d970 100644
--- a/src/Info/ParamTableNode.cc
+++ b/src/Info/ParamTableNode.cc
@@ -71,6 +71,14 @@ public:
variable = (strcmp((char*)value,"true") == 0);
xmlFree(value);
}
+ //Get fullVariable
+ value = xmlGetProp(pNode, (const xmlChar *) "fullVariable");
+ bool fullVariable = false;
+ if (value != NULL)
+ {
+ fullVariable = (strcmp((char*)value,"true") == 0);
+ xmlFree(value);
+ }
xmlChar* lboundsName = NULL;
try {
@@ -88,6 +96,7 @@ public:
table->setName(name);
table->setUnits(units);
table->setIsVariable(variable);
+ table->setIsFullVariable(fullVariable);
pParamInfo->addTable(dim, table);
} catch (...) {
@@ -149,6 +158,14 @@ public:
variable = (strcmp((char*)value,"true") == 0);
xmlFree(value);
}
+ //Get fullVariable
+ value = xmlGetProp(pNode, (const xmlChar *) "fullVariable");
+ bool fullVariable = false;
+ if (value != NULL)
+ {
+ fullVariable = (strcmp((char*)value,"true") == 0);
+ xmlFree(value);
+ }
xmlChar* lminTableName = NULL;
xmlChar* lmaxTableName = NULL;
@@ -174,6 +191,7 @@ public:
table->setName(name);
table->setUnits(units);
table->setIsVariable(variable);
+ table->setIsFullVariable(fullVariable);
pParamInfo->addTable(dim,table);
@@ -238,7 +256,14 @@ public:
variable = (strcmp((char*)value,"true") == 0);
xmlFree(value);
}
-
+ //Get fullVariable
+ value = xmlGetProp(pNode, (const xmlChar *) "fullVariable");
+ bool fullVariable = false;
+ if (value != NULL)
+ {
+ fullVariable = (strcmp((char*)value,"true") == 0);
+ xmlFree(value);
+ }
xmlChar* lcenterName = NULL;
xmlChar* lsize = NULL;
try {
@@ -261,6 +286,7 @@ public:
table->setName(name);
table->setUnits(units);
table->setIsVariable(variable);
+ table->setIsFullVariable(fullVariable);
pParamInfo->addTable(dim, table);
} catch (...) {
@@ -328,6 +354,14 @@ public:
variable = (strcmp((char*)value,"true") == 0);
xmlFree(value);
}
+ //Get fullVariable
+ value = xmlGetProp(pNode, (const xmlChar *) "fullVariable");
+ bool fullVariable = false;
+ if (value != NULL)
+ {
+ fullVariable = (strcmp((char*)value,"true") == 0);
+ xmlFree(value);
+ }
xmlChar* lcenterName = NULL;
xmlChar* lwidthName = NULL;
@@ -354,6 +388,7 @@ public:
table->setName(name);
table->setUnits(units);
table->setIsVariable(variable);
+ table->setIsFullVariable(fullVariable);
pParamInfo->addTable(dim, table);
} catch (...) {
@@ -421,6 +456,14 @@ public:
variable = (strcmp((char*)value,"true") == 0);
xmlFree(value);
}
+ //Get fullVariable
+ value = xmlGetProp(pNode, (const xmlChar *) "fullVariable");
+ bool fullVariable = false;
+ if (value != NULL)
+ {
+ fullVariable = (strcmp((char*)value,"true") == 0);
+ xmlFree(value);
+ }
xmlChar* lcenterName = NULL;
try {
@@ -445,7 +488,8 @@ public:
table->setName(name);
table->setUnits(units);
table->setIsVariable(variable);
-
+ table->setIsFullVariable(fullVariable);
+
pParamInfo->addTable(dim, table);
} catch (...) {
if (lcenterName) {
diff --git a/src/ParamOutputImpl/Download/DownloadOutput.cc b/src/ParamOutputImpl/Download/DownloadOutput.cc
index 35bf4d1..dbf78a1 100644
--- a/src/ParamOutputImpl/Download/DownloadOutput.cc
+++ b/src/ParamOutputImpl/Download/DownloadOutput.cc
@@ -174,9 +174,12 @@ namespace AMDA {
if( tableParam == NULL)
continue;
tableParam -> init(this, _timeIntervalList);
+ if(table.second->isFullVariable(&_parameterManager)){
+ addAditionalDownloadParams(tableParamId.second, true);
+ }else{
+ _tableParamsList.push_back( tableParamId.second);
+ }
AMDA::Info::ParamInfoSPtr tableInfo = AMDA::Info::ParamMgr::getInstance()->getParamInfoFromId(tableParamId.second);
- std::vector> tableInfoMap = tableInfo->getTableInfoMap(&_parameterManager);
- _tableParamsList.push_back( tableParamId.second);
for(auto linkedParamId : tableInfo->getLinkedParamList()){
addAditionalDownloadParams(linkedParamId, false);
}
--
libgit2 0.21.2