Blame view

src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotBaseSerieNodeClass.php 5.87 KB
26a23052   Benjamin Renard   Add Interval Tick...
1
2
<?php

966bd5f8   Benjamin Renard   Add request to ge...
3
4
5
6
7
require_once "RequestOutputPlotLineNodeClass.php";
require_once "RequestOutputPlotSymbolNodeClass.php";
require_once "RequestOutputPlotSerieTimeTicksNodeClass.php";
require_once "RequestOutputPlotSerieIntervalTicksNodeClass.php";

26a23052   Benjamin Renard   Add Interval Tick...
8
define ("REQUESTOUTPUTPLOTBASESERIE_XAXIS", "xAxis");
f822811a   Benjamin Renard   Implements multi ...
9
define ("REQUESTOUTPUTPLOTBASESERIE_YAXIS", "yAxis");
cbe089e7   Hacene SI HADJ MOHAND   seems ok for spectro
10
define ("REQUESTOUTPUTPLOTBASESERIE_RESOLUTION", "resolution");
26a23052   Benjamin Renard   Add Interval Tick...
11
define ("REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID", "colorSerieId");
4f9a8e36   Benjamin Renard   Min/Max value def...
12
13
define ("REQUESTOUTPUTPLOTBASESERIE_MIN", "min");
define ("REQUESTOUTPUTPLOTBASESERIE_MAX", "max");
26a23052   Benjamin Renard   Add Interval Tick...
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
define ("REQUESTOUTPUTPLOTBASESERIE_LINE", "line");
define ("REQUESTOUTPUTPLOTBASESERIE_SYMBOL", "symbol");
define ("REQUESTOUTPUTPLOTBASESERIE_TIMETICKS", "timeTick");
define ("REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS", "intervalTick");
define ("REQUESTOUTPUTPLOTBASESERIE_ID", "id");

/**
 * @class RequestOutputPlotBaseSerieNodeClass
 * @brief Definition of a base serie for a plot of a plot request
 * @details
*/
class RequestOutputPlotBaseSerieNodeClass extends NodeClass
{
	public function __construct($name)
	{
		parent::__construct($name);
	}

cb46dfbf   Benjamin Renard   Fix orbit serie a...
32
	public function setXAxisId($axisId)
26a23052   Benjamin Renard   Add Interval Tick...
33
	{
cb46dfbf   Benjamin Renard   Fix orbit serie a...
34
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS, $axisId);
26a23052   Benjamin Renard   Add Interval Tick...
35
36
	}

cb46dfbf   Benjamin Renard   Fix orbit serie a...
37
	public function getXAxisId()
26a23052   Benjamin Renard   Add Interval Tick...
38
	{
cb46dfbf   Benjamin Renard   Fix orbit serie a...
39
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS);
26a23052   Benjamin Renard   Add Interval Tick...
40
	}
cb46dfbf   Benjamin Renard   Fix orbit serie a...
41
42

	public function setYAxisId($axisId)
26a23052   Benjamin Renard   Add Interval Tick...
43
	{
cb46dfbf   Benjamin Renard   Fix orbit serie a...
44
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS, $axisId);
26a23052   Benjamin Renard   Add Interval Tick...
45
	}
cb46dfbf   Benjamin Renard   Fix orbit serie a...
46
47

	public function getYAxisId()
26a23052   Benjamin Renard   Add Interval Tick...
48
	{
cb46dfbf   Benjamin Renard   Fix orbit serie a...
49
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS);
26a23052   Benjamin Renard   Add Interval Tick...
50
51
	}
	
5e8f0c52   Hacene SI HADJ MOHAND   ppp ok
52
53
54
55
56
57
58
59
60
61
	public function setResolution($resolution)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_RESOLUTION, $resolution);
	}

	public function getResolution()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_RESOLUTION);
	}

26a23052   Benjamin Renard   Add Interval Tick...
62
63
64
65
66
67
68
69
70
71
	public function setColorSerieId($colorSerieId)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID, $colorSerieId);
	}
	
	public function getColorSerieId()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID);
	}
	
4f9a8e36   Benjamin Renard   Min/Max value def...
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
	public function setMin($min)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_MIN, $min);
	}
	
	public function getMin()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_MIN);
	}
	
	public function setMax($max)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_MAX, $max);
	}
	
	public function getMax()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_MAX);
	}
	
966bd5f8   Benjamin Renard   Add request to ge...
92
93
94
95
96
97
	public function isLineDefined()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_LINE);
		return isset($node);
	}
	
26a23052   Benjamin Renard   Add Interval Tick...
98
99
100
101
102
103
104
105
106
107
108
109
110
	public function getLine()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_LINE);
	
		if (!isset($node))
		{
			$node = new RequestOutputPlotLineNodeClass(REQUESTOUTPUTPLOTBASESERIE_LINE);
			$this->addChild($node);
		}
	
		return $node;
	}
	
966bd5f8   Benjamin Renard   Add request to ge...
111
112
113
114
115
116
	public function isSymbolDefined()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
		return isset($node);
	}
	
26a23052   Benjamin Renard   Add Interval Tick...
117
118
119
120
121
122
123
124
125
126
127
128
129
	public function getSymbol()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
		
		if (!isset($node))
		{
			$node = new RequestOutputPlotSymbolNodeClass(REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
			$this->addChild($node);
		}
		
		return $node;
	}
	
966bd5f8   Benjamin Renard   Add request to ge...
130
131
132
133
134
135
	public function isTimeTicksDefined()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
		return isset($node);
	}
	
26a23052   Benjamin Renard   Add Interval Tick...
136
137
138
139
140
141
142
143
144
145
146
147
148
	public function getTimeTicks()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
	
		if (!isset($node))
		{
			$node = new RequestOutputPlotSerieTimeTicksNodeClass(REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
			$this->addChild($node);
		}
	
		return $node;
	}
	
966bd5f8   Benjamin Renard   Add request to ge...
149
150
151
152
153
154
	public function isIntervalTicksDefined()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
		return isset($node);
	}
	
26a23052   Benjamin Renard   Add Interval Tick...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
	public function getIntervalTicks()
	{
		$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
	
		if (!isset($node))
		{
			$node = new RequestOutputPlotSerieIntervalTicksNodeClass(REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
			$this->addChild($node);
		}
	
		return $node;
	}
	
	public function setId($id)
	{
		$this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_ID, $id);
	}
	
	public function getId()
	{
		return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_ID);
	}
966bd5f8   Benjamin Renard   Add request to ge...
177
178
179
180
181
182
183
184
	
	public function loadFromNode($xmlNode)
	{
		$this->setYAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_YAXIS));
		$this->setXAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_XAXIS));
		$this->setColorSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID));
		$this->setMin($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_MIN));
		$this->setMax($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_MAX));
5e8f0c52   Hacene SI HADJ MOHAND   ppp ok
185
		$this->setResolution($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_RESOLUTION));
966bd5f8   Benjamin Renard   Add request to ge...
186
		
5e8f0c52   Hacene SI HADJ MOHAND   ppp ok
187
                $lineXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_LINE);
966bd5f8   Benjamin Renard   Add request to ge...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
		if (isset($lineXmlNode))
			$this->getLine()->loadFromNode($lineXmlNode);
		
		$symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
		if (isset($symbolXmlNode)) {
			$this->getSymbol()->loadFromNode($symbolXmlNode);
		}		
		$timeTicksXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
		if (isset($timeTicksXmlNode))
			$this->getTimeTicks()->loadFromNode($timeTicksXmlNode);
		
		$intervalTicksXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
		if (isset($intervalTicksXmlNode))
			$this->getIntervalTicks()->loadFromNode($intervalTicksXmlNode);
		
		$this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_ID));
	}
26a23052   Benjamin Renard   Add Interval Tick...
205
206
}

f822811a   Benjamin Renard   Implements multi ...
207
?>