Commit 966bd5f8caf44e524378e272996f06ea0e015e57

Authored by Benjamin Renard
1 parent d3c3608d

Add request to get initial plot options for a parameter

Showing 72 changed files with 1919 additions and 66 deletions   Show diff stats
src/InputOutput/IHMImpl/IHMInputOutputClass.php
... ... @@ -88,6 +88,9 @@ class IHMInputOutputClass implements InputOutputInterface
88 88 case FunctionTypeEnumClass::TTUNION :
89 89 $this->inputOutput = new IHMInputOutputUnionTTClass();
90 90 break;*/
  91 + case FunctionTypeEnumClass::PARAMINFO :
  92 + $this->inputOutput = new IHMInputOutputParamInfoClass();
  93 + break;
91 94 default :
92 95 throw new Exception('Request type '.$function.' not implemented for this client.');
93 96 }
... ...
src/InputOutput/IHMImpl/ParamInfo/IHMInputOutputParamInfoClass.php 0 → 100644
... ... @@ -0,0 +1,349 @@
  1 +<?php
  2 +
  3 +/**
  4 + * @class IHMInputOutputParamInfoClass
  5 + * @brief Class that's implement an InputOutputInterface used to treat a get param info request
  6 + * @details
  7 + */
  8 +class IHMInputOutputParamInfoClass implements InputOutputInterface
  9 +{
  10 + private $paramInfoData = null;
  11 +
  12 + /*
  13 + * @brief Constructor
  14 + */
  15 + function __construct()
  16 + {
  17 + }
  18 +
  19 + /*
  20 + * @brief translate input data from IHM client to AMDA_Integration module for a get param info request
  21 + */
  22 + public function getInputData($input,$function,$requestId="")
  23 + {
  24 + $this->paramInfoData = new ParamInfoRequestDataClass();
  25 +
  26 + switch ($input->type) {
  27 + case 'plot_init' :
  28 + $this->paramInfoData->setType(ParamInfoTypeEnumClass::PLOTINIT);
  29 + break;
  30 + default :
  31 + throw new Exception("Para info request type '".$input->type."' not yet implemented");
  32 + }
  33 + if (!isset($input->paramId) || empty($input->paramId))
  34 + throw new Exception("Param info request need a param id as argument");
  35 + $paramFilePath = IHMConfigClass::getLocalParamDBPath().$input->paramId.".xml";
  36 +
  37 + if (!file_exists($paramFilePath))
  38 + throw new Exception("Cannot find parameter definition file");
  39 +
  40 + $this->paramInfoData->setParamId($input->paramId);
  41 + $this->paramInfoData->setParamPath($paramFilePath);
  42 +
  43 + return $this->paramInfoData;
  44 + }
  45 +
  46 + /*
  47 + * @brief translate output data from AMDA_Integration module to IHM client for a get param info request
  48 + */
  49 + public function getOutput($data)
  50 + {
  51 + $result = array("success" => false, "message" => "Cannot load plot init");
  52 +
  53 + switch ($data->getType()) {
  54 + case ParamInfoTypeEnumClass::PLOTINIT :
  55 + if (($data->getResultNode() != NULL) && ($data->getResultNode()->getName() == "plot") && (count($data->getResultNode()->getChildren()) >= 1)) {
  56 + $result_data = array();
  57 +
  58 + $panelNode = $data->getResultNode()->getChildren()[0];
  59 +
  60 + $plotNode = NULL;
  61 + if (count($panelNode->getChildren()) >= 1) {
  62 + foreach ($panelNode->getChildren() as $crtNode) {
  63 + if (!in_array($crtNode->getName(), array('timePlot', 'epochPlot', 'xyPlot', 'instantPlot', 'statusPlot', 'tickPlot')))
  64 + continue;
  65 + $plotNode = $crtNode;
  66 + break;
  67 + }
  68 +
  69 + if (isset($plotNode)) {
  70 + $result_data['panel'] = array();
  71 + switch ($plotNode->getName()) {
  72 + case 'timePlot' :
  73 + $result_data['panel']['plotType'] = 'timePlot';
  74 +
  75 + break;
  76 + case 'epochPlot' :
  77 + $result_data['panel']['plotType'] = 'epochPlot';
  78 +
  79 + break;
  80 + case 'xyPlot' :
  81 + $result_data['panel']['plotType'] = 'xyPlot';
  82 + $result_data['panel']['isotropic'] = ($plotNode->getIsIsotropic() == "true");
  83 + $result_data['additionalObjects'] = $this->unmarshallAdditionalObjectsData($plotNode);
  84 + break;
  85 + case 'instantPlot' :
  86 + $result_data['panel']['plotType'] = 'instantPlot';
  87 +
  88 + break;
  89 + case 'statusPlot' :
  90 + $result_data['panel']['plotType'] = 'statusPlot';
  91 +
  92 + break;
  93 + case 'tickPlot' :
  94 + $result_data['panel']['plotType'] = 'tickPlot';
  95 +
  96 + break;
  97 + }
  98 +
  99 + $result_data['draw'] = $this->unmarshallDrawData($plotNode, $data->getParamId());
  100 + }
  101 +
  102 + $result = array(
  103 + "success" => true,
  104 + "data" => $result_data
  105 + );
  106 + //var_dump($result);
  107 + }
  108 +
  109 + /*if (count($paramsNode->getChildren()) >= 1) {
  110 + $paramNode = $paramsNode->getChildren()[0];
  111 + if (count($paramNode->getChildren()) >= 1) {
  112 + $drawNode = $paramNode->getChildren()[0];
  113 +
  114 +
  115 + switch ($drawNode->getName()) {
  116 + case 'serie' :
  117 + $data['drawType'] = 'serie';
  118 + break;
  119 + case 'orbitserie' :
  120 + $data['drawType'] = 'orbit-serie';
  121 + break;
  122 + }
  123 +
  124 + $result = array(
  125 + "success" => true,
  126 + "data" => $data
  127 + );
  128 + }
  129 + }*/
  130 + }
  131 + break;
  132 + default:
  133 + //Nothing ToDo
  134 + }
  135 +
  136 + return $result;
  137 + }
  138 +
  139 + private function unmarshallDrawData($plotNode, $paramId) {
  140 + $result_data = array();
  141 +
  142 + if (!isset($plotNode))
  143 + return $result_data;
  144 +
  145 + $paramsNode = $plotNode->getParams();
  146 +
  147 + if (!isset($paramsNode))
  148 + return $result_data;
  149 +
  150 + $paramNode = $paramsNode->getParamById($paramId);
  151 +
  152 + if (!isset($paramNode) || (count($paramNode->getChildren()) < 1))
  153 + return $result_data;
  154 +
  155 + $mainDrawNode = NULL;
  156 + $otherDrawNodes = array();
  157 +
  158 + foreach ($paramNode->getChildren() as $crtDrawNode) {
  159 + if (in_array($crtDrawNode->getName(), array('serie', 'spectro', 'yserie', 'orbitserie')))
  160 + $mainDrawNode = $crtDrawNode;
  161 + else
  162 + $otherDrawNodes[$mainDrawNode->getName()] = $crtDrawNode;
  163 + }
  164 +
  165 + if (!isset($mainDrawNode))
  166 + return $result_data;
  167 +
  168 + switch ($mainDrawNode->getName()) {
  169 + case 'serie' :
  170 + $result_data['type'] = 'serie';
  171 + $this->unmarshallBaseSerieData($mainDrawNode, $result_data);
  172 + //if (array_key_exists('colorserie', $otherDrawNodes))
  173 + // $this->unmarshallColorSerieData($mainDrawNode, $result_data);
  174 + break;
  175 + case 'spectro' :
  176 + $result_data['type'] = 'spectro';
  177 + $this->unmarshallSpectroData($mainDrawNode, $result_data);
  178 + break;
  179 + case 'yserie' :
  180 + if (!array_key_exists('xserie', $otherDrawNodes))
  181 + return $result_data;
  182 + $this->unmarshallBaseSerieData($mainDrawNode, $result_data);
  183 + //$this->unmarshallXSerieData($mainDrawNode, $result_data);
  184 + //if (array_key_exists('colorserie', $otherDrawNodes))
  185 + // $this->unmarshallColorSerieData($mainDrawNode, $result_data);
  186 + break;
  187 + case 'orbitserie' :
  188 + $result_data['type'] = 'orbit-serie';
  189 + $result_data['serie-projection'] = $mainDrawNode->getProjection();
  190 + $this->unmarshallBaseSerieData($mainDrawNode, $result_data);
  191 + //if (array_key_exists('colorserie', $otherDrawNodes))
  192 + // $this->unmarshallColorSerieData($mainDrawNode, $result_data);
  193 + break;
  194 + default :
  195 + return $result_data;
  196 + }
  197 +
  198 + return $result_data;
  199 + }
  200 +
  201 + private function unmarshallSpectroData($drawNode, &$result_array) {
  202 + if (!isset($drawNode))
  203 + return;
  204 +
  205 + if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS)))
  206 + $result_array['spectro-yaxis'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS);
  207 +
  208 + if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN)))
  209 + $result_array['spectro-value-min'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN);
  210 +
  211 + if (!empty($drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX)))
  212 + $result_array['spectro-value-max'] = $drawNode->getAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX);
  213 + }
  214 +
  215 + private function unmarshallAdditionalObjectsData($plotNode) {
  216 + $result_data = array();
  217 +
  218 + if (!isset($plotNode))
  219 + return $result_data;
  220 +
  221 + $additionalObjectsNode = $plotNode->getAdditionalObjects();
  222 +
  223 + //curvePlot
  224 + $result_data['curves'] = array();
  225 + $curveObjectsNode = $additionalObjectsNode->getCurveObjects();
  226 + foreach ($curveObjectsNode as $curveNode) {
  227 + $crt_curve_data = array();
  228 + $crt_curve_data['curve-serie-id'] = $curveNode->getSerieId();
  229 + $this->unmarshallLineData($curveNode, "curve-line-", $crt_curve_data);
  230 +
  231 + if ($curveNode->isFunctionDefined()) {
  232 + $crt_curve_data['curve-name'] = $curveNode->getFunction()->getFunctionName();
  233 + $crt_curve_data['curve-attributes'] = array();
  234 +
  235 + foreach ($curveNode->getFunction()->getAttributes()->getChildren() as $attributeNode) {
  236 + $crt_attribute_data = array();
  237 +
  238 + $crt_attribute_data['curve-param-name'] = $attributeNode->getAttribute(REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTENAME);
  239 + $crt_attribute_data['curve-param-value'] = $attributeNode->getAttribute(REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTEVALUE);
  240 +
  241 + $crt_curve_data['curve-attributes'][] = $crt_attribute_data;
  242 + }
  243 +
  244 + }
  245 +
  246 + $result_data['curves'][] = $crt_curve_data;
  247 + }
  248 +
  249 + return $result_data;
  250 + }
  251 +
  252 + private function unmarshallBaseSerieData($drawNode, &$result_array) {
  253 + if (!isset($drawNode))
  254 + return;
  255 +
  256 + $result_array['serie-id'] = $drawNode->getId();
  257 +
  258 + $result_array['serie-yaxis'] = $drawNode->getYAxisId();
  259 +
  260 + if ($drawNode->isLineDefined()) {
  261 + $result_array['serie-lines-activated'] = true;
  262 + $this->unmarshallLineData($drawNode->getLine(), "serie-lines-", $result_array);
  263 + }
  264 +
  265 + if ($drawNode->isSymbolDefined()) {
  266 + $result_array['serie-symbols-activated'] = true;
  267 + $this->unmarshallSymbolData($drawNode->getSymbol(), "serie-symbols-", $result_array);
  268 + }
  269 +
  270 + if (!empty($drawNode->getColorSerieId())) {
  271 + //ToDo
  272 + }
  273 +
  274 + if ($drawNode->isTimeTicksDefined()) {
  275 + $result_array['serie-timetick-activated'] = true;
  276 +
  277 + $result_array['serie-timetick-step'] = $drawNode->getTimeTicks()->getStep();
  278 + $result_array['serie-timetick-nbmajor'] = $drawNode->getTimeTicks()->getNumber();
  279 + $result_array['serie-timetick-nbminor'] = $drawNode->getTimeTicks()->getMinor();
  280 + $result_array['serie-timetick-color'] = $this->toHexColor($drawNode->getTimeTicks()->getColor());
  281 +
  282 + if (!empty($result_array['serie-timetick-nbmajor']) && intval($result_array['serie-timetick-nbmajor']) > 0)
  283 + $result_array['serie-timetick-type'] = 'nb-major';
  284 + else if (!empty($result_array['serie-timetick-step']) && intval($result_array['serie-timetick-step']) > 0)
  285 + $result_array['serie-timetick-type'] = 'time-step';
  286 + else
  287 + $result_array['serie-timetick-type'] = 'auto';
  288 +
  289 + if ($drawNode->getTimeTicks()->isSymbolDefined()) {
  290 + $this->unmarshallSymbolData($drawNode->getTimeTicks()->getSymbol(), "serie-timetick-symbols-", $result_array);
  291 + }
  292 +
  293 + if ($drawNode->getTimeTicks()->isFirstSymbolDefined()) {
  294 + $result_array['serie-timetick-firstsymbols-activated'] = true;
  295 + $this->unmarshallSymbolData($drawNode->getTimeTicks()->getFirstSymbol(), "serie-timetick-firstsymbols-", $result_array);
  296 + }
  297 +
  298 + if ($drawNode->getTimeTicks()->isFontDefined()) {
  299 + $result_array['serie-timetick-font-activated'] = true;
  300 + $this->unmarshallFontData($drawNode->getTimeTicks()->getFont(), "serie-timetick-font-", $result_array);
  301 + }
  302 + }
  303 +
  304 + if ($drawNode->isIntervalTicksDefined()) {
  305 + $result_array['serie-intervaltick-activated'] = true;
  306 +
  307 + $result_array['serie-intervaltick-mode'] = $drawNode->getIntervalTicks()->getMode();
  308 + $result_array['serie-intervaltick-color'] = $this->toHexColor($drawNode->getIntervalTicks()->getColor());
  309 +
  310 + if ($drawNode->getIntervalTicks()->isSymbolDefined()) {
  311 + $this->unmarshallSymbolData($drawNode->getIntervalTicks()->getSymbol(), "serie-intervaltick-", $result_array);
  312 + }
  313 +
  314 + if ($drawNode->getIntervalTicks()->isFontDefined()) {
  315 + $result_array['serie-intervaltick-font-activated'] = true;
  316 + $this->unmarshallFontData($drawNode->getIntervalTicks()->getFont(), "serie-intervaltick-font-", $result_array);
  317 + }
  318 + }
  319 + }
  320 +
  321 + private function unmarshallLineData($lineNode, $prefix, &$result_array) {
  322 + $result_array[$prefix.'style'] = $lineNode->getStyle();
  323 + $result_array[$prefix.'width'] = $lineNode->getWidth();
  324 + $result_array[$prefix.'color'] = $this->toHexColor($lineNode->getColor());
  325 + }
  326 +
  327 + private function unmarshallSymbolData($symbolNode, $prefix, &$result_array) {
  328 + $result_array[$prefix.'type'] = $symbolNode->getType();
  329 + $result_array[$prefix.'size'] = $symbolNode->getSize();
  330 + $result_array[$prefix.'color'] = $this->toHexColor($symbolNode->getColor());
  331 + }
  332 +
  333 + private function unmarshallFontData($fontNode, $prefix, &$result_array) {
  334 + $result_array[$prefix.'name'] = $fontNode->getFontName();
  335 + $result_array[$prefix.'size'] = $fontNode->getSize();
  336 + $result_array[$prefix.'bold'] = ($fontNode->getWeight() == RequestOutputPlotFontWeight::BOLD);
  337 + $result_array[$prefix.'italic'] = ($fontNode->getStyle() == RequestOutputPlotFontStyle::ITALIC);
  338 + }
  339 +
  340 + private function toHexColor($color) {
  341 + $temp = str_replace(array('[', ']', ' '), '', $color);
  342 + $arr = explode(',', $temp);
  343 + if (count ($arr) != 3)
  344 + return '#000000';
  345 + return '#'.sprintf('%02x', $arr[0]).sprintf('%02x', $arr[1]).sprintf('%02x', $arr[2]);
  346 + }
  347 +}
  348 +
  349 +?>
0 350 \ No newline at end of file
... ...
src/Request/ParamInfoRequestClass.php 0 → 100644
... ... @@ -0,0 +1,73 @@
  1 +<?php
  2 +/**
  3 + * @class ParamInfoRequestClass
  4 + * @brief Implementation of a ParamInfoRequestClass for a param info request
  5 + * @details
  6 + */
  7 +class ParamInfoRequestClass extends RequestAbstractClass
  8 +{
  9 + /*
  10 + * @brief Init a param info request
  11 + */
  12 + public function init()
  13 + {
  14 + if (!isset($this->requestData))
  15 + return false;
  16 +
  17 + //Force load of node files to init the NodeFactory
  18 + foreach (glob(dirname(__FILE__)."/ParamsRequestImpl/Nodes/Requests/*NodeClass.php") as $filename) {
  19 + require_once $filename;
  20 + }
  21 +
  22 + return TRUE;
  23 + }
  24 +
  25 + /*
  26 + * @brief Run a param info request
  27 + */
  28 + public function run()
  29 + {
  30 + $dom = new DOMDocument("1.0","UTF-8");
  31 + $dom->preserveWhiteSpace = false;
  32 + $dom->formatOutput = true;
  33 + $res = $dom->load($this->requestData->getParamPath());
  34 +
  35 + $this->requestData->setSuccess(false);
  36 +
  37 + if (!$res) {
  38 + $this->requestData->setLastErrorMessage("Cannot load parameter file");
  39 + return false;
  40 + }
  41 +
  42 + $paramNode = new ParamNodeClass();
  43 +
  44 + try {
  45 + $paramNode->loadFromNode($dom->documentElement);
  46 + } catch (Exception $e) {
  47 + $this->requestData->setLastErrorMessage("Error to parse parameter file : Exception detected : ".$e->getMessage());
  48 + return false;
  49 + }
  50 +
  51 + switch ($this->requestData->getType()) {
  52 + case ParamInfoTypeEnumClass::PLOTINIT :
  53 + $outputNode = $paramNode->getOutput();
  54 + if (!isset($outputNode)) {
  55 + $this->requestData->setLastErrorMessage("Cannot parse output node");
  56 + return false;
  57 + }
  58 + $plotNode = $outputNode->getChildInstanceByName("plot");
  59 + if (!isset($plotNode)) {
  60 + $this->requestData->setLastErrorMessage("Cannot parse plot node");
  61 + return false;
  62 + }
  63 + $this->requestData->setResultNode($plotNode);
  64 + $this->requestData->setSuccess(true);
  65 + break;
  66 + default :
  67 + $this->requestData->setLastErrorMessage("Unknown param info request");
  68 + }
  69 +
  70 + return $this->requestData->getSuccess();
  71 + }
  72 +}
  73 +?>
0 74 \ No newline at end of file
... ...
src/Request/ParamInfoRequestDataClass.php 0 → 100644
... ... @@ -0,0 +1,67 @@
  1 +<?php
  2 +
  3 +/**
  4 + * @class ParamInfoTypeEnumClass
  5 + * @brief Enumerate for param info request type
  6 + * @details
  7 + */
  8 +abstract class ParamInfoTypeEnumClass
  9 +{
  10 + const UNKNOWN = "";
  11 + const PLOTINIT = "plot_init";
  12 +}
  13 +
  14 +/**
  15 + * @class ParamInfoRequestDataClass
  16 + * @brief Data for a param info request
  17 + * @details
  18 + */
  19 +class ParamInfoRequestDataClass extends RequestDataClass
  20 +{
  21 + private $paramPath = "";
  22 + private $paramId = "";
  23 + private $type = ParamInfoTypeEnumClass::UNKNOWN;
  24 + private $resultNode = NULL;
  25 +
  26 + public function getParamPath()
  27 + {
  28 + return $this->paramPath;
  29 + }
  30 +
  31 + public function setParamPath($paramPath)
  32 + {
  33 + $this->paramPath = $paramPath;
  34 + }
  35 +
  36 + public function getType()
  37 + {
  38 + return $this->type;
  39 + }
  40 +
  41 + public function setType($type)
  42 + {
  43 + $this->type = $type;
  44 + }
  45 +
  46 + public function getResultNode()
  47 + {
  48 + return $this->resultNode;
  49 + }
  50 +
  51 + public function setResultNode($resultNode)
  52 + {
  53 + $this->resultNode = $resultNode;
  54 + }
  55 +
  56 + public function getParamId()
  57 + {
  58 + return $this->paramId;
  59 + }
  60 +
  61 + public function setParamId($paramId)
  62 + {
  63 + $this->paramId = $paramId;
  64 + }
  65 +}
  66 +
  67 +?>
0 68 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamNodeClass.php
... ... @@ -53,12 +53,66 @@ class InfoParamNodeClass extends NodeClass
53 53 public function setName($name)
54 54 {
55 55 $node = $this->getChildInstanceByName(INFOPARAM_NAME,true);
56   - $node->setValue($sampling);
  56 + $node->setValue($name);
  57 + }
  58 +
  59 + public function setShortName($short_name)
  60 + {
  61 + $node = $this->getChildInstanceByName(INFOPARAM_SHORTNAME,true);
  62 + $node->setValue($short_name);
  63 + }
  64 +
  65 + public function setComponents($components)
  66 + {
  67 + $node = $this->getChildInstanceByName(INFOPARAM_COMPONENTS,true);
  68 + $node->setValue($components);
  69 + }
  70 +
  71 + public function setUnits($units)
  72 + {
  73 + $node = $this->getChildInstanceByName(INFOPARAM_UNITS,true);
  74 + $node->setValue($units);
  75 + }
  76 +
  77 + public function setCoordSyst($coord_sys)
  78 + {
  79 + $node = $this->getChildInstanceByName(INFOPARAM_COORDSYS,true);
  80 + $node->setValue($coord_sys);
  81 + }
  82 +
  83 + public function setTensorOrder($tensor_order)
  84 + {
  85 + $node = $this->getChildInstanceByName(INFOPARAM_TENSORORDER,true);
  86 + $node->setValue($tensor_order);
  87 + }
  88 +
  89 + public function setSIConv($si_conv)
  90 + {
  91 + $node = $this->getChildInstanceByName(INFOPARAM_SICONV,true);
  92 + $node->setValue($si_conv);
  93 + }
  94 +
  95 + public function setFillVal($fill)
  96 + {
  97 + $node = $this->getChildInstanceByName(INFOPARAM_FILLVAL,true);
  98 + $node->setValue($fill);
  99 + }
  100 +
  101 + public function setUCD($ucd)
  102 + {
  103 + $node = $this->getChildInstanceByName(INFOPARAM_UCD,true);
  104 + $node->setValue($ucd);
  105 + }
  106 +
  107 + public function setDatasetID($dataset_id)
  108 + {
  109 + $node = $this->getChildInstanceByName(INFOPARAM_DATASETID,true);
  110 + $node->setValue($dataset_id);
57 111 }
58 112  
59 113 public function addTable($type, $name)
60 114 {
61   - $node = $this->getChildInstanceByName(INFOPARAM_TABLE, true);
  115 + $node = $this->getTable();
62 116  
63 117 switch ($type)
64 118 {
... ... @@ -75,7 +129,7 @@ class InfoParamNodeClass extends NodeClass
75 129 $tableDef = new InfoParamTableDefCenterWidthNodeClass();
76 130 break;
77 131 default :
78   - throw new Exception('Table definition node not implemented');
  132 + //throw new Exception('Table definition node not implemented');
79 133 }
80 134  
81 135 $tableDef->setTableName($name);
... ... @@ -84,6 +138,76 @@ class InfoParamNodeClass extends NodeClass
84 138  
85 139 return $tableDef;
86 140 }
  141 +
  142 + public function getTable()
  143 + {
  144 + return $this->getChildInstanceByName(INFOPARAM_TABLE, true);
  145 + }
  146 +
  147 + public function loadFromNode($xmlNode)
  148 + {
  149 + $nameXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_NAME);
  150 + if (isset($nameXmlNode))
  151 + $this->setName($this->getXmlNodeValue($nameXmlNode));
  152 +
  153 + $shortnameXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_SHORTNAME);
  154 + if (isset($shortnameXmlNode))
  155 + $this->setShortName($this->getXmlNodeValue($shortnameXmlNode));
  156 +
  157 + $componentsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_COMPONENTS);
  158 + if (isset($componentsXmlNode))
  159 + $this->setComponents($this->getXmlNodeValue($componentsXmlNode));
  160 +
  161 + $unitsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_UNITS);
  162 + if (isset($unitsXmlNode))
  163 + $this->setUnits($this->getXmlNodeValue($unitsXmlNode));
  164 +
  165 + $coordsysXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_COORDSYS);
  166 + if (isset($coordsysXmlNode))
  167 + $this->setCoordSyst($this->getXmlNodeValue($coordsysXmlNode));
  168 +
  169 + $tensororderXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_TENSORORDER);
  170 + if (isset($tensororderXmlNode))
  171 + $this->setTensorOrder($this->getXmlNodeValue($tensororderXmlNode));
  172 +
  173 + $siconvXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_SICONV);
  174 + if (isset($siconvXmlNode))
  175 + $this->setSIConv($this->getXmlNodeValue($siconvXmlNode));
  176 +
  177 + $tableXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_TABLE);
  178 + if (isset($tableXmlNode)) {
  179 + foreach ($this->getXmlNodeChildren($tableXmlNode) as $tableDefXmlNode) {
  180 + switch ($this->getXmlNodeName($tableDefXmlNode)) {
  181 + case INFOPARAMTABLEDEFBOUNDS_TAGNAME :
  182 + $this->addTable(InfoParamTableTypeEnum::BOUNDS, "")->loadFromNode($tableDefXmlNode);
  183 + break;
  184 + case INFOPARAMTABLEDEFCENTER_TAGNAME :
  185 + $this->addTable(InfoParamTableTypeEnum::CENTER, "")->loadFromNode($tableDefXmlNode);
  186 + break;
  187 + case INFOPARAMTABLEDEFCENTERWIDTH_TAGNAME :
  188 + $this->addTable(InfoParamTableTypeEnum::CENTERWIDTH, "")->loadFromNode($tableDefXmlNode);
  189 + break;
  190 + case InfoParamTableDefMinMaxNodeClass :
  191 + $this->addTable(InfoParamTableTypeEnum::MINMAX, "")->loadFromNode($tableDefXmlNode);
  192 + break;
  193 + default :
  194 + //throw new Exception('Table definition node not implemented');
  195 + }
  196 + }
  197 + }
  198 +
  199 + $fillvalXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_FILLVAL);
  200 + if (isset($fillvalXmlNode))
  201 + $this->setFillVal($this->getXmlNodeValue($fillvalXmlNode));
  202 +
  203 + $ucdXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_UCD);
  204 + if (isset($ucdXmlNode))
  205 + $this->setUCD($this->getXmlNodeValue($ucdXmlNode));
  206 +
  207 + $datasetidXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_DATASETID);
  208 + if (isset($datasetidXmlNode))
  209 + $this->setDatasetID($this->getXmlNodeValue($datasetidXmlNode));
  210 + }
87 211 }
88 212  
89 213 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamTableDefBoundsNodeClass.php
... ... @@ -24,6 +24,12 @@ class InfoParamTableDefBoundsNodeClass extends InfoParamTableDefNodeClass
24 24 {
25 25 return $this->getAttribute(INFOPARAMTABLEDEFBOUNDS_BOUNDSNAME);
26 26 }
  27 +
  28 + public function loadFromNode($xmlNode)
  29 + {
  30 + parent::loadFromNode($xmlNode);
  31 + $this->setBoundsName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFBOUNDS_BOUNDSNAME));
  32 + }
27 33 }
28 34  
29 35 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamTableDefCenterNodeClass.php
... ... @@ -35,6 +35,13 @@ class InfoParamTableDefCenterNodeClass extends InfoParamTableDefNodeClass
35 35 {
36 36 return $this->getAttribute(INFOPARAMTABLEDEFCENTER_SIZE);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + parent::loadFromNode($xmlNode);
  42 + $this->setCenterName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTER_CENTERNAME));
  43 + $this->setSize($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTER_SIZE));
  44 + }
38 45 }
39 46  
40 47 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamTableDefCenterWidthNodeClass.php
... ... @@ -35,6 +35,13 @@ class InfoParamTableDefCenterWidthNodeClass extends InfoParamTableDefNodeClass
35 35 {
36 36 return $this->getAttribute(INFOPARAMTABLEDEFCENTERWIDTH_WIDTHNAME);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + parent::loadFromNode($xmlNode);
  42 + $this->setCenterName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTERWIDTH_CENTERNAME));
  43 + $this->setWidthName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFCENTERWIDTH_WIDTHNAME));
  44 + }
38 45 }
39 46  
40 47 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamTableDefMinMaxNodeClass.php
... ... @@ -35,6 +35,13 @@ class InfoParamTableDefMinMaxNodeClass extends InfoParamTableDefNodeClass
35 35 {
36 36 return $this->getAttribute(INFOPARAMTABLEDEFMINMAX_MAXNAME);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + parent::loadFromNode($xmlNode);
  42 + $this->setMinName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFMINMAX_MINNAME));
  43 + $this->setMaxName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEFMINMAX_MAXNAME));
  44 + }
38 45 }
39 46  
40 47 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Infos/InfoParamTableDefNodeClass.php
... ... @@ -45,6 +45,13 @@ class InfoParamTableDefNodeClass extends NodeClass
45 45 {
46 46 return $this->getAttribute(INFOPARAMTABLEDEF_UNITS);
47 47 }
  48 +
  49 + public function loadFromNode($xmlNode)
  50 + {
  51 + $this->setTableName($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEF_NAME));
  52 + $this->setDim($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEF_DIM));
  53 + $this->setUnits($this->getXmlNodeAttribute($xmlNode, INFOPARAMTABLEDEF_UNITS));
  54 + }
48 55 }
49 56  
50 57 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/NodeClass.php
... ... @@ -29,7 +29,7 @@ class NodeClass
29 29 {
30 30 $this->value = $val;
31 31 }
32   -
  32 +
33 33 protected function getValue()
34 34 {
35 35 return $this->value;
... ... @@ -40,7 +40,7 @@ class NodeClass
40 40 $this->attributes[$attName] = $attVal;
41 41 }
42 42  
43   - protected function getAttribute($attName)
  43 + public function getAttribute($attName)
44 44 {
45 45 return $this->attributes[$attName];
46 46 }
... ... @@ -69,7 +69,7 @@ class NodeClass
69 69 $this->addChild($child);
70 70 }
71 71  
72   - protected function getChildren()
  72 + public function getChildren()
73 73 {
74 74 return $this->children;
75 75 }
... ... @@ -94,11 +94,10 @@ class NodeClass
94 94 return NULL;
95 95 }
96 96  
97   - protected function getChildInstanceByName($name, $createIfNoExist = false)
  97 + public function getChildInstanceByName($name, $createIfNoExist = false)
98 98 {
99 99 $node = $this->getFirstChildByName($name);
100   - if ($node == NULL)
101   - if ($createIfNoExist)
  100 + if (!isset($node) && $createIfNoExist)
102 101 {
103 102 $node = new NodeClass($name);
104 103 $this->addChild($node);
... ... @@ -127,6 +126,74 @@ class NodeClass
127 126  
128 127 return $xmlNode;
129 128 }
  129 +
  130 + /*
  131 + * @brief Method to load a XML node
  132 + */
  133 + public function getXmlNodeAttribute($xmlNode, $attribute)
  134 + {
  135 + return $xmlNode->getAttribute($attribute);
  136 + }
  137 +
  138 + public function getXmlNodeValue($xmlNode)
  139 + {
  140 + return $xmlNode->nodeValue;
  141 + }
  142 +
  143 + public function getXmlNodeName($xmlNode)
  144 + {
  145 + return $xmlNode->nodeName;
  146 + }
  147 +
  148 + public function getXmlNodeChildren($xmlNode)
  149 + {
  150 + return $xmlNode->childNodes;
  151 + }
  152 +
  153 + public function getXmlNodeChildrenByTagName($xmlNode, $childrenName)
  154 + {
  155 + $result = array();
  156 + for ($n = $xmlNode->firstChild; $n !== null; $n = $n->nextSibling) {
  157 + if ($n instanceof DOMElement && $n->tagName == $childrenName) {
  158 + $result[] = $n;
  159 + }
  160 + }
  161 + return $result;
  162 + }
  163 +
  164 + public function getXmlNodeChildByTagName($xmlNode, $childName)
  165 + {
  166 + $xmlChildrenNodes = $this->getXmlNodeChildrenByTagName($xmlNode, $childName);
  167 + if (count($xmlChildrenNodes) <= 0)
  168 + return NULL;
  169 + return $xmlChildrenNodes[0];
  170 + }
  171 +
  172 + public function loadFromNode($xmlNode) {
  173 + /*//Attributes
  174 +
  175 + //Value
  176 + if ($this->getXmlNodeChildren($xmlNode) == NULL) {
  177 + if ($this->getXmlNodeValue($xmlNode)) {
  178 + $result[$childXmlNode->nodeName] = $this->getXmlNodeValue($xmlNode);
  179 + }
  180 + return;
  181 + }
  182 + //Children
  183 + foreach ($this->getXmlNodeChildren($xmlNode) as $childXmlNode) {
  184 + echo $childXmlNode->nodeName.PHP_EOL;
  185 + $nodeObject = NodeFactory::getNodeObject ($childXmlNode->nodeName, $this->getContext());
  186 + if (isset($nodeObject)) {
  187 + $cloneNodeObject = clone $nodeObject;
  188 + if (!array_key_exists($childXmlNode->nodeName,$result))
  189 + $result[$childXmlNode->nodeName] = array();
  190 + $result[$childXmlNode->nodeName][] = array();
  191 + $cloneNodeObject->loadFromNode($childXmlNode, $result[$childXmlNode->nodeName][count($result[$childXmlNode->nodeName])-1]);
  192 + }
  193 + else
  194 + echo "[WARNING] ".$childXmlNode->nodeName." ".$this->getContext().PHP_EOL;
  195 + }*/
  196 + }
130 197 }
131 198  
132 199 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamClbManualNodeClass.php
... ... @@ -31,12 +31,22 @@ class ParamClbManualNodeClass extends NodeClass
31 31 $valueNode = new NodeClass(PARAMCLBMANUAL_VALUE);
32 32 $valueNode->setValue($value);
33 33 $this->addChild($valueNode);
  34 + return $valueNode;
34 35 }
35 36  
36 37 public function getClbValues()
37 38 {
38 39 return $this->getChildrenByName(PARAMCLBMANUAL_VALUE);
39 40 }
  41 +
  42 + public function loadFromNode($xmlNode)
  43 + {
  44 + $this->setClbName($this->getXmlNodeAttribute($xmlNode, PARAMCLBMANUAL_NAME));
  45 +
  46 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMCLBMANUAL_VALUE) as $clbXmlNode) {
  47 + $this->addClbValue($this->getXmlNodeValue($clbXmlNode));
  48 + }
  49 + }
40 50 }
41 51  
42 52 ?>
43 53 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamGetAmdaParamNodeClass.php
... ... @@ -24,6 +24,11 @@ class ParamGetAmdaParamNodeClass extends NodeClass
24 24 {
25 25 return $this->getAttribute(PARAMGETAMDAPARAM_NAMEATT);
26 26 }
  27 +
  28 + public function loadFromNode($xmlNode)
  29 + {
  30 + $this->setParamName($this->getXmlNodeAttribute($xmlNode, PARAMGETAMDAPARAM_NAMEATT));
  31 + }
27 32 }
28 33  
29 34 ?>
30 35 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamGetDDBaseBaseParamNodeClass.php
... ... @@ -18,12 +18,12 @@ class ParamGetDDBaseBaseParamNodeClass extends NodeClass
18 18 parent::__construct(PARAMGETDDBASEBASEPARAM_NAME);
19 19 }
20 20  
21   - public function setName($name)
  21 + public function setParamName($name)
22 22 {
23 23 $this->setAttribute(PARAMGETDDBASEBASEPARAM_NAMEATT, $name);
24 24 }
25 25  
26   - public function getName()
  26 + public function getParamName()
27 27 {
28 28 return $this->getAttribute(PARAMGETDDBASEBASEPARAM_NAMEATT);
29 29 }
... ... @@ -34,14 +34,16 @@ class ParamGetDDBaseBaseParamNodeClass extends NodeClass
34 34 $tensorNode->setValue($tensor_order);
35 35 }
36 36  
37   - public function addCalibInfo($calibInfo)
  37 + public function addCalibInfo($calibInfo = "")
38 38 {
39 39 if ($this->calibInfoExist($calibInfo))
40   - return;
  40 + return NULL;
41 41  
42 42 $node = new NodeClass(PARAMGETDDBASEBASEPARAM_CALIB);
43 43 $node->setAttribute(PARAMGETDDBASEBASEPARAM_CALIBNAME,$calibInfo);
44 44 $this->addChild($node);
  45 +
  46 + return $node;
45 47 }
46 48  
47 49 public function calibInfoExist($calibInfo)
... ... @@ -54,6 +56,19 @@ class ParamGetDDBaseBaseParamNodeClass extends NodeClass
54 56  
55 57 return false;
56 58 }
  59 +
  60 + public function loadFromNode($xmlNode)
  61 + {
  62 + $this->setParamName($this->getXmlNodeAttribute($xmlNode, PARAMGETDDBASEBASEPARAM_NAMEATT));
  63 +
  64 + $tensorOrderXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAMGETDDBASEBASEPARAM_TENSORORDER);
  65 + if (isset($tensorOrderXmlNode))
  66 + $this->setTensorOrder($this->getXmlNodeValue($tensorOrderXmlNode));
  67 +
  68 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMGETDDBASEBASEPARAM_CALIB) as $clbXmlNode) {
  69 + $this->addCalibInfo($this->getXmlNodeAttribute($xmlNode, PARAMGETDDBASEBASEPARAM_CALIBNAME));
  70 + }
  71 + }
57 72 }
58 73  
59 74 ?>
60 75 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamGetDDBaseNodeClass.php
1 1 <?php
2 2  
  3 +require_once "ParamGetDDBaseBaseParamNodeClass.php";
  4 +
3 5 define ("PARAMGETDDBASE_NAME", "vi");
4 6 define ("PARAMGETDDBASE_NAMEATT", "name");
5 7  
... ... @@ -15,24 +17,35 @@ class ParamGetDDBaseNodeClass extends NodeClass
15 17 parent::__construct(PARAMGETDDBASE_NAME);
16 18 }
17 19  
18   - public function setName($name)
  20 + public function setVIName($name)
19 21 {
20 22 $this->setAttribute(PARAMGETDDBASE_NAMEATT, $name);
21 23 }
22 24  
23   - public function getName()
  25 + public function getVIName()
24 26 {
25 27 return $this->getAttribute(PARAMGETDDBASE_NAMEATT);
26 28 }
27 29  
28   - public function addBaseParam($name,$calib_info_list, $tensor_order = -1)
  30 + public function addBaseParam($name = "", $calib_info_list = array(), $tensor_order = -1)
29 31 {
30   - $baseParamNode = new ParamGetDDBaseBaseParamNode();
31   - $baseParamNode->setName($name);
  32 + $baseParamNode = new ParamGetDDBaseBaseParamNodeClass();
  33 + $baseParamNode->setParamName($name);
32 34 if ($tensor_order > -1)
33 35 $baseParamNode->setTensorOrder($tensor_order);
34 36 foreach ($calib_info_list as $calib_info)
35 37 $baseParamNode->addCalibInfo($calib_info);
  38 + $this->addChild($baseParamNode);
  39 + return $baseParamNode;
  40 + }
  41 +
  42 + public function loadFromNode($xmlNode)
  43 + {
  44 + $this->setVIName($this->getXmlNodeAttribute($xmlNode, PARAMGETDDBASE_NAMEATT));
  45 +
  46 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMGETDDBASEBASEPARAM_NAME) as $baseParamXmlNode) {
  47 + $this->addBaseParam()->loadFromNode($baseParamXmlNode);
  48 + }
36 49 }
37 50 }
38 51  
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamGetLocalBaseNodeClass.php
1 1 <?php
2 2  
  3 +require_once "ParamGetLocalBaseParamNodeClass.php";
  4 +
3 5 define ("PARAMGETLOCALBASE_VI", "localvi");
4 6 define ("PARAMGETLOCALBASE_VIID", "id");
5 7  
... ... @@ -30,7 +32,7 @@ class ParamGetLocalBaseNodeClass extends NodeClass
30 32 return NULL;
31 33 }
32 34  
33   - public function addLocalParam($id, $minSampling, $maxSampling)
  35 + public function addLocalParam($id = "", $minSampling = "", $maxSampling = "")
34 36 {
35 37 $paramNode = new ParamGetLocalBaseParamNodeClass();
36 38  
... ... @@ -39,6 +41,17 @@ class ParamGetLocalBaseNodeClass extends NodeClass
39 41 $paramNode->setMaxSampling($maxSampling);
40 42  
41 43 $this->addChild($paramNode);
  44 +
  45 + return $paramNode;
  46 + }
  47 +
  48 + public function loadFromNode($xmlNode)
  49 + {
  50 + $this->setVIId($this->getXmlNodeAttribute($xmlNode, PARAMGETLOCALBASE_VIID));
  51 +
  52 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMGETLOCALBASEPARAM_NAME) as $localParamXmlNode) {
  53 + $this->addLocalParam()->loadFromNode($localParamXmlNode);
  54 + }
42 55 }
43 56 }
44 57  
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamGetLocalBaseParamNodeClass.php
... ... @@ -40,14 +40,16 @@ class ParamGetLocalBaseParamNodeClass extends NodeClass
40 40 $this->setAttribute(PARAMGETLOCALBASEPARAM_MAXSAMPLING, $maxSampling);
41 41 }
42 42  
43   - public function addCalibInfo($calibInfo)
  43 + public function addCalibInfo($calibInfo = "")
44 44 {
45 45 if ($this->calibInfoExist($calibInfo))
46   - return;
  46 + return NULL;
47 47  
48 48 $node = new NodeClass(PARAMGETLOCALBASEPARAM_CALIB);
49 49 $node->setAttribute(PARAMGETLOCALBASEPARAM_CALIBNAME,$calibInfo);
50 50 $this->addChild($node);
  51 +
  52 + return $node;
51 53 }
52 54  
53 55 public function calibInfoExist($calibInfo)
... ... @@ -60,6 +62,19 @@ class ParamGetLocalBaseParamNodeClass extends NodeClass
60 62  
61 63 return false;
62 64 }
  65 +
  66 + public function loadFromNode($xmlNode)
  67 + {
  68 + $this->setId($this->getXmlNodeAttribute($xmlNode, PARAMGETLOCALBASEPARAM_ID));
  69 +
  70 + $this->setMinSampling($this->getXmlNodeAttribute($xmlNode, PARAMGETLOCALBASEPARAM_MINSAMPLING));
  71 +
  72 + $this->setMaxSampling($this->getXmlNodeAttribute($xmlNode, PARAMGETLOCALBASEPARAM_MAXSAMPLING));
  73 +
  74 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMGETLOCALBASEPARAM_CALIB) as $calibXmlNode) {
  75 + $this->addCalibInfo($this->getXmlNodeAttribute($xmlNode, PARAMGETLOCALBASEPARAM_CALIBNAME));
  76 + }
  77 + }
63 78 }
64 79  
65 80 ?>
66 81 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Params/ParamNodeClass.php
1 1 <?php
2 2  
  3 +require_once "ParamClbManualNodeClass.php";
  4 +require_once "ParamGetAmdaParamNodeClass.php";
  5 +require_once "ParamGetDDBaseNodeClass.php";
  6 +require_once "ParamGetLocalBaseNodeClass.php";
  7 +require_once dirname(__FILE__)."/../Infos/InfoParamNodeClass.php";
  8 +require_once dirname(__FILE__)."/../Requests/RequestOutputPlotPanelNodeClass.php";
  9 +
3 10 define ("PARAM_NAME", "param");
4 11 define ("PARAM_ID", "xml:id");
5 12 define ("PARAM_SAMPLING", "time_resolution");
... ... @@ -57,7 +64,7 @@ class ParamNodeClass extends NodeClass
57 64 return $infoNode;
58 65 }
59 66  
60   - public function addClbManual($name)
  67 + public function addClbManual($name = "")
61 68 {
62 69 $clbManualNode = new ParamClbManualNodeClass();
63 70 $clbManualNode->setClbName($name);
... ... @@ -108,6 +115,72 @@ class ParamNodeClass extends NodeClass
108 115 public function setOutput()
109 116 {
110 117 $node = $this->getChildInstanceByName(PARAM_OUTPUT, true);
  118 + return $node;
  119 + }
  120 +
  121 + public function getOutput()
  122 + {
  123 + return $this->getChildInstanceByName(PARAM_OUTPUT, false);
  124 + }
  125 +
  126 + public function loadFromNode($xmlNode)
  127 + {
  128 + $this->setId($this->getXmlNodeAttribute($xmlNode, PARAM_ID));
  129 +
  130 + $samplingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_SAMPLING);
  131 + if (isset($samplingXmlNode))
  132 + $this->setSampling($this->getXmlNodeValue($samplingXmlNode));
  133 +
  134 + $gapXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_GAP);
  135 + if (isset($gapXmlNode))
  136 + $this->setGap($this->getXmlNodeValue($gapXmlNode));
  137 +
  138 + $infoXmlNode = $this->getXmlNodeChildByTagName($xmlNode, INFOPARAM_TAGNAME);
  139 + if (isset($infoXmlNode))
  140 + $this->getInfo()->loadFromNode($infoXmlNode);
  141 +
  142 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, PARAMCLBMANUAL_TAGNAME) as $clbXmlNode) {
  143 + $this->addClbManual()->loadFromNode($clbXmlNode);
  144 + }
  145 +
  146 + $paramGetXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_GET);
  147 + if (isset($paramGetXmlNode)) {
  148 + foreach ($this->getXmlNodeChildren($paramGetXmlNode) as $paramGetDefXmlNode) {
  149 + switch ($this->getXmlNodeName($paramGetDefXmlNode)) {
  150 + case PARAMGETAMDAPARAM_NAME :
  151 + $this->addParamGet(ParamGetTypeEnum::AMDAPARAM)->loadFromNode($paramGetDefXmlNode);
  152 + break;
  153 + case PARAMGETDDBASE_NAME :
  154 + $this->addParamGet(ParamGetTypeEnum::DDBASE)->loadFromNode($paramGetDefXmlNode);
  155 + break;
  156 + case PARAMGETLOCALBASE_VI :
  157 + $this->addParamGet(ParamGetTypeEnum::LOCALBASE)->loadFromNode($paramGetDefXmlNode);
  158 + break;
  159 + }
  160 + }
  161 + }
  162 +
  163 + $processXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_PROCESS);
  164 + if (isset($processXmlNode))
  165 + $this->setProcess($this->getXmlNodeValue($processXmlNode));
  166 +
  167 + $outputNode = $this->setOutput();
  168 + $outputXmlNode = $this->getXmlNodeChildByTagName($xmlNode, PARAM_OUTPUT);
  169 + if (isset($outputXmlNode))
  170 + {
  171 + foreach ($this->getXmlNodeChildren($outputXmlNode) as $outputTypeXmlNode) {
  172 + switch ($this->getXmlNodeName($outputTypeXmlNode))
  173 + {
  174 + case "plot" :
  175 + $plotNode = $outputNode->getChildInstanceByName("plot", TRUE);
  176 + $node = new RequestOutputPlotPanelNodeClass();
  177 + $plotNode->addChild($node);
  178 + $node->loadFromNode($outputTypeXmlNode);
  179 + break;
  180 + }
  181 + }
  182 + }
  183 +
111 184 }
112 185 }
113 186  
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestTimesNodeClass.php";
  4 +require_once "RequestOutputsNodeClass.php";
  5 +
3 6 define ("REQUESTPARAM_NAME", "param");
4 7 define ("REQUESTPARAM_ID", "id");
5 8  
... ... @@ -24,6 +27,11 @@ class RequestParamNodeClass extends NodeClass
24 27 {
25 28 return $this->getAttribute(REQUESTPARAM_ID);
26 29 }
  30 +
  31 + public function loadFromNode($xmlNode)
  32 + {
  33 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTPARAM_ID));
  34 + }
27 35 }
28 36  
29 37 define ("REQUESTPARAMS_NAME", "params");
... ... @@ -40,20 +48,29 @@ class RequestParamsNodeClass extends NodeClass
40 48 parent::__construct(REQUESTPARAMS_NAME);
41 49 }
42 50  
43   - public function addParam($id)
  51 + public function addParam($id = "")
44 52 {
45 53 foreach ($this->getChildrenByName(REQUESTPARAM_NAME) as $paramNode)
46 54 if ($paramNode->getId() == $id)
47   - return;
  55 + return $paramNode;
48 56 $param = new RequestParamNodeClass();
49 57 $param->setId($id);
50 58 $this->addChild($param);
  59 +
  60 + return $param;
51 61 }
52 62  
53 63 public function getParamList()
54 64 {
55 65 return $this->getChildrenByName(REQUESTPARAM_NAME);
56 66 }
  67 +
  68 + public function loadFromNode($xmlNode)
  69 + {
  70 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTPARAM_NAME) as $requestParamXmlNode) {
  71 + $this->addParam()->loadFromNode($requestParamXmlNode);
  72 + }
  73 + }
57 74 }
58 75  
59 76 define ("REQUEST_NAME", "request");
... ... @@ -100,6 +117,22 @@ class RequestNodeClass extends NodeClass
100 117 {
101 118 return $this->realIndex;
102 119 }
  120 +
  121 + public function loadFromNode($xmlNode)
  122 + {
  123 + $paramsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTPARAMS_NAME);
  124 + if (isset($paramsXmlNode))
  125 + $this->getParamsNode()->loadFromNode($paramsXmlNode);
  126 +
  127 + $timesXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTTIMES_NAME);
  128 + if (isset($timesXmlNode))
  129 + $this->getTimesNode()->loadFromNode($timesXmlNode);
  130 +
  131 + $outputsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTS_NAME);
  132 + if (isset($outputsXmlNode))
  133 + $this->getOutputsNode()->loadFromNode($outputsXmlNode);
  134 +
  135 + }
103 136 }
104 137  
105 138 ?>
106 139 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDataMiningNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPostProcessingNodeClass.php";
  4 +
3 5 define ("REQUESTOUTPUTDATAMINING_NAME", "dataMining");
4 6 define ("REQUESTOUTPUTDATAMINING_TIMEFORMAT", "timeFormat");
5 7 define ("REQUESTOUTPUTDATAMINING_FILEFORMAT", "fileFormat");
... ... @@ -46,6 +48,11 @@ class RequestOutputDataMiningParamNodeClass extends NodeClass
46 48 {
47 49 return $this->getAttribute(REQUESTOUTPUTDATAMININGPARAM_ID);
48 50 }
  51 +
  52 + public function loadFromNode($xmlNode)
  53 + {
  54 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTDATAMININGPARAM_ID));
  55 + }
49 56 }
50 57  
51 58 /**
... ... @@ -84,7 +91,7 @@ class RequestOutputDataMiningNodeClass extends NodeClass
84 91 $node->setValue($fileName);
85 92 }
86 93  
87   - public function setParam($id)
  94 + public function setParam($id = "")
88 95 {
89 96 $node = $this->getFirstChildByName(REQUESTOUTPUTDATAMININGPARAM_NAME);
90 97 if (!$node)
... ... @@ -93,9 +100,10 @@ class RequestOutputDataMiningNodeClass extends NodeClass
93 100 $this->addChild($node);
94 101 }
95 102 $node->setId($id);
  103 + return $node;
96 104 }
97 105  
98   - public function addPostProcessing($process)
  106 + public function addPostProcessing($process = "")
99 107 {
100 108 $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME);
101 109 if ($node == NULL)
... ... @@ -104,7 +112,9 @@ class RequestOutputDataMiningNodeClass extends NodeClass
104 112 $this->addChild($node);
105 113 }
106 114  
107   - $node->addPostProcessing($process);
  115 + if ($process != "")
  116 + $node->addPostProcessing($process);
  117 + return $node;
108 118 }
109 119  
110 120 public function isPostProcessing($process)
... ... @@ -116,6 +126,33 @@ class RequestOutputDataMiningNodeClass extends NodeClass
116 126  
117 127 return $node->isPostProcessing($process);
118 128 }
  129 +
  130 + public function loadFromNode($xmlNode)
  131 + {
  132 + $timeformatXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDATAMINING_TIMEFORMAT);
  133 + if (isset($timeformatXmlNode))
  134 + $this->setTimeFormat($this->getXmlNodeValue($timeformatXmlNode));
  135 +
  136 + $fileformatXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDATAMINING_FILEFORMAT);
  137 + if (isset($fileformatXmlNode))
  138 + $this->setFileFormat($this->getXmlNodeValue($fileformatXmlNode));
  139 +
  140 + $structureXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDATAMINING_STRUCTURE);
  141 + if (isset($structureXmlNode))
  142 + $this->setStructure($this->getXmlNodeValue($structureXmlNode));
  143 +
  144 + $filenameXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDATAMINING_FILENAME);
  145 + if (isset($filenameXmlNode))
  146 + $this->setFileName($this->getXmlNodeValue($filenameXmlNode));
  147 +
  148 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTDATAMININGPARAM_NAME) as $paramXmlNode) {
  149 + $this->setParam()->loadFromNode($paramXmlNode);
  150 + }
  151 +
  152 + $postProcessingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPOSTPROCESSING_NAME);
  153 + if (isset($postProcessingXmlNode))
  154 + $this->addPostProcessing()->loadFromNode($postProcessingXmlNode);
  155 + }
119 156 }
120 157  
121 158 ?>
122 159 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDownloadNodeClass.php
... ... @@ -59,46 +59,71 @@ class RequestOutputDownloadParamNodeClass extends NodeClass
59 59 return $this->getAttribute(REQUESTOUTPUTDOWNLOADPARAM_ID);
60 60 }
61 61  
62   - public function addIndex($index)
  62 + public function addIndex($index = "")
63 63 {
64 64 if ($this->indexExist($index))
65   - return;
  65 + return $this->getIndex($index);
66 66  
67 67 $node = new NodeClass(REQUESTOUTPUTDOWNLOADPARAM_INDEX);
68 68 $node->setValue($index);
69 69 $this->addChild($node);
  70 + return $node;
70 71 }
71 72  
72   - public function indexExist($index)
  73 + public function getIndex($index)
73 74 {
74 75 $indexNodes = $this->getChildrenByName(REQUESTOUTPUTDOWNLOADPARAM_INDEX);
75   -
  76 +
76 77 foreach ($indexNodes as $indexNode)
77   - if ($indexNode->getValue() == $index)
78   - return true;
79   -
80   - return false;
  78 + if ($indexNode->getValue() == $index)
  79 + return $indexNode;
  80 +
  81 + return NULL;
  82 + }
  83 +
  84 + public function indexExist($index)
  85 + {
  86 + return ($this->getIndex($index) != NULL);
81 87 }
82 88  
83 89 public function addCalibInfo($calibInfo)
84 90 {
85 91 if ($this->calibInfoExist($calibInfo))
86   - return;
  92 + return $this->getCalibInfo($calibInfo);
87 93  
88 94 $node = new NodeClass(REQUESTOUTPUTDOWNLOADPARAM_CALIB);
89 95 $node->setValue($calibInfo);
90 96 $this->addChild($node);
  97 + return $node;
91 98 }
92 99  
93   - public function calibInfoExist($calibInfo)
  100 + public function getCalibInfo($calibInfo)
94 101 {
95 102 $calibNodes = $this->getChildrenByName(REQUESTOUTPUTDOWNLOADPARAM_CALIB);
96   -
  103 +
97 104 foreach ($calibNodes as $calibNode)
98 105 if ($calibNode->getValue() == $calibInfo)
99   - return true;
100   -
101   - return false;
  106 + return $calibNode;
  107 +
  108 + return NULL;
  109 + }
  110 +
  111 + public function calibInfoExist($calibInfo)
  112 + {
  113 + return ($this->getCalibInfo($calibInfo) != NULL);
  114 + }
  115 +
  116 + public function loadFromNode($xmlNode)
  117 + {
  118 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTDOWNLOADPARAM_ID));
  119 +
  120 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTDOWNLOADPARAM_INDEX) as $indexXmlNode) {
  121 + $this->addIndex($this->getXmlNodeValue($indexXmlNode));
  122 + }
  123 +
  124 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTDOWNLOADPARAM_CALIB) as $calibInfoXmlNode) {
  125 + $this->addCalibInfo($this->getXmlNodeValue($calibInfoXmlNode));
  126 + }
102 127 }
103 128 }
104 129  
... ... @@ -184,7 +209,7 @@ class RequestOutputDownloadNodeClass extends NodeClass
184 209 return $this->getAttribute(REQUESTOUTPUTDOWNLOAD_PRECISION);
185 210 }
186 211  
187   - public function addParam($id, $indexes, $calib_infos)
  212 + public function addParam($id = "", $indexes = NULL, $calib_infos = NULL)
188 213 {
189 214 $node = new RequestOutputDownloadParamNodeClass();
190 215 $node->setId($id);
... ... @@ -199,6 +224,7 @@ class RequestOutputDownloadNodeClass extends NodeClass
199 224 $node->addCalibInfo($calib_infos);
200 225 }
201 226 $this->addChild($node);
  227 + return $node;
202 228 }
203 229  
204 230 public function getParam($id)
... ... @@ -211,7 +237,7 @@ class RequestOutputDownloadNodeClass extends NodeClass
211 237 return NULL;
212 238 }
213 239  
214   - public function addPostProcessing($process)
  240 + public function addPostProcessing($process = "")
215 241 {
216 242 $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME);
217 243 if ($node == NULL)
... ... @@ -220,7 +246,10 @@ class RequestOutputDownloadNodeClass extends NodeClass
220 246 $this->addChild($node);
221 247 }
222 248  
223   - $node->addPostProcessing($process);
  249 + if ($process != "")
  250 + $node->addPostProcessing($process);
  251 +
  252 + return $node;
224 253 }
225 254  
226 255 public function isPostProcessing($process)
... ... @@ -232,6 +261,37 @@ class RequestOutputDownloadNodeClass extends NodeClass
232 261  
233 262 return $node->isPostProcessing($process);
234 263 }
  264 +
  265 + public function loadFromNode($xmlNode)
  266 + {
  267 + $timeformatXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOAD_TIMEFORMAT);
  268 + if (isset($timeformatXmlNode))
  269 + $this->setTimeFormat($this->getXmlNodeValue($timeformatXmlNode));
  270 +
  271 + $fileformatXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOAD_FILEFORMAT);
  272 + if (isset($fileformatXmlNode))
  273 + $this->FileFormat($this->getXmlNodeValue($fileformatXmlNode));
  274 +
  275 + $filenameXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOAD_FILENAME);
  276 + if (isset($filenameXmlNode))
  277 + $this->setFileName($this->getXmlNodeValue($filenameXmlNode));
  278 +
  279 + $structureXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOAD_STRUCTURE);
  280 + if (isset($structureXmlNode))
  281 + $this->setStructure($this->getXmlNodeValue($structureXmlNode));
  282 +
  283 + $precisionXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOAD_PRECISION);
  284 + if (isset($precisionXmlNode))
  285 + $this->setPrecision($this->getXmlNodeValue($precisionXmlNode));
  286 +
  287 + $paramXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTDOWNLOADPARAM_NAME);
  288 + if (isset($paramXmlNode))
  289 + $this->addParam()->loadFromNode($paramXmlNode);
  290 +
  291 + $postProcessingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPOSTPROCESSING_NAME);
  292 + if (isset($postProcessingXmlNode))
  293 + $this->addPostProcessing()->loadFromNode($postProcessingXmlNode);
  294 + }
235 295 }
236 296  
237 297 ?>
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputDownloadPostProcessingNodeClass.php
... ... @@ -34,6 +34,13 @@ class RequestOutputDownloadPostProcessingNodeClass extends NodeClass
34 34 return false;
35 35 return ($this->getChildInstanceByName($type) != NULL);
36 36 }
  37 +
  38 + public function loadFromNode($xmlNode)
  39 + {
  40 + foreach ($this->getXmlNodeChildren($xmlNode) as $postProcessingXmlNode) {
  41 + $this->addPostProcessing($this->getXmlNodeName($postProcessingXmlNode));
  42 + }
  43 + }
37 44 }
38 45  
39 46 ?>
40 47 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotAdditionalObjectsNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotTextNodeClass.php";
  4 +require_once "RequestOutputPlotCurveObjectNodeClass.php";
  5 +
3 6 define ("REQUESTOUTPUTPLOTADDITIONALOBJECTS_NAME", "additionalObjects");
4 7  
5 8 /**
... ... @@ -27,6 +30,22 @@ class RequestOutputPlotAdditionalObjectsNodeClass extends NodeClass
27 30 $this->addChild($node);
28 31 return $node;
29 32 }
  33 +
  34 + public function getCurveObjects()
  35 + {
  36 + return $this->getChildrenByName(REQUESTOUTPUTPLOTCURVEOBJECT_NAME);
  37 + }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTTEXT_NAME) as $plotTextXmlNode) {
  42 + $this->addTextObject()->loadFromNode($plotTextXmlNode);
  43 + }
  44 +
  45 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTCURVEOBJECT_NAME) as $curveXmlNode) {
  46 + $this->addCurveObject()->loadFromNode($curveXmlNode);
  47 + }
  48 + }
30 49 }
31 50  
32 51 ?>
33 52 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotAxesNodeClass.php
... ... @@ -36,7 +36,7 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
36 36 $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTAXES_ZAXIS, true);
37 37 }
38 38  
39   - public function addDigitalAxis($axisType,$id)
  39 + public function addDigitalAxis($axisType,$id = "")
40 40 {
41 41 if (($axisType != RequestOutputPlotAxisTypeEnum::XAXIS) && ($axisType != RequestOutputPlotAxisTypeEnum::YAXIS))
42 42 return NULL;
... ... @@ -101,6 +101,41 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
101 101  
102 102 return $colorAxisNode;
103 103 }
  104 +
  105 + public function loadFromNode($xmlNode)
  106 + {
  107 + $xaxisXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXES_XAXIS);
  108 + if (isset($xaxisXmlNode))
  109 + {
  110 + $timeXmlNode = $this->getXmlNodeChildByTagName($xaxisXmlNode, REQUESTOUTPUTPLOTTIMEAXIS_NAME);
  111 + if (isset($timeXmlNode))
  112 + $this->getTimeAxis()->loadFromNode($timeXmlNode);
  113 +
  114 + $epochXmlNode = $this->getXmlNodeChildByTagName($xaxisXmlNode, REQUESTOUTPUTPLOTEPOCHAXIS_NAME);
  115 + if (isset($epochXmlNode))
  116 + $this->getEpochAxis()->loadFromNode($epochXmlNode);
  117 +
  118 + foreach ($this->getXmlNodeChildrenByTagName($xaxisXmlNode, REQUESTOUTPUTPLOTDIGITALAXIS_NAME) as $xXmlNode) {
  119 + $this->addDigitalAxis(RequestOutputPlotAxisTypeEnum::XAXIS)->loadFromNode($xXmlNode);
  120 + }
  121 + }
  122 +
  123 + $yaxisXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXES_YAXIS);
  124 + if (isset($yaxisXmlNode))
  125 + {
  126 + foreach ($this->getXmlNodeChildrenByTagName($yaxisXmlNode, REQUESTOUTPUTPLOTDIGITALAXIS_NAME) as $yXmlNode) {
  127 + $this->addDigitalAxis(RequestOutputPlotAxisTypeEnum::YAXIS)->loadFromNode($yXmlNode);
  128 + }
  129 + }
  130 +
  131 + $zaxisXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXES_ZAXIS);
  132 + if (isset($zaxisXmlNode))
  133 + {
  134 + $colorXmlNode = $this->getXmlNodeChildByTagName($xaxisXmlNode, REQUESTOUTPUTPLOTCOLORAXIS_NAME);
  135 + if (isset($colorXmlNode))
  136 + $this->getColorAxis()->loadFromNode($colorXmlNode);
  137 + }
  138 + }
104 139 }
105 140  
106 141 ?>
107 142 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotAxisElementNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotConstantNodeClass.php";
  4 +
3 5 define ("REQUESTOUTPUTPLOTAXISELEMENT_POSITION", "position");
4 6 define ("REQUESTOUTPUTPLOTAXISELEMENT_REVERSE", "reverse");
5 7 define ("REQUESTOUTPUTPLOTAXISELEMENT_VISIBLE", "visible");
... ... @@ -79,6 +81,12 @@ class RequestOutputPlotAxisElementRangeNodeClass extends NodeClass
79 81 {
80 82 return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTRANGE_EXTEND);
81 83 }
  84 +
  85 + public function loadFromNode($xmlNode)
  86 + {
  87 + $this->setMinMax($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_MIN), $this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_MAX));
  88 + $this->setExtend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_EXTEND));
  89 + }
82 90 }
83 91  
84 92 /**
... ... @@ -122,6 +130,13 @@ class RequestOutputPlotAxisElementTickClass extends NodeClass
122 130 {
123 131 return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID);
124 132 }
  133 +
  134 + public function loadFromNode($xmlNode)
  135 + {
  136 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION));
  137 + $this->setMinorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID));
  138 + $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID));
  139 + }
125 140 }
126 141  
127 142 /**
... ... @@ -145,6 +160,12 @@ class RequestOutputPlotAxisElementLegendNodeClass extends RequestOutputPlotLabel
145 160 {
146 161 return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT);
147 162 }
  163 +
  164 + public function loadFromNode($xmlNode)
  165 + {
  166 + $this->setText($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT));
  167 + parent::loadFromNode($xmlNode);
  168 + }
148 169 }
149 170  
150 171 /**
... ... @@ -276,6 +297,34 @@ class RequestOutputPlotAxisElementNodeClass extends NodeClass
276 297 {
277 298 return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENT_TICKMARKS);
278 299 }
  300 +
  301 + public function loadFromNode($xmlNode)
  302 + {
  303 + $rangeXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTRANGE_NAME);
  304 + if (isset($rangeXmlNode))
  305 + $this->getRange()->loadFromNode($rangeXmlNode);
  306 +
  307 + $tickXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME);
  308 + if (isset($tickXmlNode))
  309 + $this->getTick()->loadFromNode($tickXmlNode);
  310 +
  311 + $legendXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME);
  312 + if (isset($legendXmlNode))
  313 + $this->getLegend()->loadFromNode($legendXmlNode);
  314 +
  315 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTCONSTANT_NAME) as $constantXmlNode) {
  316 + $this->addConstant()->loadFromNode($clbXmlNode);
  317 + }
  318 +
  319 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_POSITION));
  320 + $this->setThickness($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_THICKNESS));
  321 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_COLOR));
  322 + $this->setReverse($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_REVERSE));
  323 + $this->setVisible($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_VISIBLE));
  324 + $this->setScale($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_SCALE));
  325 + $this->setShowLegend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_SHOWLEGEND));
  326 + $this->setShowTickMarks($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENT_TICKMARKS));
  327 + }
279 328 }
280 329  
281 330 ?>
282 331 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotBaseSerieNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotLineNodeClass.php";
  4 +require_once "RequestOutputPlotSymbolNodeClass.php";
  5 +require_once "RequestOutputPlotSerieTimeTicksNodeClass.php";
  6 +require_once "RequestOutputPlotSerieIntervalTicksNodeClass.php";
  7 +
3 8 define ("REQUESTOUTPUTPLOTBASESERIE_YAXIS", "yAxis");
4 9 define ("REQUESTOUTPUTPLOTBASESERIE_XAXIS", "xAxis");
5 10 define ("REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID", "colorSerieId");
... ... @@ -73,6 +78,12 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass
73 78 return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_MAX);
74 79 }
75 80  
  81 + public function isLineDefined()
  82 + {
  83 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_LINE);
  84 + return isset($node);
  85 + }
  86 +
76 87 public function getLine()
77 88 {
78 89 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_LINE);
... ... @@ -86,6 +97,12 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass
86 97 return $node;
87 98 }
88 99  
  100 + public function isSymbolDefined()
  101 + {
  102 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
  103 + return isset($node);
  104 + }
  105 +
89 106 public function getSymbol()
90 107 {
91 108 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
... ... @@ -99,6 +116,12 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass
99 116 return $node;
100 117 }
101 118  
  119 + public function isTimeTicksDefined()
  120 + {
  121 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
  122 + return isset($node);
  123 + }
  124 +
102 125 public function getTimeTicks()
103 126 {
104 127 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
... ... @@ -112,6 +135,12 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass
112 135 return $node;
113 136 }
114 137  
  138 + public function isIntervalTicksDefined()
  139 + {
  140 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
  141 + return isset($node);
  142 + }
  143 +
115 144 public function getIntervalTicks()
116 145 {
117 146 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
... ... @@ -134,6 +163,33 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass
134 163 {
135 164 return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_ID);
136 165 }
  166 +
  167 + public function loadFromNode($xmlNode)
  168 + {
  169 + $this->setYAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_YAXIS));
  170 + $this->setXAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_XAXIS));
  171 + $this->setColorSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID));
  172 + $this->setMin($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_MIN));
  173 + $this->setMax($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_MAX));
  174 +
  175 + $lineXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_LINE);
  176 + if (isset($lineXmlNode))
  177 + $this->getLine()->loadFromNode($lineXmlNode);
  178 +
  179 + $symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_SYMBOL);
  180 + if (isset($symbolXmlNode)) {
  181 + $this->getSymbol()->loadFromNode($symbolXmlNode);
  182 + }
  183 + $timeTicksXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_TIMETICKS);
  184 + if (isset($timeTicksXmlNode))
  185 + $this->getTimeTicks()->loadFromNode($timeTicksXmlNode);
  186 +
  187 + $intervalTicksXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTBASESERIE_INTERVALTICKS);
  188 + if (isset($intervalTicksXmlNode))
  189 + $this->getIntervalTicks()->loadFromNode($intervalTicksXmlNode);
  190 +
  191 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTBASESERIE_ID));
  192 + }
137 193 }
138 194  
139 195 ?>
140 196 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotColorAxisNodeClass.php
... ... @@ -46,6 +46,14 @@ class RequestOutputPlotColorAxisNodeClass extends RequestOutputPlotAxisElementNo
46 46 {
47 47 return $this->getAttribute(REQUESTOUTPUTPLOTCOLORAXIS_MAXVALCOLOR);
48 48 }
  49 +
  50 + public function loadFromNode($xmlNode)
  51 + {
  52 + $this->setColorMapIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCOLORAXIS_MAPINDEX));
  53 + $this->setMinValColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCOLORAXIS_MINVALCOLOR));
  54 + $this->setMaxValColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCOLORAXIS_MAXVALCOLOR));
  55 + parent::loadFromNode($xmlNode);
  56 + }
49 57 }
50 58  
51 59 ?>
52 60 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotConstantNodeClass.php
... ... @@ -35,6 +35,13 @@ class RequestOutputPlotConstantNodeClass extends RequestOutputPlotCurveNodeClass
35 35 {
36 36 return $this->getAttribute(REQUESTOUTPUTPLOTCONSTANT_ID);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + $this->setConstantValue($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCONSTANT_VALUE));
  42 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCONSTANT_ID));
  43 + parent::loadFromNode($xmlNode);
  44 + }
38 45 }
39 46  
40 47 ?>
41 48 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotCurveNodeClass.php
... ... @@ -53,6 +53,13 @@ class RequestOutputPlotCurveNodeClass extends NodeClass
53 53 {
54 54 return $this->getAttribute(REQUESTOUTPUTPLOTCURVE_COLOR);
55 55 }
  56 +
  57 + public function loadFromNode($xmlNode)
  58 + {
  59 + $this->setStyle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_STYLE));
  60 + $this->setWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_WIDTH));
  61 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVE_COLOR));
  62 + }
56 63 }
57 64  
58 65 ?>
59 66 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotCurveObjectNodeClass.php
... ... @@ -57,6 +57,18 @@ class RequestOutputPlotCurveObjectFunctionNodeClass extends NodeClass
57 57 $attributesNode->addChild($node);
58 58 return $node;
59 59 }
  60 +
  61 + public function loadFromNode($xmlNode)
  62 + {
  63 + $this->setFunctionName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_FUNCTIONNAME));
  64 +
  65 + $attributesXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTES);
  66 + if (isset($attributesXmlNode)) {
  67 + foreach ($this->getXmlNodeChildrenByTagName($attributesXmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTE) as $attributeXmlNode) {
  68 + $this->addAttribute($this->getXmlNodeAttribute($attributeXmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTENAME),$this->getXmlNodeAttribute($attributeXmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_ATTRIBUTEVALUE));
  69 + }
  70 + }
  71 + }
60 72 }
61 73  
62 74 /**
... ... @@ -81,6 +93,12 @@ class RequestOutputPlotCurveObjectNodeClass extends RequestOutputPlotCurveNodeCl
81 93 return $this->getAttribute(REQUESTOUTPUTPLOTCURVEOBJECT_SERIEID);
82 94 }
83 95  
  96 + public function isFunctionDefined()
  97 + {
  98 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_NAME);
  99 + return isset($node);
  100 + }
  101 +
84 102 public function getFunction()
85 103 {
86 104 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_NAME);
... ... @@ -93,6 +111,16 @@ class RequestOutputPlotCurveObjectNodeClass extends RequestOutputPlotCurveNodeCl
93 111  
94 112 return $node;
95 113 }
  114 +
  115 + public function loadFromNode($xmlNode)
  116 + {
  117 + $this->setSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTCURVEOBJECT_SERIEID));
  118 +
  119 + $functionXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTCURVEOBJECTFUNCTION_NAME);
  120 + if (isset($functionXmlNode))
  121 + $this->getFunction()->loadFromNode($functionXmlNode);
  122 + parent::loadFromNode($xmlNode);
  123 + }
96 124 }
97 125  
98 126 ?>
99 127 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotDigitalAxisNodeClass.php
... ... @@ -26,6 +26,12 @@ class RequestOutputPlotDigitalAxisNodeClass extends RequestOutputPlotAxisElement
26 26 {
27 27 return $this->getAttribute(REQUESTOUTPUTPLOTDIGITALAXIS_ID);
28 28 }
  29 +
  30 + public function loadFromNode($xmlNode)
  31 + {
  32 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTDIGITALAXIS_ID));
  33 + parent::loadFromNode($xmlNode);
  34 + }
29 35 }
30 36  
31 37 ?>
32 38 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementEpochNodeClass.php
... ... @@ -50,6 +50,12 @@ class RequestOutputPlotElementEpochNodeClass extends RequestOutputPlotElementNod
50 50 {
51 51 return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTEPOCH_CENTERTIMEID);
52 52 }
  53 +
  54 + public function loadFromNode($xmlNode)
  55 + {
  56 + $this->setCenterTimeId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTEPOCH_CENTERTIMEID));
  57 + parent::loadFromNode($xmlNode);
  58 + }
53 59 }
54 60  
55 61 ?>
56 62 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementInstantNodeClass.php
... ... @@ -50,6 +50,11 @@ class RequestOutputPlotElementInstantNodeClass extends RequestOutputPlotElementN
50 50 {
51 51 return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTINSTANT_TIME);
52 52 }
  53 +
  54 + public function loadFromNode($xmlNode)
  55 + {
  56 + parent::loadFromNode($xmlNode);
  57 + }
53 58 }
54 59  
55 60 ?>
56 61 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementNodeClass.php
... ... @@ -3,8 +3,8 @@
3 3 require_once("RequestOutputPlotLegendsNodeClass.php");
4 4 require_once("RequestOutputPlotParamsNodeClass.php");
5 5 require_once("RequestOutputPlotAxesNodeClass.php");
6   -//require_once("RequestOutputPlotAdditionalObjectsNodeClass.php");
7   -//require_once("RequestOutputPlotFillsNodeClass.php");
  6 +require_once("RequestOutputPlotAdditionalObjectsNodeClass.php");
  7 +require_once("RequestOutputPlotFillsNodeClass.php");
8 8  
9 9 define ("REQUESTOUTPUTPLOTLEGENDS_NAME", "legends");
10 10  
... ... @@ -81,6 +81,29 @@ class RequestOutputPlotElementNodeClass extends NodeClass
81 81 $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTFILLS_NAME);
82 82 return $node;
83 83 }
  84 +
  85 + public function loadFromNode($xmlNode)
  86 + {
  87 + $legendXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTLEGENDS_NAME);
  88 + if (isset($legendXmlNode))
  89 + $this->getLegends()->loadFromNode($legendXmlNode);
  90 +
  91 + $paramsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPARAMS_NAME);
  92 + if (isset($paramsXmlNode))
  93 + $this->getParams()->loadFromNode($paramsXmlNode);
  94 +
  95 + $axesXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTAXES_NAME);
  96 + if (isset($axesXmlNode))
  97 + $this->getAxes()->loadFromNode($axesXmlNode);
  98 +
  99 + $additionalObjXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTADDITIONALOBJECTS_NAME);
  100 + if (isset($additionalObjXmlNode))
  101 + $this->getAdditionalObjects()->loadFromNode($additionalObjXmlNode);
  102 +
  103 + $fillsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFILLS_NAME);
  104 + if (isset($fillsXmlNode))
  105 + $this->getFills()->loadFromNode($fillsXmlNode);
  106 + }
84 107 }
85 108  
86 109 ?>
87 110 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementStatusNodeClass.php
... ... @@ -53,6 +53,13 @@ class RequestOutputPlotElementStatusNodeClass extends RequestOutputPlotElementNo
53 53 {
54 54 return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP);
55 55 }
  56 +
  57 + public function loadFromNode($xmlNode)
  58 + {
  59 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTSTATUS_POSITION));
  60 + $this->setColorMap($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTSTATUS_COLORMAP));
  61 + parent::loadFromNode($xmlNode);
  62 + }
56 63 }
57 64  
58 65 ?>
59 66 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementTickNodeClass.php
... ... @@ -36,6 +36,12 @@ class RequestOutputPlotElementTickNodeClass extends RequestOutputPlotElementNode
36 36 {
37 37 return $this->getAttribute(REQUESTOUTPUTPLOTELEMENTTICK_FORMAT);
38 38 }
  39 +
  40 + public function loadFromNode($xmlNode)
  41 + {
  42 + $this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTTICK_FORMAT));
  43 + parent::loadFromNode($xmlNode);
  44 + }
39 45 }
40 46  
41 47 ?>
42 48 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementTimeNodeClass.php
... ... @@ -39,6 +39,11 @@ class RequestOutputPlotElementTimeNodeClass extends RequestOutputPlotElementNode
39 39 {
40 40 return $this->getAxes()->getColorAxis();
41 41 }
  42 +
  43 + public function loadFromNode($xmlNode)
  44 + {
  45 + parent::loadFromNode($xmlNode);
  46 + }
42 47 }
43 48  
44 49 ?>
45 50 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotElementXYNodeClass.php
... ... @@ -56,6 +56,12 @@ class RequestOutputPlotElementXYNodeClass extends RequestOutputPlotElementNodeCl
56 56 {
57 57 return $this->getAxes()->getColorAxis();
58 58 }
  59 +
  60 + public function loadFromNode($xmlNode)
  61 + {
  62 + $this->setIsIsotropic($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTELEMENTXY_ISOTROPIC) == "true");
  63 + parent::loadFromNode($xmlNode);
  64 + }
59 65 }
60 66  
61 67 ?>
62 68 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotEpochAxisNodeClass.php
... ... @@ -26,6 +26,12 @@ class RequestOutputPlotEpochAxisNodeClass extends RequestOutputPlotAxisElementNo
26 26 {
27 27 return $this->getAttribute(REQUESTOUTPUTPLOTEPOCHAXIS_NORMALIZED);
28 28 }
  29 +
  30 + public function loadFromNode($xmlNode)
  31 + {
  32 + $this->setNormalized($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTEPOCHAXIS_NORMALIZED));
  33 + parent::loadFromNode($xmlNode);
  34 + }
29 35 }
30 36  
31 37 ?>
32 38 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotFillNodeClass.php
... ... @@ -34,6 +34,12 @@ class RequestOutputPlotFillNodeClass extends NodeClass
34 34 {
35 35 return $this->getAttribute(REQUESTOUTPUTPLOTFILL_LESSCOLOR);
36 36 }
  37 +
  38 + public function loadFromNode($xmlNode)
  39 + {
  40 + $this->setGreaterColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILL_GREATERCOLOR));
  41 + $this->setLessColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILL_LESSCOLOR));
  42 + }
37 43 }
38 44  
39 45 ?>
40 46 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotFillSerieConstantNodeClass.php
... ... @@ -35,6 +35,13 @@ class RequestOutputPlotFillSerieConstantNodeClass extends RequestOutputPlotFillN
35 35 {
36 36 return $this->getAttribute(REQUESTOUTPUTPLOTFILLSERIECONSTANT_CONSTANTID);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + $this->setSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILLSERIECONSTANT_SERIEID));
  42 + $this->setConstantId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILLSERIECONSTANT_CONSTANTID));
  43 + parent::loadFromNode($xmlNode);
  44 + }
38 45 }
39 46  
40 47 ?>
41 48 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotFillSerieSerieNodeClass.php
... ... @@ -35,6 +35,13 @@ class RequestOutputPlotFillSerieSerieNodeClass extends RequestOutputPlotFillNode
35 35 {
36 36 return $this->getAttribute(REQUESTOUTPUTPLOTFILLSERIESERIE_SECONDSERIEID);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + $this->setFirstSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILLSERIESERIE_FIRSTSERIEID));
  42 + $this->setSecondSerieId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFILLSERIESERIE_SECONDSERIEID));
  43 + parent::loadFromNode($xmlNode);
  44 + }
38 45 }
39 46  
40 47 ?>
41 48 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotFillsNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotFillSerieConstantNodeClass.php";
  4 +require_once "RequestOutputPlotFillSerieSerieNodeClass.php";
  5 +
3 6 define ("REQUESTOUTPUTPLOTFILLS_NAME", "fills");
4 7  
5 8 abstract class RequestOutputPlotFillTypeEnum
... ... @@ -36,6 +39,17 @@ class RequestOutputPlotFillsNodeClass extends NodeClass
36 39 $this->addChild($node);
37 40 return $node;
38 41 }
  42 +
  43 + public function loadFromNode($xmlNode)
  44 + {
  45 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTFILLSERIECONSTANT_NAME) as $fillserieconstantXmlNode) {
  46 + $this->addFill(RequestOutputPlotFillTypeEnum::SERIECONSTANT)->loadFromNode($fillserieconstantXmlNode);
  47 + }
  48 +
  49 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTFILLSERIESERIE_NAME) as $fillserieserieXmlNode) {
  50 + $this->addFill(RequestOutputPlotFillTypeEnum::SERIESERIE)->loadFromNode($fillserieserieXmlNode);
  51 + }
  52 + }
39 53 }
40 54  
41 55 ?>
42 56 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotFontNodeClass.php
... ... @@ -72,6 +72,14 @@ class RequestOutputPlotFontNodeClass extends NodeClass
72 72 {
73 73 return $this->getAttribute(REQUESTOUTPUTPLOTFONT_WEIGHT);
74 74 }
  75 +
  76 + public function loadFromNode($xmlNode)
  77 + {
  78 + $this->setFontName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFONT_NAME));
  79 + $this->setSize($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFONT_SIZE));
  80 + $this->setStyle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFONT_STYLE));
  81 + $this->setWeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTFONT_WEIGHT));
  82 + }
75 83 }
76 84  
77 85 ?>
78 86 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotInstantSerieNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotLineNodeClass.php";
  4 +require_once "RequestOutputPlotSymbolNodeClass.php";
  5 +
3 6 define ("REQUESTOUTPUTPLOTINSTANTSERIE_NAME", "iserie");
4 7  
5 8 define ("REQUESTOUTPUTPLOTINSTANTSERIE_YAXIS", "yAxis");
... ... @@ -75,6 +78,21 @@ class RequestOutputPlotInstantSerieNodeClass extends NodeClass
75 78  
76 79 return $node;
77 80 }
  81 +
  82 + public function loadFromNode($xmlNode)
  83 + {
  84 + $this->setYAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTINSTANTSERIE_YAXIS));
  85 + $this->setXAxisId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTINSTANTSERIE_XAXIS));
  86 + $this->setTableOnXAxis($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTINSTANTSERIE_TABLEONXAXIS));
  87 +
  88 + $lineXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTINSTANTSERIE_LINE);
  89 + if (isset($lineXmlNode))
  90 + $this->getLine()->loadFromNode($lineXmlNode);
  91 +
  92 + $symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTINSTANTSERIE_SYMBOL);
  93 + if (isset($symbolXmlNode))
  94 + $this->getSymbol()->loadFromNode($symbolXmlNode);
  95 + }
78 96 }
79 97  
80 98 ?>
81 99 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLabelNodeClass.php
... ... @@ -67,6 +67,15 @@ class RequestOutputPlotLabelNodeClass extends NodeClass
67 67 {
68 68 return $this->getAttribute(REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX);
69 69 }
  70 +
  71 + public function loadFromNode($xmlNode)
  72 + {
  73 + $this->setFontName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTNAME));
  74 + $this->setFontSize($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_FONTSIZE));
  75 + $this->setFontStyle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_STYLE));
  76 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_COLOR));
  77 + $this->setColorMapIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLABEL_COLORMAPINDEX));
  78 + }
70 79 }
71 80  
72 81 ?>
73 82 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLayoutNodeClass.php
... ... @@ -75,6 +75,15 @@ class RequestOutputPlotLayoutNodeClass extends NodeClass
75 75 {
76 76 return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_EXPAND);
77 77 }
  78 +
  79 + public function loadFromNode($xmlNode)
  80 + {
  81 + $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_TYPE));
  82 + $this->setPanelHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT));
  83 + $this->setPanelSpacing($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_PANELSPACING));
  84 + $this->setFirstPanelHeightFactor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR));
  85 + $this->setExpand($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_EXPAND));
  86 + }
78 87 }
79 88 ?>
80 89  
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLegendsNodeClass.php
... ... @@ -33,6 +33,13 @@ class RequestOutputPlotLegendsNodeClass extends NodeClass
33 33 $this->addChild($node);
34 34 return $node;
35 35 }
  36 +
  37 + public function loadFromNode($xmlNode)
  38 + {
  39 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_NAME) as $paramsLegendXmlNode) {
  40 + $this->addTextLegend()->loadFromNode($paramsLegendXmlNode);
  41 + }
  42 + }
36 43 }
37 44  
38 45 ?>
39 46 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLineNodeClass.php
... ... @@ -29,6 +29,12 @@ class RequestOutputPlotLineNodeClass extends RequestOutputPlotCurveNodeClass
29 29 {
30 30 $this->getAttribute(REQUESTOUTPUTPLOTLINE_TYPE);
31 31 }
  32 +
  33 + public function loadFromNode($xmlNode)
  34 + {
  35 + $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLINE_TYPE));
  36 + parent::loadFromNode($xmlNode);
  37 + }
32 38 }
33 39  
34 40 ?>
35 41 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotMarginsNodeClass.php
... ... @@ -37,6 +37,12 @@ class RequestOutputPlotMarginsNodeClass extends NodeClass
37 37 {
38 38 return $this->getAttribute(REQUESTOUTPUTPLOTMARGINS_VERTIVAL);
39 39 }
  40 +
  41 + public function loadFromNode($xmlNode)
  42 + {
  43 + $this->setHorizontal($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTMARGINS_HORIZONTAL));
  44 + $this->setVertical($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTMARGINS_VERTIVAL));
  45 + }
40 46 }
41 47  
42 48 ?>
43 49 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotNodeClass.php
... ... @@ -77,7 +77,7 @@ class RequestOutputPlotNodeClass extends NodeClass
77 77 return $node;
78 78 }
79 79  
80   - public function addPostProcessing($process)
  80 + public function addPostProcessing($process = "")
81 81 {
82 82 $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME);
83 83 if ($node == NULL)
... ... @@ -86,7 +86,10 @@ class RequestOutputPlotNodeClass extends NodeClass
86 86 $this->addChild($node);
87 87 }
88 88  
89   - $node->addPostProcessing($process);
  89 + if ($process == "")
  90 + $node->addPostProcessing($process);
  91 +
  92 + return $node;
90 93 }
91 94  
92 95 public function isPostProcessing($process)
... ... @@ -98,6 +101,27 @@ class RequestOutputPlotNodeClass extends NodeClass
98 101  
99 102 return $node->isPostProcessing($process);
100 103 }
  104 +
  105 + public function loadFromNode($xmlNode)
  106 + {
  107 + $structureXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOT_STRUCTURE);
  108 + if (isset($structureXmlNode))
  109 + $this->setStructure($this->getXmlNodeValue($structureXmlNode));
  110 +
  111 + $this->setWriteContextFile($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOT_WRITECONTEXTFILE));
  112 +
  113 + $fileprefixXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOT_FILEPREFIX);
  114 + if (isset($fileprefixXmlNode))
  115 + $this->setFilePrefix($this->getXmlNodeValue($fileprefixXmlNode));
  116 +
  117 + $pageXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPAGE_NAME);
  118 + if (isset($pageXmlNode))
  119 + $this->getPage()->loadFromNode($pageXmlNode);
  120 +
  121 + $postprocessingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPOSTPROCESSING_NAME);
  122 + if (isset($postprocessingXmlNode))
  123 + $this->addPostProcessing()->loadFromNode($postprocessingXmlNode);
  124 + }
101 125 }
102 126  
103 127 ?>
104 128 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotOrbitSerieNodeClass.php
... ... @@ -35,6 +35,12 @@ class RequestOutputPlotOrbitSerieNodeClass extends RequestOutputPlotBaseSerieNod
35 35 {
36 36 return $this->getAttribute(REQUESTOUTPUTPLOTORBITSERIE_PROJECTION);
37 37 }
  38 +
  39 + public function loadFromNode($xmlNode)
  40 + {
  41 + $this->setProjection($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTORBITSERIE_PROJECTION));
  42 + parent::loadFromNode($xmlNode);
  43 + }
38 44 }
39 45  
40 46 ?>
41 47 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPageNodeClass.php
... ... @@ -223,6 +223,40 @@ class RequestOutputPlotPageNodeClass extends NodeClass
223 223 {
224 224 $this->setAttribute(REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTXMARGIN, "[".$left.",".$right."]");
225 225 }
  226 +
  227 + public function loadFromNode($xmlNode)
  228 + {
  229 + $titleXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPAGE_TITLE);
  230 + if (isset($titleXmlNode))
  231 + $this->getTitle()->loadFromNode($titleXmlNode);
  232 +
  233 + $marginsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTMARGINS_NAME);
  234 + if (isset($marginsXmlNode))
  235 + $this->getMargins()->loadFromNode($marginsXmlNode);
  236 +
  237 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
  238 + if (isset($fontXmlNode))
  239 + $this->getFont()->loadFromNode($fontXmlNode);
  240 +
  241 + $layoutXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTLAYOUT_NAME);
  242 + if (isset($layoutXmlNode))
  243 + $this->getLayout()->loadFromNode($layoutXmlNode);
  244 +
  245 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTPANEL_NAME) as $panelXmlNode) {
  246 + $this->addPanel()->loadFromNode($panelXmlNode);
  247 + }
  248 +
  249 + $this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_FORMAT));
  250 + $this->setDimension($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DIMENSION));
  251 + $this->setOrientation($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_ORIENTATION));
  252 + $this->setMode($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_MODE));
  253 + $this->setSuperposeMode($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_SUPERPOSEMODE));
  254 + $this->setDefaultTimePlotWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTWIDTH));
  255 + $this->setDefaultTimePlotHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTHEIGHT));
  256 + $this->setDefaultXYPlotWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTWIDTH));
  257 + $this->setDefaultXYPlotHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTXYPLOTHEIGHT));
  258 + $this->setDefaultTimePlotXMargin($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPAGE_DEFAULTTIMEPLOTXMARGIN));
  259 + }
226 260 }
227 261  
228 262 ?>
229 263 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPanelBoundsNodeClass.php
... ... @@ -57,6 +57,14 @@ class RequestOutputPlotPanelBoundsNodeClass extends NodeClass
57 57 {
58 58 return $this->getAttribute(REQUESTOUTPUTPLOTPANELBOUNDS_HEIGHT);
59 59 }
  60 +
  61 + public function loadFromNode($xmlNode)
  62 + {
  63 + $this->setX($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANELBOUNDS_X));
  64 + $this->setY($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANELBOUNDS_Y));
  65 + $this->setWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANELBOUNDS_WIDTH));
  66 + $this->setHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANELBOUNDS_HEIGHT));
  67 + }
60 68 }
61 69  
62 70 ?>
63 71 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPanelNodeClass.php
... ... @@ -4,6 +4,8 @@ require_once(&quot;RequestOutputPlotElementTimeNodeClass.php&quot;);
4 4 require_once("RequestOutputPlotElementXYNodeClass.php");
5 5 require_once("RequestOutputPlotElementStatusNodeClass.php");
6 6 require_once("RequestOutputPlotElementTickNodeClass.php");
  7 +require_once "RequestOutputPlotElementEpochNodeClass.php";
  8 +require_once "RequestOutputPlotElementInstantNodeClass.php";
7 9  
8 10 define ("REQUESTOUTPUTPLOTPANEL_NAME", "panel");
9 11 define ("REQUESTOUTPUTPLOTPANEL_TITLE", "title");
... ... @@ -138,6 +140,11 @@ class RequestOutputPlotPanelNodeClass extends NodeClass
138 140 $this->setAttribute(REQUESTOUTPUTPLOTPANEL_XMARGIN, "[".$left.",".$right."]");
139 141 }
140 142  
  143 + public function setXMargin2($margin)
  144 + {
  145 + $this->setAttribute(REQUESTOUTPUTPLOTPANEL_XMARGIN, $margin);
  146 + }
  147 +
141 148 public function setId($id)
142 149 {
143 150 $this->setAttribute(REQUESTOUTPUTPLOTPANEL_ID, $id);
... ... @@ -148,6 +155,55 @@ class RequestOutputPlotPanelNodeClass extends NodeClass
148 155 return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_ID);
149 156 }
150 157  
  158 + public function loadFromNode($xmlNode)
  159 + {
  160 + $this->setBackgroundColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_BACKGROUNDCOLOR));
  161 +
  162 + $boundsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPANELBOUNDS_NAME);
  163 + if (isset($boundsXmlNode))
  164 + $this->getBounds()->loadFromNode($boundsXmlNode);
  165 +
  166 + $boundsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
  167 + if (isset($boundsXmlNode))
  168 + $this->getBounds()->loadFromNode($boundsXmlNode);
  169 +
  170 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
  171 + if (isset($fontXmlNode))
  172 + $this->getFont()->loadFromNode($fontXmlNode);
  173 +
  174 + $titleXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPANEL_TITLE);
  175 + if (isset($titleXmlNode))
  176 + $this->getTitle()->loadFromNode($titleXmlNode);
  177 +
  178 + $timePlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTTIME_NAME);
  179 + if (isset($timePlotXmlNode))
  180 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::TIMEPLOT)->loadFromNode($timePlotXmlNode);
  181 +
  182 + $xyPlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTXY_NAME);
  183 + if (isset($xyPlotXmlNode))
  184 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::XYPLOT)->loadFromNode($xyPlotXmlNode);
  185 +
  186 + $statusPlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTSTATUS_NAME);
  187 + if (isset($statusPlotXmlNode))
  188 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::STATUSPLOT)->loadFromNode($statusPlotXmlNode);
  189 +
  190 + $tickPlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTTICK_NAME);
  191 + if (isset($tickPlotXmlNode))
  192 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::TICKPLOT)->loadFromNode($tickPlotXmlNode);
  193 +
  194 + $epochPlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTEPOCH_NAME);
  195 + if (isset($epochPlotXmlNode))
  196 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::EPOCHPLOT)->loadFromNode($epochPlotXmlNode);
  197 +
  198 + $instantPlotXmlNode = $this->getXmlNodeChildByTagName($xmlNode,REQUESTOUTPUTPLOTELEMENTINSTANT_NAME);
  199 + if (isset($instantPlotXmlNode))
  200 + $this->addPlotElement(RequestOutputPlotElementTypeEnum::INSTANTPLOT)->loadFromNode($instantPlotXmlNode);
  201 +
  202 + $this->setPreferedWidth($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_PREFEREDWIDTH));
  203 + $this->setPreferedHeight($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_PREFEREDHEIGHT));
  204 + $this->setXMargin2($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_XMARGIN));
  205 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_ID));
  206 + }
151 207 }
152 208  
153 209 ?>
154 210 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsLegendNodeClass.php
... ... @@ -132,6 +132,22 @@ class RequestOutputPlotParamsLegendNodeClass extends NodeClass
132 132  
133 133 return $node;
134 134 }
  135 +
  136 + public function loadFromNode($xmlNode)
  137 + {
  138 + $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_TYPE));
  139 + $this->setShowParamInfo($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_SHOWPARAMINFO));
  140 + $this->setShowIntervalInfo($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_SHOWINTERVALINFO));
  141 + $this->setIntervalInfoType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_INTERVALINFOTYPE));
  142 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_POSITION));
  143 + $this->setDefaultTextColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_DEFAULTTEXTCOLOR));
  144 + $this->setBorderVisible($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_BORDERVISIBLE));
  145 + $this->setBorderColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_BORDERCOLOR));
  146 +
  147 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_FONT);
  148 + if (isset($fontXmlNode))
  149 + $this->getFont()->loadFromNode($fontXmlNode);
  150 + }
135 151 }
136 152  
137 153 ?>
138 154 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
1 1 <?php
2 2  
3 3 require_once("RequestOutputPlotYSerieNodeClass.php");
  4 +require_once "RequestOutputPlotOrbitSerieNodeClass.php";
  5 +require_once "RequestOutputPlotInstantSerieNodeClass.php";
4 6  
5 7 define ("REQUESTOUTPUTPLOTPARAMS_NAME", "params");
6 8  
... ... @@ -45,6 +47,11 @@ class RequestOutputPlotParamNodeClass extends NodeClass
45 47 {
46 48 return $this->getAttribute(REQUESTOUTPUTPLOTPARAM_ID);
47 49 }
  50 +
  51 + public function setId($id)
  52 + {
  53 + $this->setAttribute(REQUESTOUTPUTPLOTPARAM_ID,$id);
  54 + }
48 55  
49 56 public function addYSerie($yAxis, $index, $xAxis = "", $colorSerieId = -1, $min = NULL, $max = NULL)
50 57 {
... ... @@ -88,7 +95,7 @@ class RequestOutputPlotParamNodeClass extends NodeClass
88 95 return $iserieNode;
89 96 }
90 97  
91   - public function addSpectro($yAxis, $min = NULL, $max = NULL)
  98 + public function addSpectro($yAxis = "", $min = NULL, $max = NULL)
92 99 {
93 100 $spectroNode = new NodeClass(REQUESTOUTPUTPLOTSPECTRO_NAME);
94 101 $spectroNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS, $yAxis);
... ... @@ -100,7 +107,7 @@ class RequestOutputPlotParamNodeClass extends NodeClass
100 107 return $spectroNode;
101 108 }
102 109  
103   - public function addXSerie($xAxis, $index, $min = NULL, $max = NULL)
  110 + public function addXSerie($xAxis = "", $index = -1, $min = NULL, $max = NULL)
104 111 {
105 112 $xSerieNode = new NodeClass(REQUESTOUTPUTPLOTXSERIE_NAME);
106 113 $xSerieNode->setAttribute(REQUESTOUTPUTPLOTXSERIE_XAXIS, $xAxis);
... ... @@ -114,7 +121,7 @@ class RequestOutputPlotParamNodeClass extends NodeClass
114 121 return $xSerieNode;
115 122 }
116 123  
117   - public function addColorSerie($id, $index)
  124 + public function addColorSerie($id = "", $index = -1)
118 125 {
119 126 $colorSerieNode = new NodeClass(REQUESTOUTPUTPLOTCOLORSERIE_NAME);
120 127 $colorSerieNode->setAttribute(REQUESTOUTPUTPLOTCOLORSERIE_ID, $id);
... ... @@ -141,6 +148,70 @@ class RequestOutputPlotParamNodeClass extends NodeClass
141 148 $this->addChild($tickBarNode);
142 149 return $tickBarNode;
143 150 }
  151 +
  152 + public function loadFromNode($xmlNode)
  153 + {
  154 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPARAM_ID));
  155 +
  156 + foreach ($this->getXmlNodeChildren($xmlNode) as $plottypeXmlNode) {
  157 + $node = NULL;
  158 + switch ($this->getXmlNodeName($plottypeXmlNode)) {
  159 + case REQUESTOUTPUTPLOTYSERIE_XYPLOT_NAME :
  160 + $node = new RequestOutputPlotYSerieNodeClass(REQUESTOUTPUTPLOTYSERIE_XYPLOT_NAME);
  161 + break;
  162 + case REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME :
  163 + $node = new RequestOutputPlotYSerieNodeClass(REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME);
  164 + break;
  165 + case REQUESTOUTPUTPLOTORBITSERIE_NAME :
  166 + $node = new RequestOutputPlotOrbitSerieNodeClass();
  167 + break;
  168 + case REQUESTOUTPUTPLOTINSTANTSERIE_NAME :
  169 + $node = new RequestOutputPlotInstantSerieNodeClass();
  170 + break;
  171 + case REQUESTOUTPUTPLOTSPECTRO_NAME :
  172 + $yAxis = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_YAXIS);
  173 + $min = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_MIN);
  174 + $max = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_MAX);
  175 + $node = $this->addSpectro($yAxis, $min, $max);
  176 + break;
  177 + case REQUESTOUTPUTPLOTXSERIE_NAME :
  178 + $xAxis = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_XAXIS);
  179 + $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_INDEX);
  180 + if (empty($index))
  181 + $index = -1;
  182 + $min = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_MIN);
  183 + $max = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_MAX);
  184 + $node = $this->addXSerie($xAxis, $index, $min, $max);
  185 + break;
  186 + case REQUESTOUTPUTPLOTCOLORSERIE_NAME :
  187 + $id = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTCOLORSERIE_ID);
  188 + $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTCOLORSERIE_INDEX);
  189 + if (empty($index))
  190 + $index = -1;
  191 + $node = $this->addColorSerie($id, $index);
  192 + break;
  193 + case REQUESTOUTPUTPLOTSTATUSBAR_NAME :
  194 + $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSTATUSBAR_INDEX);
  195 + if (empty($index))
  196 + $index = -1;
  197 + $node = $this->addStatusBar($index);
  198 + break;
  199 + case REQUESTOUTPUTPLOTTICKBAR_NAME :
  200 + $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTTICKBAR_INDEX);
  201 + if (empty($index))
  202 + $index = -1;
  203 + $node = $this->addTickBar($index);
  204 + break;
  205 + default:
  206 +
  207 + }
  208 +
  209 + if (isset($node)) {
  210 + $node->loadFromNode($plottypeXmlNode);
  211 + $this->addChild($node);
  212 + }
  213 + }
  214 + }
144 215 }
145 216  
146 217 /**
... ... @@ -155,7 +226,7 @@ class RequestOutputPlotParamsNodeClass extends NodeClass
155 226 parent::__construct(REQUESTOUTPUTPLOTPARAMS_NAME);
156 227 }
157 228  
158   - public function getParamById($id)
  229 + public function getParamById($id = "")
159 230 {
160 231 $paramNodes = $this->getChildrenByName(REQUESTOUTPUTPLOTPARAM_NAME);
161 232 foreach ($paramNodes as $paramNode)
... ... @@ -166,6 +237,13 @@ class RequestOutputPlotParamsNodeClass extends NodeClass
166 237 $this->addChild($paramNode);
167 238 return $paramNode;
168 239 }
  240 +
  241 + public function loadFromNode($xmlNode)
  242 + {
  243 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTPLOTPARAM_NAME) as $paramXmlNode) {
  244 + $this->getParamById()->loadFromNode($paramXmlNode);
  245 + }
  246 + }
169 247 }
170 248  
171 249 ?>
172 250 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotResamplingNodeClass.php
... ... @@ -42,6 +42,12 @@ class RequestOutputPlotResamplingNodeClass extends NodeClass
42 42 {
43 43 $this->getAttribute(REQUESTOUTPUTPLOTRESAMPLING_VALUE);
44 44 }
  45 +
  46 + public function loadFromNode($xmlNode)
  47 + {
  48 + $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTRESAMPLING_TYPE));
  49 + $this->setValue($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTRESAMPLING_VALUE));
  50 + }
45 51 }
46 52  
47 53 ?>
48 54 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotSerieIntervalTicksNodeClass.php
... ... @@ -44,6 +44,12 @@ class RequestOutputPlotSerieIntervalTicksNodeClass extends NodeClass
44 44 return $this->getAttribute(REQUESTOUTPUTPLOTSERIEINTERVALTICKS_COLOR);
45 45 }
46 46  
  47 + public function isSymbolDefined()
  48 + {
  49 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIEINTERVALTICKS_SYMBOL);
  50 + return isset($node);
  51 + }
  52 +
47 53 public function getSymbol()
48 54 {
49 55 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIEINTERVALTICKS_SYMBOL);
... ... @@ -57,6 +63,12 @@ class RequestOutputPlotSerieIntervalTicksNodeClass extends NodeClass
57 63 return $node;
58 64 }
59 65  
  66 + public function isFontDefined()
  67 + {
  68 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
  69 + return isset($node);
  70 + }
  71 +
60 72 public function getFont()
61 73 {
62 74 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
... ... @@ -69,6 +81,20 @@ class RequestOutputPlotSerieIntervalTicksNodeClass extends NodeClass
69 81  
70 82 return $node;
71 83 }
  84 +
  85 + public function loadFromNode($xmlNode)
  86 + {
  87 + $this->setMode($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIEINTERVALTICKS_MODE));
  88 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIEINTERVALTICKS_COLOR));
  89 +
  90 + $symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIEINTERVALTICKS_SYMBOL);
  91 + if (isset($symbolXmlNode))
  92 + $this->getSymbol()->loadFromNode($symbolXmlNode);
  93 +
  94 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
  95 + if (isset($fontXmlNode))
  96 + $this->getFont()->loadFromNode($fontXmlNode);
  97 + }
72 98 }
73 99  
74 100 ?>
75 101 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotSerieTimeTicksNodeClass.php
... ... @@ -19,6 +19,12 @@ class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
19 19 parent::__construct($name);
20 20 }
21 21  
  22 + public function isSymbolDefined()
  23 + {
  24 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
  25 + return isset($node);
  26 + }
  27 +
22 28 public function getSymbol()
23 29 {
24 30 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
... ... @@ -32,6 +38,12 @@ class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
32 38 return $node;
33 39 }
34 40  
  41 + public function isFirstSymbolDefined()
  42 + {
  43 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
  44 + return isset($node);
  45 + }
  46 +
35 47 public function getFirstSymbol()
36 48 {
37 49 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
... ... @@ -45,6 +57,12 @@ class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
45 57 return $node;
46 58 }
47 59  
  60 + public function isFontDefined()
  61 + {
  62 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
  63 + return isset($node);
  64 + }
  65 +
48 66 public function getFont()
49 67 {
50 68 $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTFONT_NODENAME);
... ... @@ -97,6 +115,26 @@ class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
97 115 {
98 116 return $this->getAttribute(REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR);
99 117 }
  118 +
  119 + public function loadFromNode($xmlNode)
  120 + {
  121 + $symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_SYMBOL);
  122 + if (isset($symbolXmlNode))
  123 + $this->getSymbol()->loadFromNode($symbolXmlNode);
  124 +
  125 + $firstsymbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
  126 + if (isset($firstsymbolXmlNode))
  127 + $this->getFirstSymbol()->loadFromNode($firstsymbolXmlNode);
  128 +
  129 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
  130 + if (isset($fontXmlNode))
  131 + $this->getFont()->loadFromNode($fontXmlNode);
  132 +
  133 + $this->setStep($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_STEP));
  134 + $this->setNumber($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_NUMBER));
  135 + $this->setMinor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_MINOR));
  136 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_COLOR));
  137 + }
100 138 }
101 139  
102 140 ?>
103 141 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotSymbolNodeClass.php
... ... @@ -65,6 +65,13 @@ class RequestOutputPlotSymbolNodeClass extends NodeClass
65 65 {
66 66 return $this->getAttribute(REQUESTOUTPUTPLOTSYMBOL_COLOR);
67 67 }
  68 +
  69 + public function loadFromNode($xmlNode)
  70 + {
  71 + $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSYMBOL_TYPE));
  72 + $this->setSize($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSYMBOL_SIZE));
  73 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTSYMBOL_COLOR));
  74 + }
68 75 }
69 76  
70 77 ?>
71 78 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotTextLegendNodeClass.php
... ... @@ -67,6 +67,17 @@ class RequestOutputPlotTextLegendNodeClass extends NodeClass
67 67  
68 68 return $node;
69 69 }
  70 +
  71 + public function loadFromNode($xmlNode)
  72 + {
  73 + $this->setText($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXTLEGEND_TEXT));
  74 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXTLEGEND_POSITION));
  75 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXTLEGEND_COLOR));
  76 +
  77 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPARAMSLEGEND_FONT);
  78 + if (isset($fontXmlNode))
  79 + $this->getFont()->loadFromNode($fontXmlNode);
  80 + }
70 81 }
71 82  
72 83 ?>
73 84 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotTextNodeClass.php
... ... @@ -111,6 +111,21 @@ class RequestOutputPlotTextNodeClass extends NodeClass
111 111  
112 112 return $node;
113 113 }
  114 +
  115 + public function loadFromNode($xmlNode)
  116 + {
  117 + $this->setText($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_TEXT));
  118 + $this->setYAxis($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_YAXIS));
  119 + $this->setX($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_X));
  120 + $this->setY($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_Y));
  121 + $this->setAngle($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_ANGLE));
  122 + $this->setColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_COLOR));
  123 + $this->setAlign($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTEXT_ALIGN));
  124 +
  125 + $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTTEXT_FONT);
  126 + if (isset($fontXmlNode))
  127 + $this->getFont()->loadFromNode($fontXmlNode);
  128 + }
114 129 }
115 130  
116 131 ?>
117 132 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotTimeAxisNodeClass.php
... ... @@ -26,6 +26,12 @@ class RequestOutputPlotTimeAxisNodeClass extends RequestOutputPlotAxisElementNod
26 26 {
27 27 return $this->getAttribute(REQUESTOUTPUTPLOTTIMEAXIS_FORMAT);
28 28 }
  29 +
  30 + public function loadFromNode($xmlNode)
  31 + {
  32 + $this->setFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTIMEAXIS_FORMAT));
  33 + parent::loadFromNode($xmlNode);
  34 + }
29 35 }
30 36  
31 37 ?>
32 38 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotTitleNodeClass.php
... ... @@ -59,6 +59,14 @@ class RequestOutputPlotTitleNodeClass extends RequestOutputPlotLabelNodeClass
59 59 {
60 60 return $this->getAttribute(REQUESTOUTPUTPLOTTITLE_ALIGN);
61 61 }
  62 +
  63 + public function loadFromNode($xmlNode)
  64 + {
  65 + $this->setText($this->getXmlNodeValue($xmlNode));
  66 + $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTITLE_POSITION));
  67 + $this->setAlign($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTTITLE_ALIGN));
  68 + parent::loadFromNode($xmlNode);
  69 + }
62 70 }
63 71  
64 72 ?>
65 73 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotYSerieErrorBarNodeClass.php
... ... @@ -43,6 +43,12 @@ class RequestOutputPlotYSerieErrorBarMinMaxNodeClass extends NodeClass
43 43 if ($index != -1)
44 44 $this->setAttribute(REQUESTOUTPUTPLOTYSERIEERRORBARMINMAX_MAXPARAMINDEX, $index);
45 45 }
  46 +
  47 + public function loadFromNode($xmlNode)
  48 + {
  49 + $this->setMinParam($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIEERRORBARMINMAX_MINPARAM), $this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIEERRORBARMINMAX_MINPARAMINDEX));
  50 + $this->setMaxParam($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIEERRORBARMINMAX_MAXPARAM), $this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIEERRORBARMINMAX_MAXPARAMINDEX));
  51 + }
46 52 }
47 53  
48 54 /**
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotYSerieNodeClass.php
1 1 <?php
2 2  
  3 +require_once "RequestOutputPlotResamplingNodeClass.php";
  4 +require_once "RequestOutputPlotYSerieErrorBarNodeClass.php";
  5 +
3 6 define ("REQUESTOUTPUTPLOTYSERIE_XYPLOT_NAME", "yserie");
4 7 define ("REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME", "serie");
5 8  
... ... @@ -54,6 +57,21 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla
54 57  
55 58 return $node;
56 59 }
  60 +
  61 + public function loadFromNode($xmlNode)
  62 + {
  63 + $this->setIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIE_INDEX));
  64 +
  65 + $resamplingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTYSERIE_RESAMPLING);
  66 + if (isset($resamplingXmlNode))
  67 + $this->getResampling()->loadFromNode($resamplingXmlNode);
  68 +
  69 + $errorbarXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTYSERIE_ERRORBAR);
  70 + if (isset($errorbarXmlNode))
  71 + $this->getErrorBar()->loadFromNode($errorbarXmlNode);
  72 +
  73 + parent::loadFromNode($xmlNode);
  74 + }
57 75 }
58 76  
59 77 ?>
60 78 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPostProcessingNodeClass.php
... ... @@ -27,6 +27,13 @@ class RequestOutputPostProcessingNodeClass extends NodeClass
27 27 return false;
28 28 return ($this->getChildInstanceByName($type) != NULL);
29 29 }
  30 +
  31 + public function loadFromNode($xmlNode)
  32 + {
  33 + foreach ($this->getXmlNodeChildren($xmlNode) as $postprocessingXmlNode) {
  34 + $this->addPostProcessing($this->getXmlNodeName($postprocessingXmlNode));
  35 + }
  36 + }
30 37 }
31 38  
32 39 ?>
33 40 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputStatisticNodeClass.php
... ... @@ -44,6 +44,11 @@ class RequestOutputStatisticFunctionNodeClass extends NodeClass
44 44 {
45 45 $this->setAttribute(REQUESTOUTPUTSTATISTICFUNCTION_ID, $name);
46 46 }
  47 +
  48 + public function loadFromNode($xmlNode)
  49 + {
  50 + $this->setFunctionName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTICFUNCTION_ID));
  51 + }
47 52 }
48 53  
49 54 class RequestOutputStatisticParamNodeClass extends NodeClass
... ... @@ -63,19 +68,18 @@ class RequestOutputStatisticParamNodeClass extends NodeClass
63 68 return $this->getAttribute(REQUESTOUTPUTSTATISTICPARAM_ID);
64 69 }
65 70  
66   - public function addFunction($name)
  71 + public function addFunction($name = "")
67 72 {
68 73 $node = new RequestOutputStatisticFunctionNodeClass();
69 74 $this->addChild($node);
70   - $node->setFunctionName($name);
  75 + $node->setFunctionName($name);
  76 + return $node;
71 77 }
72 78  
73 79 public function indexExist($index)
74 80 {
75 81 if ($this->getAttribute(REQUESTOUTPUTSTATISTICPARAM_INDEX) == $index)
76   - return true;
77   -
78   -
  82 + return true;
79 83 return false;
80 84 }
81 85  
... ... @@ -83,10 +87,21 @@ class RequestOutputStatisticParamNodeClass extends NodeClass
83 87 {
84 88 if ($this->indexExist($index))
85 89 return;
86   -
87 90 $this->setAttribute(REQUESTOUTPUTSTATISTICPARAM_INDEX, $index);
88 91  
89 92 }
  93 +
  94 + public function loadFromNode($xmlNode)
  95 + {
  96 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTICPARAM_ID));
  97 +
  98 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTOUTPUTSTATISTICFUNCTION_NAME) as $functionXmlNode) {
  99 + $this->addFunction()->loadFromNode($functionXmlNode);
  100 + }
  101 +
  102 + $this->setIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTICPARAM_INDEX));
  103 + }
  104 +
90 105 }
91 106  
92 107 /**
... ... @@ -126,7 +141,7 @@ class RequestOutputStatisticNodeClass extends NodeClass
126 141 }
127 142  
128 143  
129   - public function addParam($id, $indexes)
  144 + public function addParam($id = "", $indexes = array())
130 145 {
131 146 $paramsNode = $this->getFirstChildByName(REQUESTPARAMS_NAME);
132 147  
... ... @@ -150,7 +165,7 @@ class RequestOutputStatisticNodeClass extends NodeClass
150 165 return $node;
151 166 }
152 167  
153   - public function addPostProcessing($process)
  168 + public function addPostProcessing($process = "")
154 169 {
155 170 $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME);
156 171 if ($node == NULL)
... ... @@ -160,6 +175,8 @@ class RequestOutputStatisticNodeClass extends NodeClass
160 175 }
161 176  
162 177 $node->addPostProcessing($process);
  178 +
  179 + return $node;
163 180 }
164 181  
165 182 public function isPostProcessing($process)
... ... @@ -171,6 +188,26 @@ class RequestOutputStatisticNodeClass extends NodeClass
171 188  
172 189 return $node->isPostProcessing($process);
173 190 }
  191 +
  192 + public function loadFromNode($xmlNode)
  193 + {
  194 + $this->setTimeFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTIC_TIMEFORMAT));
  195 + $this->setFileFormat($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTIC_FILEFORMAT));
  196 + $this->setStructure($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTIC_STRUCTURE));
  197 + $this->setFileName($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTSTATISTIC_FILENAME));
  198 +
  199 + $paramsXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTPARAMS_NAME);
  200 + if (isset($paramsXmlNode))
  201 + {
  202 + foreach ($this->getXmlNodeChildrenByTagName($paramsXmlNode, REQUESTOUTPUTSTATISTICPARAM_NAME) as $paramXmlNode) {
  203 + $this->addParam()->loadFromNode($paramXmlNode);
  204 + }
  205 + }
  206 +
  207 + $postprocessingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPOSTPROCESSING_NAME);
  208 + if (isset($postprocessingXmlNode))
  209 + $this->addPostProcessing()->loadFromNode($paramXmlNode);
  210 + }
174 211 }
175 212  
176 213 ?>
177 214 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputsNodeClass.php
1 1 <?php
  2 +
  3 +require_once "RequestOutputDownloadNodeClass.php";
  4 +require_once "RequestOutputPlotNodeClass.php";
  5 +require_once "RequestOutputDataMiningNodeClass.php";
  6 +require_once "RequestOutputStatisticNodeClass.php";
  7 +
2 8 define ("REQUESTOUTPUTS_NAME", "outputs");
3 9  
4 10 abstract class RequestOutputTypeEnum
... ... @@ -46,6 +52,29 @@ class RequestOutputsNodeClass extends NodeClass
46 52  
47 53 return $output;
48 54 }
  55 +
  56 + public function loadFromNode($xmlNode)
  57 + {
  58 + foreach ($this->getXmlNodeChildren($xmlNode) as $outputXmlNode) {
  59 + switch ($this->getXmlNodeName($outputXmlNode)) {
  60 + case REQUESTOUTPUTDOWNLOAD_NAME :
  61 + $this->addNewOutput(RequestOutputTypeEnum::DOWNLOAD)->loadFromNode($outputXmlNode);
  62 + break;
  63 + case REQUESTOUTPUTDATAMINING_NAME :
  64 + $this->addNewOutput(RequestOutputTypeEnum::DATAMINING)->loadFromNode($outputXmlNode);
  65 + break;
  66 + case REQUESTOUTPUTPLOT_NAME :
  67 + $this->addNewOutput(RequestOutputTypeEnum::PLOT)->loadFromNode($outputXmlNode);
  68 + break;
  69 + case REQUESTOUTPUTSTATISTIC_NAME :
  70 + $this->addNewOutput(RequestOutputTypeEnum::STATISTIC)->loadFromNode($outputXmlNode);
  71 + break;
  72 + default :
  73 + throw new Exception('Output node not implemented');
  74 + }
  75 +
  76 + }
  77 + }
49 78 }
50 79  
51 80 ?>
52 81 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestTimesNodeClass.php
... ... @@ -39,6 +39,14 @@ class RequestTimesIntervalNodeClass extends NodeClass
39 39 return "";
40 40 return $durationNode->getValue();
41 41 }
  42 +
  43 + public function loadFromNode($xmlNode)
  44 + {
  45 + $startXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTTIMEINTERVAL_START);
  46 + $durationXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTTIMEINTERVAL_DURATION);
  47 + if (isset($startXmlNode) && isset($durationXmlNode))
  48 + $this->setInterval($this->getXmlNodeValue($startXmlNode), $this->getXmlNodeValue($durationXmlNode));
  49 + }
42 50 }
43 51  
44 52 define ("REQUESTTIMETABLE_NAME", "timetable");
... ... @@ -87,6 +95,13 @@ class RequestTimesTimeTableNodeClass extends NodeClass
87 95 {
88 96 return $this->getAttribute(REQUESTTIMETABLE_INDEX);
89 97 }
  98 +
  99 + public function loadFromNode($xmlNode)
  100 + {
  101 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTTIMETABLE_ID));
  102 + $this->setTTName($this->getXmlNodeAttribute($xmlNode, REQUESTTIMETABLE_TTNAME));
  103 + $this->setIndex($this->getXmlNodeAttribute($xmlNode, REQUESTTIMETABLE_INDEX));
  104 + }
90 105 }
91 106  
92 107 define ("REQUESTCATALOG_NAME", "catalog");
... ... @@ -135,6 +150,13 @@ class RequestCatalogNodeClass extends NodeClass
135 150 {
136 151 return $this->getAttribute(REQUESTCATALOG_INDEX);
137 152 }
  153 +
  154 + public function loadFromNode($xmlNode)
  155 + {
  156 + $this->setId($this->getXmlNodeAttribute($xmlNode, REQUESTCATALOG_ID));
  157 + $this->setCatalogName($this->getXmlNodeAttribute($xmlNode, REQUESTCATALOG_TTNAME));
  158 + $this->setIndex($this->getXmlNodeAttribute($xmlNode, REQUESTCATALOG_INDEX));
  159 + }
138 160 }
139 161  
140 162 define ("REQUESTTIMES_NAME", "times");
... ... @@ -151,11 +173,12 @@ class RequestTimesNodeClass extends NodeClass
151 173 parent::__construct(REQUESTTIMES_NAME);
152 174 }
153 175  
154   - public function addInterval($start, $duration)
  176 + public function addInterval($start = "", $duration = "")
155 177 {
156 178 $interval = new RequestTimesIntervalNodeClass();
157 179 $interval->setInterval($start, $duration);
158 180 $this->addChild($interval);
  181 + return $interval;
159 182 }
160 183  
161 184 public function getIntervals()
... ... @@ -163,7 +186,7 @@ class RequestTimesNodeClass extends NodeClass
163 186 return $this->getChildrenByName(REQUESTTIMEINTERVAL_NAME);
164 187 }
165 188  
166   - public function addTimeTable($id, $name, $index = -1)
  189 + public function addTimeTable($id = "", $name = "", $index = -1)
167 190 {
168 191 $timeTable = new RequestTimesTimeTableNodeClass();
169 192 $timeTable->setId($id);
... ... @@ -172,9 +195,10 @@ class RequestTimesNodeClass extends NodeClass
172 195 if ($index >= 0)
173 196 $timeTable->setIndex($index);
174 197 $this->addChild($timeTable);
  198 + return $timeTable;
175 199 }
176 200  
177   - public function addCatalog($id, $name, $index = -1)
  201 + public function addCatalog($id = "", $name = "", $index = -1)
178 202 {
179 203 $catalogNode = new RequestCatalogNodeClass();
180 204 $catalogNode->setId($id);
... ... @@ -183,8 +207,23 @@ class RequestTimesNodeClass extends NodeClass
183 207 if ($index >= 0)
184 208 $catalogNode->setIndex($index);
185 209 $this->addChild($catalogNode);
  210 + return $catalogNode;
186 211 }
187 212  
  213 + public function loadFromNode($xmlNode)
  214 + {
  215 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTTIMEINTERVAL_NAME) as $timeintervalXmlNode) {
  216 + $this->addInterval()->loadFromNode($timeintervalXmlNode);
  217 + }
  218 +
  219 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTTIMETABLE_NAME) as $timetableXmlNode) {
  220 + $this->addTimeTable()->loadFromNode($timetableXmlNode);
  221 + }
  222 +
  223 + foreach ($this->getXmlNodeChildrenByTagName($xmlNode, REQUESTCATALOG_NAME) as $catalogXmlNode) {
  224 + $this->addCatalog()->loadFromNode($catalogXmlNode);
  225 + }
  226 + }
188 227 }
189 228  
190 229 ?>
191 230 \ No newline at end of file
... ...
src/RequestManager.php
... ... @@ -14,6 +14,7 @@ function amdaintegration_autoload($class_name)
14 14 'InputOutput/IHMImpl/Params/PlotImpl',
15 15 'InputOutput/IHMImpl/Params/GeneratorImpl',
16 16 'InputOutput/IHMImpl/Process',
  17 + 'InputOutput/IHMImpl/ParamInfo',
17 18 'InputOutput/IHMImpl/Tools',
18 19 'InputOutput/TestImpl',
19 20 'Request',
... ... @@ -55,7 +56,8 @@ abstract class FunctionTypeEnumClass
55 56 const PROCESSGETINFO = "process_get_info";
56 57 const PROCESSCLEAN = "process_clean";
57 58 const TTMERGE = "tt_merge";
58   - const TTUNION = "tt_merge";
  59 + const TTUNION = "tt_union";
  60 + const PARAMINFO = "param_info";
59 61 }
60 62  
61 63 /**
... ... @@ -76,7 +78,7 @@ abstract class ClientTypeEnumClass
76 78 */
77 79 Class RequestManagerClass
78 80 {
79   - public static $version = "1.2.0";
  81 + public static $version = "1.3.0";
80 82  
81 83 /*
82 84 * @brief Constructor
... ... @@ -121,6 +123,8 @@ Class RequestManagerClass
121 123 case FunctionTypeEnumClass::TTMERGE :
122 124 case FunctionTypeEnumClass::TTUNION :
123 125 return new TTRequestClass($userHost);
  126 + case FunctionTypeEnumClass::PARAMINFO :
  127 + return new ParamInfoRequestClass($userHost);
124 128 default :
125 129 throw new Exception('Request '.$function.' not implemented.');
126 130 }
... ...