RequestOutputsNodeClass.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
define ("REQUESTOUTPUTS_NAME", "outputs");
abstract class RequestOutputTypeEnum
{
const DOWNLOAD = "Download";
const DATAMINING = "DataMining";
const PLOT = "Plot";
const STATISTIC = "Statistic";
}
/**
* @class RequestOutputsNodeClass
* @brief Definition of a request outputs node for AMDA_Kernel
* @details
*/
class RequestOutputsNodeClass extends NodeClass
{
public function __construct()
{
parent::__construct(REQUESTOUTPUTS_NAME);
}
public function addNewOutput($type)
{
switch ($type)
{
case RequestOutputTypeEnum::DOWNLOAD :
$output = new RequestOutputDownloadNodeClass();
break;
case RequestOutputTypeEnum::DATAMINING :
$output = new RequestOutputDataMiningNodeClass();
break;
case RequestOutputTypeEnum::PLOT :
$output = new RequestOutputPlotNodeClass();
break;
case RequestOutputTypeEnum::STATISTIC :
$output = new RequestOutputStatisticNodeClass();
break;
default :
throw new Exception('Output node not implemented');
}
if (isset($output) && ($output != NULL))
$this->addChild($output);
return $output;
}
}
?>