setFormat(RequestOutputPlotPageFormatEnum::PNG); $this->setDimension(RequestOutputPlotPageDimensionEnum::ISO_A4); $this->setOrientation(RequestOutputPlotPageOrientationEnum::PORTRAIT); $this->setMode(RequestOutputPlotPageModeEnum::COLOR); } public function getTitle() { $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTPAGE_TITLE); if (!isset($node)) { $node = new RequestOutputPlotTitleNodeClass(); $this->addChild($node); } return $node; } public function getMargins() { $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTMARGINS_NAME); if (!isset($node)) { $node = new RequestOutputPlotMarginsNodeClass(); $this->addChild($node); } return $node; } public function getFont() { $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME); if (!isset($node)) { $node = new RequestOutputPlotFontNodeClass(); $this->addChild($node); } return $node; } public function getLayout() { $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTLAYOUT_NAME); if (!isset($node)) { $node = new RequestOutputPlotLayoutNodeClass(); $this->addChild($node); } return $node; } public function addPanel() { $node = new RequestOutputPlotPanelNodeClass(); $this->addChild($node); return $node; } public function getPanels() { return $this->getChildrenByName(REQUESTOUTPUTPLOTPANEL_NAME); } public function setFormat($format) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_FORMAT, $format); } public function getFormat() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_FORMAT); } public function setDimension($dimension) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DIMENSION, $dimension); } public function getDimension() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_DIMENSION); } public function setOrientation($orientation) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_ORIENTATION, $orientation); } public function getOrientation() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_ORIENTATION); } public function setMode($mode) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_MODE, $mode); } public function getMode() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_MODE); } public function setSuperposeMode($superposeMode) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_SUPERPOSEMODE, $superposeMode); } public function getSuperposeMode() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_SUPERPOSEMODE); } public function setDefaultTimePlotWidth($width) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTWIDTH, $width); } public function getDefaultTimePlotWidth() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTWIDTH); } public function setDefaultTimePlotHeight($height) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTHEIGHT, $height); } public function getDefaultTimePlotHeight() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTHEIGHT); } public function setDefaultXYPlotWidth($width) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTWIDTH, $width); } public function getDefaultXYPlotWidth() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTWIDTH); } public function setDefaultXYPlotHeight($height) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTHEIGHT, $height); } public function getDefaultXYPlotHeight() { return $this->getAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTHEIGHT); } public function setDefaultTimePlotXMargin($left, $right) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTXMARGIN, "[".$left.",".$right."]"); } public function setDefaultXYPlotXMargin($left, $right) { $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTXMARGIN, "[".$left.",".$right."]"); } public function loadFromNode($xmlNode) { $titleXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPAGE_TITLE); if (isset($titleXmlNode)) $this->getTitle()->loadFromNode($titleXmlNode); $marginsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTMARGINS_NAME); if (isset($marginsXmlNode)) $this->getMargins()->loadFromNode($marginsXmlNode); $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME); if (isset($fontXmlNode)) $this->getFont()->loadFromNode($fontXmlNode); $layoutXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTLAYOUT_NAME); if (isset($layoutXmlNode)) $this->getLayout()->loadFromNode($layoutXmlNode); foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTPANEL_NAME) as $panelXmlNode) { $this->addPanel()->loadFromNode($panelXmlNode); } $this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_FORMAT)); $this->setDimension($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DIMENSION)); $this->setOrientation($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_ORIENTATION)); $this->setMode($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_MODE)); $this->setSuperposeMode($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_SUPERPOSEMODE)); $this->setDefaultTimePlotWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTWIDTH)); $this->setDefaultTimePlotHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTHEIGHT)); $this->setDefaultXYPlotWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTWIDTH)); $this->setDefaultXYPlotHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTHEIGHT)); $this->setDefaultTimePlotXMargin($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTXMARGIN)); } } ?>