RequestOutputPlotSerieTimeTicksNodeClass.php
3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_STEP", "step");
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_NUMBER", "number");
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_MINOR", "minor");
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR", "color");
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL", "symbol");
define ("REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL", "firstSymbol");
/**
* @class RequestOutputPlotSerieTimeTicksNodeClass
* @brief Definition of time ticks element for a serie of a plot
* @details
*/
class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
{
public function __construct($name)
{
parent::__construct($name);
}
public function isSymbolDefined()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
return isset($node);
}
public function getSymbol()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
if (!isset($node))
{
$node = new RequestOutputPlotSymbolNodeClass(REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
$this->addChild($node);
}
return $node;
}
public function isFirstSymbolDefined()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
return isset($node);
}
public function getFirstSymbol()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
if (!isset($node))
{
$node = new RequestOutputPlotSymbolNodeClass(REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
$this->addChild($node);
}
return $node;
}
public function isFontDefined()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
return isset($node);
}
public function getFont()
{
$node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
if (!isset($node))
{
$node = new RequestOutputPlotFontNodeClass();
$this->addChild($node);
}
return $node;
}
public function setStep($step)
{
$this->setAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_STEP, $step);
}
public function getStep()
{
return $this->getAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_STEP);
}
public function setNumber($number)
{
$this->setAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_NUMBER, $number);
}
public function getNumber()
{
return $this->getAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_NUMBER);
}
public function setMinor($minor)
{
$this->setAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_MINOR, $minor);
}
public function getMinor()
{
return $this->getAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_MINOR);
}
public function setColor($color)
{
$this->setAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR, $color);
}
public function getColor()
{
return $this->getAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR);
}
public function loadFromNode($xmlNode)
{
$symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
if (isset($symbolXmlNode))
$this->getSymbol()->loadFromNode($symbolXmlNode);
$firstsymbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
if (isset($firstsymbolXmlNode))
$this->getFirstSymbol()->loadFromNode($firstsymbolXmlNode);
$fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
if (isset($fontXmlNode))
$this->getFont()->loadFromNode($fontXmlNode);
$this->setStep($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_STEP));
$this->setNumber($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_NUMBER));
$this->setMinor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_MINOR));
$this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR));
}
}
?>