setAttribute(REQUESTOUTPUTDOWNLOADPARAM_ID, $id); } public function getId() { return $this->getAttribute(REQUESTOUTPUTDOWNLOADPARAM_ID); } public function addIndex($index) { if ($this->indexExist($index)) return; $node = new NodeClass(REQUESTOUTPUTDOWNLOADPARAM_INDEX); $node->setValue($index); $this->addChild($node); } public function indexExist($index) { $indexNodes = $this->getChildrenByName(REQUESTOUTPUTDOWNLOADPARAM_INDEX); foreach ($indexNodes as $indexNode) if ($indexNode->getValue() == $index) return true; return false; } public function addCalibInfo($calibInfo) { if ($this->calibInfoExist($calibInfo)) return; $node = new NodeClass(REQUESTOUTPUTDOWNLOADPARAM_CALIB); $node->setValue($calibInfo); $this->addChild($node); } public function calibInfoExist($calibInfo) { $calibNodes = $this->getChildrenByName(REQUESTOUTPUTDOWNLOADPARAM_CALIB); foreach ($calibNodes as $calibNode) if ($calibNode->getValue() == $calibInfo) return true; return false; } } /** * @class RequestOutputDownloadNodeClass * @brief Definition of a request download output node for AMDA_Kernel * @details */ class RequestOutputDownloadNodeClass extends NodeClass { public function __construct() { parent::__construct(REQUESTOUTPUTDOWNLOAD_NAME); } public function setTimeFormat($type) { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_TIMEFORMAT, true); $node->setValue($type); } public function getTimeFormat() { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_TIMEFORMAT); return (($node == NULL) ? RequestOutputDownloadTimeFormatEnum::UNKNOWN : $node->getValue()); } public function setFileFormat($type) { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_FILEFORMAT, true); $node->setValue($type); } public function getFileFormat() { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_FILEFORMAT); return (($node == NULL) ? RequestOutputDownloadFileFormatEnum::UNKNOWN : $node->getValue()); } public function setFileName($name) { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_FILENAME, true); $node->setValue($name); } public function getFileName() { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_FILENAME); return (($node == NULL) ? "" : $node->getValue()); } public function setSamplingTime($sampling) { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_SAMPLING, true); $node->setValue($sampling); } public function getSamplingTime() { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_SAMPLING); return (($node == NULL) ? "" : $node->getValue()); } public function setStructure($type) { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_STRUCTURE, true); $node->setValue($type); } public function getStructure() { $node = $this->getChildInstanceByName(REQUESTOUTPUTDOWNLOAD_STRUCTURE); return (($node == NULL) ? RequestOutputDownloadStructureEnum::UNKNOWN : $node->getValue()); } public function setPrecision($precision) { $this->setAttribute(REQUESTOUTPUTDOWNLOAD_PRECISION, $precision); } public function getPrecision() { return $this->getAttribute(REQUESTOUTPUTDOWNLOAD_PRECISION); } public function addParam($id, $indexes, $calib_infos) { $node = new RequestOutputDownloadParamNodeClass(); $node->setId($id); if (isset($indexes)) { foreach ($indexes as $index) $node->addIndex($index); } if (isset($calib_infos)) { foreach ($calib_infos as $calib_info) $node->addCalibInfo($calib_infos); } $this->addChild($node); } public function getParam($id) { $nodes = $this->getChildrenByName(REQUESTOUTPUTDOWNLOADPARAM_NAME); foreach ($nodes as $node) if ($node->getId() == $id) return $node; return NULL; } public function addPostProcessing($process) { $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME); if ($node == NULL) { $node = new RequestOutputPostProcessingNodeClass(); $this->addChild($node); } $node->addPostProcessing($process); } public function isPostProcessing($process) { $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME); if ($node == NULL) return false; return $node->isPostProcessing($process); } } ?>