processData)) unset($this->processData); $processData = new TTRequestDataClass(); $processData->setInputFileName($input['inputFile']); $processData->setInputFileFormat(TTRequestFileFormatEnum::INTERNAL); $processData->setOutputDir(IHMConfigClass::getDownloadTmpPath()); $processData->setOutputFileName($input['outputFileName']); $outputFormat = empty($input['outputFormat']) ? 'VOTABLE' : $input['outputFormat']; switch (strtolower($outputFormat)) { case 'ascii': $processData->setOutputFileFormat(TTRequestFileFormatEnum::ASCII); break; case 'votable': $processData->setOutputFileFormat(TTRequestFileFormatEnum::VOTABLE); break; case 'internal': $processData->setOutputFileFormat(TTRequestFileFormatEnum::INTERNAL); break; case 'hpevent': $processData->setOutputFileFormat(TTRequestFileFormatEnum::SPACE); break; default: throw new Exception('Unknown output format'); } $processData->setType($function); $processData->setCmd("ttConversion"); $this->processData = $processData; $this->postProcessTT = new PostProcessTTClass(); $this->postProcessTT->setOutputDirAlias(IHMConfigClass::getDownloadTmpPath()); $this->postProcessTT->setPostCmd("mv \"".IHMConfigClass::getDownloadTmpPath().$input['outputFileName']."\" \"".WSConfigClass::getWsResultDir().$input['outputFileName']."\""); return $this->processData; } /* * @brief translate output data from AMDA_Integration module to IHM client request */ public function getOutput($data) { $result = array('success' => $data->getSuccess()); if ($result['success']) { $cmd = $this->postProcessTT->getPostCmd(); system($cmd); $result['file'] = WSConfigClass::getWsResultDir()."/".$data->getOutputFileName(); } return $result; } } ?>