RequestOutputPlotElementNodeClass.php 2.1 KB
<?php

require_once("RequestOutputPlotLegendsNodeClass.php");
require_once("RequestOutputPlotParamsNodeClass.php");
require_once("RequestOutputPlotAxesNodeClass.php");
//require_once("RequestOutputPlotAdditionalObjectsNodeClass.php");
//require_once("RequestOutputPlotFillsNodeClass.php");

define ("REQUESTOUTPUTPLOTLEGENDS_NAME", "legends");

/**
 * @class RequestOutputPlotElementNodeClass
 * @brief Definition of a plot element for a panel of a plot request
 * @details
*/
class RequestOutputPlotElementNodeClass extends NodeClass
{
	public function __construct($plotElementName, $defineLegends, $defineAdditionalObjects, $defineFills, $noXAxis, $noYAxis, $noZAxis)
	{
		parent::__construct($plotElementName);
		//create plot element skeleton

		if ($defineLegends)
		{
			$node = new RequestOutputPlotLegendsNodeClass(REQUESTOUTPUTPLOTLEGENDS_NAME);
			$this->addChild($node);
		}

		//params
		$node = new RequestOutputPlotParamsNodeClass();
		$this->addChild($node);

		//axes
		if (!$noXAxis || !$noYAxis || !$noZAxis)
		{
			$node = new RequestOutputPlotAxesNodeClass($noXAxis, $noYAxis, $noZAxis);
			$this->addChild($node);
		}
			
		//ToDo additional objects
		/*if ($defineAdditionalObjects)
		 {
		$node = new RequestOutputPlotAdditionalObjectsNodeClass();
		$this->addChild($node);
		}*/

		//ToDo fills
		/*if ($defineFills)
		 {
		$node = new RequestOutputPlotFillsNodeClass();
		$this->addChild($node);
		}*/
	}

	public function getLegends()
	{
		$node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTLEGENDS_NAME);
		return $node;
	}

	public function getParams()
	{
		$node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTPARAMS_NAME);
		return $node;
	}

	public function getAxes()
	{
		$node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTAXES_NAME);
		return $node;
	}

	public function getAdditionalObjects()
	{
		$node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTADDITIONALOBJECTS_NAME);
		return $node;
	}

	public function getFills()
	{
		$node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTFILLS_NAME);
		return $node;
	}
}

?>