Commit 6139c32c2434b5eec34def9edfed087712ea0718
1 parent
b4950fd0
Exists in
master
and in
62 other branches
Give the possibility to put header in a separate file (#6497)
Showing
2 changed files
with
17 additions
and
1 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/DownloadImpl/IHMInputOutputParamsDownloadClass.php
@@ -15,7 +15,7 @@ class IHMInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClas | @@ -15,7 +15,7 @@ class IHMInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClas | ||
15 | */ | 15 | */ |
16 | protected function unmarshallRequest($input) | 16 | protected function unmarshallRequest($input) |
17 | { | 17 | { |
18 | - //{"nodeType":"download","type":"Download","downloadSrc":"0","structure":"2","sampling":600,"output":"", | 18 | + //{"nodeType":"download","type":"Download","downloadSrc":"0","structure":"2","sampling":600,"separateInfoFile":false,"output":"", |
19 | // "header":"0","timesrc":"TimeTable","timeTables":[{"timeTableName":"rzerzer","id":"tt_1"},{"timeTableName":"sqsdq","id":"tt_0"}], | 19 | // "header":"0","timesrc":"TimeTable","timeTables":[{"timeTableName":"rzerzer","id":"tt_1"},{"timeTableName":"sqsdq","id":"tt_0"}], |
20 | //"list":["dst"],"milli":false,"fileformat":"ASCII","timeformat":"YYYY-MM-DDThh:mm:ss","compression":"tar+gzip","leaf":true} | 20 | //"list":["dst"],"milli":false,"fileformat":"ASCII","timeformat":"YYYY-MM-DDThh:mm:ss","compression":"tar+gzip","leaf":true} |
21 | 21 | ||
@@ -121,6 +121,9 @@ class IHMInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClas | @@ -121,6 +121,9 @@ class IHMInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClas | ||
121 | throw new Exception('Structure type not implemented.'); | 121 | throw new Exception('Structure type not implemented.'); |
122 | } | 122 | } |
123 | 123 | ||
124 | + //separateInfoFile | ||
125 | + $downloadNode->setSeparateInfoFile(isset($input->separateInfoFile) ? $input->separateInfoFile : FALSE); | ||
126 | + | ||
124 | //filecompressData : [['zip', 'zip'], ['tar+gzip', 'tar+gzip']], | 127 | //filecompressData : [['zip', 'zip'], ['tar+gzip', 'tar+gzip']], |
125 | $extension = ""; | 128 | $extension = ""; |
126 | $resultFilePrefix = ""; | 129 | $resultFilePrefix = ""; |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDownloadNodeClass.php
@@ -8,6 +8,7 @@ define ("REQUESTOUTPUTDOWNLOAD_FILEFORMAT", "fileFormat"); | @@ -8,6 +8,7 @@ define ("REQUESTOUTPUTDOWNLOAD_FILEFORMAT", "fileFormat"); | ||
8 | define ("REQUESTOUTPUTDOWNLOAD_FILENAME", "fileName"); | 8 | define ("REQUESTOUTPUTDOWNLOAD_FILENAME", "fileName"); |
9 | define ("REQUESTOUTPUTDOWNLOAD_SAMPLING", "timeResolution"); | 9 | define ("REQUESTOUTPUTDOWNLOAD_SAMPLING", "timeResolution"); |
10 | define ("REQUESTOUTPUTDOWNLOAD_STRUCTURE", "outputStructure"); | 10 | define ("REQUESTOUTPUTDOWNLOAD_STRUCTURE", "outputStructure"); |
11 | +define ("REQUESTOUTPUTDOWNLOAD_SEPARATEINFOGILE", "separateInfoFile"); | ||
11 | define ("REQUESTOUTPUTDOWNLOAD_PRECISION", "precision"); | 12 | define ("REQUESTOUTPUTDOWNLOAD_PRECISION", "precision"); |
12 | 13 | ||
13 | define ("REQUESTOUTPUTDOWNLOADPARAM_NAME", "param"); | 14 | define ("REQUESTOUTPUTDOWNLOADPARAM_NAME", "param"); |
@@ -199,6 +200,18 @@ class RequestOutputDownloadNodeClass extends NodeClass | @@ -199,6 +200,18 @@ class RequestOutputDownloadNodeClass extends NodeClass | ||
199 | return (($node == NULL) ? RequestOutputDownloadStructureEnum::UNKNOWN : $node->getValue()); | 200 | return (($node == NULL) ? RequestOutputDownloadStructureEnum::UNKNOWN : $node->getValue()); |
200 | } | 201 | } |
201 | 202 | ||
203 | + public function setSeparateInfoFile($separateInfoFile) | ||
204 | + { | ||
205 | + $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_STRUCTURE, true); | ||
206 | + $node->setAttribute(REQUESTOUTPUTDOWNLOAD_SEPARATEINFOGILE, $separateInfoFile ? "true" : "false"); | ||
207 | + } | ||
208 | + | ||
209 | + public function getSeparateInfoFile() | ||
210 | + { | ||
211 | + $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_STRUCTURE); | ||
212 | + return (($node == NULL) ? FALSE : ($node->getAttribute(REQUESTOUTPUTDOWNLOAD_SEPARATEINFOGILE) == "true")); | ||
213 | + } | ||
214 | + | ||
202 | public function setPrecision($precision) | 215 | public function setPrecision($precision) |
203 | { | 216 | { |
204 | $this->setAttribute(REQUESTOUTPUTDOWNLOAD_PRECISION, $precision); | 217 | $this->setAttribute(REQUESTOUTPUTDOWNLOAD_PRECISION, $precision); |