Commit 55f623c07f64ceea243dea6d933817029e4e570d
1 parent
952dd7c7
Exists in
master
and in
66 other branches
catalog to statistics
Showing
1 changed file
with
0 additions
and
63 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/CatalogImpl/IHMInputOutputParamsCatalogClass.php deleted
... | ... | @@ -1,63 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -define ("CATALOG_RESULT_FILE_KEY", "statistic"); | |
4 | - | |
5 | -/** | |
6 | - * @class IHMInputOutputParamsCatalogClass | |
7 | - * @brief Implementation of IHMInputOutputParamsAbstractClass to treat catalog generation request | |
8 | - * @details | |
9 | -*/ | |
10 | -class IHMInputOutputParamsCatalogClass extends IHMInputOutputParamsAbstractClass | |
11 | -{ | |
12 | - /* | |
13 | - * @brief method to unmarshall a catalog generation request | |
14 | - */ | |
15 | - protected function unmarshallRequest($input) | |
16 | - { | |
17 | - /* | |
18 | - {"id":"","timesrc":"TimeTable","name":"test","created":null,"description":"first","objName":"","objFormat":"","folderId":"","nbIntervals":0,"cacheToken":"","parameter":[{"param":"imf_gsm","function":"min"},{"param":"imf_mag","function":"max"}],"timeTables":[{"id":"sharedtt_26"},{"id":"sharedtt_27"}],"leaf":true,"nodeType":"catalog"}]' | |
19 | - */ | |
20 | - $paramsNode = $this->paramsData->getRequestNode()->getParamsNode(); | |
21 | - | |
22 | - //unmarshall time definition | |
23 | - $this->unmarshallTimeDefinition($input); | |
24 | - | |
25 | - //unmarshall statistic output definition | |
26 | - $outputsNode = $this->paramsData->getRequestNode()->getOutputsNode(); | |
27 | - $catalogNode = $outputsNode->addNewOutput(RequestOutputTypeEnum::STATISTIC); | |
28 | - $catalogNode->setTimeFormat(RequestOutputStatisticTimeFormatEnum::ISO); | |
29 | - $catalogNode->setFileFormat(RequestOutputStatisticFileFormatEnum::XML); | |
30 | - | |
31 | - // parse parameters / functions array | |
32 | - foreach ($input->parameter as $obj) { | |
33 | - $paramFunctionAssociation[$obj->param][] = $obj->function; | |
34 | - } | |
35 | - | |
36 | - foreach ($paramFunctionAssociation as $param => $functions) { | |
37 | - $paramsNode->addParam($param); | |
38 | - $outputParamNode = $catalogNode->addParam($param); | |
39 | - foreach ($functions as $function) $outputParamNode->addFunction($function); | |
40 | - $paramInfo = $this->paramManager->addExistingParam($param,$this->paramsData); | |
41 | - } | |
42 | - | |
43 | - $resultFile = "result_".$this->requestID; | |
44 | - $this->paramsData->addWaitingResult(CATALOG_RESULT_FILE_KEY, $resultFile); | |
45 | -// | |
46 | - $postProcessCmd = "mv statistic_*"; | |
47 | - $postProcessCmd .= '.xml'; | |
48 | - $postProcessCmd .= " ".$resultFile.$extension; | |
49 | - | |
50 | -// | |
51 | - $this->paramsData->setPostCmd($postProcessCmd); | |
52 | - return $this->paramsData; | |
53 | - } | |
54 | - | |
55 | - /* | |
56 | - * @brief method to marshall the result of a catalog generation request | |
57 | - */ | |
58 | - protected function marshallResult($data) | |
59 | - { | |
60 | - return $this->commonMarshallResult($data,CATALOG_RESULT_FILE_KEY); | |
61 | - } | |
62 | -} | |
63 | -?> | |
64 | 0 | \ No newline at end of file |