getChildInstanceByName(REQUESTTIMEINTERVAL_START, true); $startNode->setValue($start); $durationNode = $this->getChildInstanceByName(REQUESTTIMEINTERVAL_DURATION, true); $durationNode->setValue($duration); } public function getStart() { $startNode = $this->getChildInstanceByName(REQUESTTIMEINTERVAL_START); if ($startNode == NULL) return ""; return $startNode->getValue(); } public function getDuration() { $durationNode = $this->getChildInstanceByName(REQUESTTIMEINTERVAL_DURATION); if ($durationNode == NULL) return ""; return $durationNode->getValue(); } } define ("REQUESTTIMETABLE_NAME", "timetable"); define ("REQUESTTIMETABLE_ID", "id"); /** * @class RequestTimesTimeTableNodeClass * @brief Definition of a request time table node for AMDA_Kernel * @details */ class RequestTimesTimeTableNodeClass extends NodeClass { public function __construct() { parent::__construct(REQUESTTIMETABLE_NAME); } public function setId($id) { $this->setAttribute(REQUESTTIMETABLE_ID, $id); } public function getId() { return $this->getAttribute(REQUESTTIMETABLE_ID); } } define ("REQUESTTIMES_NAME", "times"); /** * @class RequestTimesNodeClass * @brief Definition of a request times node for AMDA_Kernel * @details */ class RequestTimesNodeClass extends NodeClass { public function __construct() { parent::__construct(REQUESTTIMES_NAME); } public function addInterval($start, $duration) { $interval = new RequestTimesIntervalNodeClass(); $interval->setInterval($start, $duration); $this->addChild($interval); } public function getIntervals() { return $this->getChildrenByName(REQUESTTIMEINTERVAL_NAME); } public function addTimeTable($id) { $timeTable = new RequestTimesTimeTableNodeClass(); $timeTable->setId($id); $this->addChild($timeTable); } public function getTimeTables() { return $this->getChildrenByName(REQUESTTIMETABLE_NAME); } } ?>