setAttribute(PARAM_ID, $id); } public function setSampling($sampling) { $node = $this->getChildInstanceByName(PARAM_SAMPLING,true); $node->setValue($sampling); } public function setGap($gap) { $node = $this->getChildInstanceByName(PARAM_GAP,true); $node->setValue($gap); } public function getInfo() { $infoNode = $this->getChildInstanceByName(INFOPARAM_TAGNAME, false); if ($infoNode) return $infoNode; $infoNode = new InfoParamNodeClass(); $this->addChild($infoNode); return $infoNode; } public function addClbManual($name) { $clbManualNode = new ParamClbManualNodeClass(); $clbManualNode->setClbName($name); $this->addChildBefore($clbManualNode, PARAM_GET); return $clbManualNode; } public function addParamGet($type) { $node = $this->getChildInstanceByName(PARAM_GET, true); switch ($type) { case ParamGetTypeEnum::AMDAPARAM : $paramGet = new ParamGetAmdaParamNodeClass(); break; case ParamGetTypeEnum::DDBASE : $paramGet = new ParamGetDDBaseNodeClass(); break; case ParamGetTypeEnum::LOCALBASE : $paramGet = new ParamGetLocalBaseNodeClass(); break; default : throw new Exception('Param get node not implemented'); } $node->addChild($paramGet); return $paramGet; } public function getParamGet() { $getNode = $this->getChildInstanceByName(PARAM_GET, false); if (!$getNode) return NULL; if (count($getNode->getChildren()) > 0) return $getNode->getChildren()[0]; return NULL; } public function setProcess($process) { $node = $this->getChildInstanceByName(PARAM_PROCESS, true); $node->setValue($process); } public function setOutput() { $node = $this->getChildInstanceByName(PARAM_OUTPUT, true); } } ?>