setAttribute(REQUESTOUTPUTSTATISTICFUNCTION_ID, $name); } } class RequestOutputStatisticParamNodeClass extends NodeClass { public function __construct() { parent::__construct(REQUESTOUTPUTSTATISTICPARAM_NAME); } public function setId($id) { $this->setAttribute(REQUESTOUTPUTSTATISTICPARAM_ID, $id); } public function getId() { return $this->getAttribute(REQUESTOUTPUTSTATISTICPARAM_ID); } public function addFunction($name) { $node = new RequestOutputStatisticFunctionNodeClass(); $this->addChild($node); $node->setFunctionName($name); } public function indexExist($index) { if ($this->getAttribute(REQUESTOUTPUTSTATISTICPARAM_INDEX) == $index) return true; return false; } public function setIndex($index) { if ($this->indexExist($index)) return; $this->setAttribute(REQUESTOUTPUTSTATISTICPARAM_INDEX, $index); } } /** * @class RequestOutputStatisticNodeClass * @brief Definition of a request data mining output node for AMDA_Kernel * @details */ class RequestOutputStatisticNodeClass extends NodeClass { public function __construct() { parent::__construct(REQUESTOUTPUTSTATISTIC_NAME); } public function setTimeFormat($timeFormat) { $node = $this->getChildInstanceByName(REQUESTOUTPUTSTATISTIC_TIMEFORMAT, true); $node->setValue($timeFormat); } public function setFileFormat($fileFormat) { $node = $this->getChildInstanceByName(REQUESTOUTPUTSTATISTIC_FILEFORMAT, true); $node->setValue($fileFormat); } public function setStructure($structure) { $node = $this->getChildInstanceByName(REQUESTOUTPUTSTATISTIC_STRUCTURE, true); $node->setValue($structure); } public function setFileName($fileName) { $node = $this->getChildInstanceByName(REQUESTOUTPUTSTATISTIC_FILENAME, true); $node->setValue($fileName); } public function addParam($id, $indexes) { $paramsNode = $this->getFirstChildByName(REQUESTPARAMS_NAME); if (!$paramsNode) { $paramsNode = new RequestParamsNodeClass(); $this->addChild($paramsNode); } $node = new RequestOutputStatisticParamNodeClass(); $paramsNode->addChild($node); $node->setId($id); if (isset($indexes)) { foreach ($indexes as $index) $node->setIndex($index); } return $node; } 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); } } ?>