setAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_MIN, $min); $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_MAX, $max); } public function getMin() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_MIN); } public function getMax() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_MAX); } public function setExtend($extend) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_EXTEND, $extend); } public function getExtend() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_EXTEND); } public function loadFromNode($xmlNode) { $this->setMinMax($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_MIN), $this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_MAX)); $this->setExtend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_EXTEND)); } } /** * @class RequestOutputPlotAxisElementTickClass * @brief Definition of ticks for an axis * @details */ class RequestOutputPlotAxisElementTickClass extends NodeClass { public function __construct() { parent::__construct(REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME); } public function setPosition($position) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION, $position); } public function getPosition() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION); } public function setMinorGrid($minorGrid) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID, $minorGrid); } public function getMinorGrid() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID); } public function setMajorGrid($majorGrid) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID, $majorGrid); } public function getMajorGrid() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID); } public function loadFromNode($xmlNode) { $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION)); $this->setMinorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID)); $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID)); } } /** * @class RequestOutputPlotAxisElementLegendNodeClass * @brief Definition of legend for an axis * @details */ class RequestOutputPlotAxisElementLegendNodeClass extends RequestOutputPlotLabelNodeClass { public function __construct() { parent::__construct(REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME); } public function setText($text) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT, $text); } public function getText() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT); } public function loadFromNode($xmlNode) { $this->setText($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT)); parent::loadFromNode($xmlNode); } } /** * @class RequestOutputPlotAxisElementNodeClass * @brief Definition of a plot axis element for a plot element of a plot request * @details */ class RequestOutputPlotAxisElementNodeClass extends NodeClass { public function __construct($axisElementName) { parent::__construct($axisElementName); //create axis element skeleton //range $node = new RequestOutputPlotAxisElementRangeNodeClass(); $this->addChild($node); //tick $node = new RequestOutputPlotAxisElementTickClass(); $this->addChild($node); //legend $node = new RequestOutputPlotAxisElementLegendNodeClass(); $this->addChild($node); } public function getRange() { return $this->getFirstChildByName(REQUESTOUTPUTPLOTAXISELEMENTRANGE_NAME); } public function getTick() { return $this->getFirstChildByName(REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME); } public function getLegend() { return $this->getFirstChildByName(REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME); } public function addConstant() { $node = new RequestOutputPlotConstantNodeClass(); $this->addChild($node); return $node; } /* ToDo origin */ public function setPosition($position) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_POSITION, $position); } public function getPosition() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_POSITION); } public function setThickness($thickness) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_THICKNESS, $thickness); } public function getThickness() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_THICKNESS); } public function setColor($color) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_COLOR, $color); } public function getColor() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_COLOR); } public function setReverse($reverse) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_REVERSE, $reverse); } public function getReverse() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_REVERSE); } public function setVisible($visible) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_VISIBLE, $visible); } public function getVisible() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_VISIBLE); } public function setScale($scale) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_SCALE, $scale); } public function getScale() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_SCALE); } public function setShowLegend($show) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_SHOWLEGEND, $show); } public function getShowLegend() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_SHOWLEGEND); } public function setShowTickMarks($show) { $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENT_TICKMARKS, $show); } public function getShowTickMarks() { return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_TICKMARKS); } public function loadFromNode($xmlNode) { $rangeXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_NAME); if (isset($rangeXmlNode)) $this->getRange()->loadFromNode($rangeXmlNode); $tickXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME); if (isset($tickXmlNode)) $this->getTick()->loadFromNode($tickXmlNode); $legendXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME); if (isset($legendXmlNode)) $this->getLegend()->loadFromNode($legendXmlNode); foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTCONSTANT_NAME) as $constantXmlNode) { $this->addConstant()->loadFromNode($clbXmlNode); } $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_POSITION)); $this->setThickness($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_THICKNESS)); $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_COLOR)); $this->setReverse($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_REVERSE)); $this->setVisible($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_VISIBLE)); $this->setScale($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_SCALE)); $this->setShowLegend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_SHOWLEGEND)); $this->setShowTickMarks($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_TICKMARKS)); } } ?>