Commit 9d62f8473d29c95662aa33171bc311d647449041
1 parent
78b2fa29
Exists in
master
and in
18 other branches
Add CDF_ISTP format + TT2000
Showing
3 changed files
with
12 additions
and
1 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/DownloadImpl/IHMInputOutputParamsDownloadClass.php
... | ... | @@ -83,6 +83,11 @@ class IHMInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClas |
83 | 83 | $downloadNode->setFileFormat(RequestOutputDownloadFileFormatEnum::CDF); |
84 | 84 | $formatExtension = ".cdf"; |
85 | 85 | break; |
86 | + case "cdf-istp": | |
87 | + $downloadNode->setFileFormat(RequestOutputDownloadFileFormatEnum::CDF_ISTP); | |
88 | + $downloadNode->setTimeFormat(RequestOutputDownloadTimeFormatEnum::TT2000); | |
89 | + $formatExtension = ".cdf"; | |
90 | + break; | |
86 | 91 | case "json" : |
87 | 92 | $downloadNode->setFileFormat(RequestOutputDownloadFileFormatEnum::JSON); |
88 | 93 | $formatExtension = ".json"; | ... | ... |
src/InputOutput/WSImpl/Params/DownloadImpl/WSInputOutputParamsDownloadClass.php
... | ... | @@ -125,7 +125,12 @@ class WSInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClass |
125 | 125 | $hash .= $input->ref_sampling_param; |
126 | 126 | } |
127 | 127 | else { |
128 | - $downloadNode->setStructure(RequestOutputDownloadStructureEnum::ONE_FILE_PER_PARAMETER_PER_INTERVAL); | |
128 | + if (count($input->list) == 1) { | |
129 | + $downloadNode->setStructure(RequestOutputDownloadStructureEnum::ONE_FILE); | |
130 | + } | |
131 | + else { | |
132 | + $downloadNode->setStructure(RequestOutputDownloadStructureEnum::ONE_FILE_PER_PARAMETER_PER_INTERVAL); | |
133 | + } | |
129 | 134 | } |
130 | 135 | |
131 | 136 | $downloadNode->setPrecision("true"); | ... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDownloadNodeClass.php