Commit e916534262a4d226073e2a2b684a203dc460102c
1 parent
881bd225
Exists in
master
and in
66 other branches
Write data mining expression in description attribute
Showing
4 changed files
with
13 additions
and
11 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/DataMiningImpl/IHMInputOutputParamsDataMiningClass.php
... | ... | @@ -36,7 +36,7 @@ class IHMInputOutputParamsDataMiningClass extends IHMInputOutputParamsAbstractCl |
36 | 36 | $paramId = "datamining_".md5($expressionInfo["expression"]); |
37 | 37 | |
38 | 38 | //create a derived param for the expression |
39 | - $this->paramManager->addProcessParam($paramId, $expressionInfo["expression"], | |
39 | + $this->paramManager->addProcessParam($paramId, $expressionInfo["expression"], $input->expression, | |
40 | 40 | $expressionInfo['params'], $input->sampling, |
41 | 41 | $input->gap,time(),$this->paramsData); |
42 | 42 | |
... | ... | @@ -64,4 +64,4 @@ class IHMInputOutputParamsDataMiningClass extends IHMInputOutputParamsAbstractCl |
64 | 64 | return $this->commonMarshallResult($data,DATAMINING_RESULT_FILE_KEY); |
65 | 65 | } |
66 | 66 | } |
67 | -?> | |
68 | 67 | \ No newline at end of file |
68 | +?> | ... | ... |
src/InputOutput/IHMImpl/Tools/IHMParamManagerClass.php
... | ... | @@ -39,9 +39,9 @@ class IHMParamManagerClass |
39 | 39 | /* |
40 | 40 | * @brief Add a process parameter |
41 | 41 | */ |
42 | - public function addProcessParam($paramId,$expression,$params,$sampling,$gap,$dateModif,$paramsData) | |
42 | + public function addProcessParam($paramId,$expression,$expression_info,$params,$sampling,$gap,$dateModif,$paramsData) | |
43 | 43 | { |
44 | - $paramsData->addProcessParamToCreate($paramId, $expression, $params, $sampling, $gap,$dateModif); | |
44 | + $paramsData->addProcessParamToCreate($paramId, $expression, $expression_info, $params, $sampling, $gap,$dateModif); | |
45 | 45 | |
46 | 46 | foreach ($params as $param) { |
47 | 47 | $template_args = NULL; |
... | ... | @@ -192,7 +192,7 @@ class IHMParamManagerClass |
192 | 192 | $paramId = $param; |
193 | 193 | |
194 | 194 | //create a process param for the derived parameter |
195 | - $this->addProcessParam($paramId, $expressionInfo["expression"], | |
195 | + $this->addProcessParam($paramId, $expressionInfo["expression"], $res["param"]["expression"], | |
196 | 196 | $expressionInfo['params'], $res["param"]["timestep"], |
197 | 197 | 0,$res["param"]["dateModif"],$paramsData); |
198 | 198 | ... | ... |
src/Request/ParamsRequestImpl/Nodes/Params/ParamNodeClass.php
... | ... | @@ -13,6 +13,7 @@ define ("PARAM_SAMPLING", "time_resolution"); |
13 | 13 | define ("PARAM_GAP", "gap_threshold"); |
14 | 14 | define ("PARAM_GET", "get"); |
15 | 15 | define ("PARAM_PROCESS", "process"); |
16 | +define ("PARAM_PROCESS_DESCRIPTION", "description"); | |
16 | 17 | define ("PARAM_OUTPUT", "output"); |
17 | 18 | |
18 | 19 | abstract class ParamGetTypeEnum |
... | ... | @@ -108,10 +109,11 @@ class ParamNodeClass extends NodeClass |
108 | 109 | return NULL; |
109 | 110 | } |
110 | 111 | |
111 | - public function setProcess($process) | |
112 | + public function setProcess($process, $process_info) | |
112 | 113 | { |
113 | 114 | $node = $this->getChildInstanceByName(PARAM_PROCESS, true); |
114 | 115 | $node->setValue($process); |
116 | + $node->setAttribute(PARAM_PROCESS_DESCRIPTION, $process_info); | |
115 | 117 | } |
116 | 118 | |
117 | 119 | public function setOutput() |
... | ... | @@ -164,7 +166,7 @@ class ParamNodeClass extends NodeClass |
164 | 166 | |
165 | 167 | $processXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_PROCESS); |
166 | 168 | if (isset($processXmlNode)) |
167 | - $this->setProcess($this->getXmlNodeValue($processXmlNode)); | |
169 | + $this->setProcess($this->getXmlNodeValue($processXmlNode),$this->getXmlNodeAttribute($processXmlNode,PARAM_PROCESS_DESCRIPTION)); | |
168 | 170 | |
169 | 171 | $outputNode = $this->setOutput(); |
170 | 172 | $outputXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_OUTPUT); | ... | ... |
src/Request/ParamsRequestImpl/ParamsRequestDataClass.php
... | ... | @@ -117,7 +117,7 @@ class ParamsRequestDataClass extends ProcessRequestDataClass |
117 | 117 | return $this->processParamsToCreate; |
118 | 118 | } |
119 | 119 | |
120 | - public function addProcessParamToCreate($paramId, $expression, $getParams, $sampling, $gap, $dateModif) | |
120 | + public function addProcessParamToCreate($paramId, $expression, $expression_info, $getParams, $sampling, $gap, $dateModif) | |
121 | 121 | { |
122 | 122 | $newParam = new ParamNodeClass(); |
123 | 123 | $newParam->setId($paramId); |
... | ... | @@ -132,7 +132,7 @@ class ParamsRequestDataClass extends ProcessRequestDataClass |
132 | 132 | else |
133 | 133 | $amdaParamNode->setParamName($getParam['paramid']); |
134 | 134 | } |
135 | - $newParam->setProcess($expression); | |
135 | + $newParam->setProcess($expression, $expression_info); | |
136 | 136 | $newParam->setOutput(); |
137 | 137 | |
138 | 138 | $this->processParamsToCreate[$paramId] = array('param' => $newParam, 'dateModif' => $dateModif); |
... | ... | @@ -160,7 +160,7 @@ class ParamsRequestDataClass extends ProcessRequestDataClass |
160 | 160 | |
161 | 161 | $localParamNode->addLocalParam($realVarId, $minSampling, $maxSampling, $type, $size); |
162 | 162 | |
163 | - $newParam->setProcess(""); | |
163 | + $newParam->setProcess("",""); | |
164 | 164 | $newParam->setOutput(); |
165 | 165 | |
166 | 166 | if ($isImpex) |
... | ... | @@ -176,4 +176,4 @@ class ParamsRequestDataClass extends ProcessRequestDataClass |
176 | 176 | } |
177 | 177 | } |
178 | 178 | |
179 | -?> | |
180 | 179 | \ No newline at end of file |
180 | +?> | ... | ... |