Commit 28c192764b8014890c4b20ea4c4d6c3811738e83
1 parent
cf1fbb58
Exists in
master
and in
111 other branches
generic template def
Showing
8 changed files
with
27 additions
and
24 deletions
Show diff stats
php/RemoteDataCenter/FMI_GUMICS.php
... | ... | @@ -9,8 +9,7 @@ class FMI_GUMICS extends SimulationDataCenterClass |
9 | 9 | protected $url = "http://impex-fp7.fmi.fi/ws"; |
10 | 10 | protected $treeXML = "Tree_FMI_GUMICS.xml"; |
11 | 11 | protected $WSDL = "Methods_FMI.wsdl"; |
12 | - | |
13 | - protected $templateFile = "FMI_GUMICS_Templates.xml"; | |
12 | + | |
14 | 13 | protected $needsArgs = true; |
15 | 14 | |
16 | 15 | public $soapMethod = "getDataPointValue"; | ... | ... |
php/RemoteDataCenter/FMI_HYBRID.php
... | ... | @@ -11,7 +11,6 @@ class FMI_HYBRID extends SimulationDataCenterClass |
11 | 11 | protected $WSDL = "Methods_FMI.wsdl"; |
12 | 12 | |
13 | 13 | protected $needsArgs = true; |
14 | - protected $templateFile = "FMI_HYBRID_Templates.xml"; | |
15 | 14 | public $interpolationMethod = array('Linear', 'NearestGridPoint'); |
16 | 15 | |
17 | 16 | public $soapMethod = "getDataPointValue"; | ... | ... |
php/RemoteDataCenter/LATMOS.php
... | ... | @@ -10,8 +10,8 @@ class LATMOS extends SimulationDataCenterClass |
10 | 10 | protected $treeXML = "tree.xml"; |
11 | 11 | protected $WSDL = "Methods_LATMOS.wsdl"; |
12 | 12 | |
13 | - protected $templateFile = "LATMOS_Templates.xml"; | |
14 | - protected $needsArgs = true; | |
13 | + protected $needsArgs = true; | |
14 | + | |
15 | 15 | public $soapMethod = "getDataPointValue"; |
16 | 16 | public $soapMethodSpectra = "getDataPointSpectra"; |
17 | 17 | ... | ... |
php/RemoteDataCenter/LESIA.php
... | ... | @@ -10,8 +10,6 @@ class LESIA extends SimulationDataCenterClass |
10 | 10 | protected $treeXML = "tree_Mag.xml"; |
11 | 11 | protected $WSDL = "Methods_LESIA-Mag.wsdl"; |
12 | 12 | |
13 | - protected $templateFile = "LESIA_Templates.xml"; | |
14 | - | |
15 | 13 | protected $needsArgs = true; |
16 | 14 | |
17 | 15 | //TODO temporary | ... | ... |
php/RemoteDataCenter/RemoteDataCenterClass.php
... | ... | @@ -7,29 +7,32 @@ |
7 | 7 | abstract class RemoteDataCenterClass |
8 | 8 | { |
9 | 9 | protected $url = null, $treeXML = null; |
10 | - protected $baseID = null; | |
11 | - | |
12 | - protected $needsArgs = false; | |
13 | - protected $hasAccessUrl = false; | |
14 | - | |
15 | - public $domAmda = null, $dataCenter = null; | |
16 | - public $domAmdaName = "base.xml"; | |
17 | - public $additionalArgs = null; | |
18 | - | |
19 | - public $tree = null; | |
10 | + | |
11 | + protected $needsArgs = false; | |
12 | + protected $hasAccessUrl = false; | |
13 | + | |
14 | + public $domAmda = null, $dataCenter = null; | |
15 | + public $domAmdaName = "base.xml"; | |
16 | + public $additionalArgs = null; | |
17 | + public $templateFile, $plotSettings; | |
18 | + public $baseID = null; | |
19 | + | |
20 | + public $tree = null; | |
20 | 21 | |
21 | 22 | /* |
22 | 23 | * @brief Constructor |
23 | 24 | */ |
24 | 25 | function __construct() |
25 | 26 | { |
26 | - $this->baseID = get_class($this); | |
27 | + $this->baseID = get_class($this); | |
28 | + $this->templateFile = $this->baseID."_Templates.xml"; | |
29 | + $this->plotSettings = $this->baseID."_PlotSettings.xml"; | |
27 | 30 | } |
28 | 31 | |
29 | 32 | public function param2dd($paramID) |
30 | 33 | { |
31 | - $pairs = array(" " => "_","-" => "_","/" => "_","%" => "_","\\" => "_","$" => "_",":" => "_","+" =>"_","#" => "_","@" => "_","." => "_", ">" => "_", "<" => "_", "," => "_", ")" => "", "(" => "_"); | |
32 | - return strtr($paramID,$pairs); | |
34 | + $pairs = array(" " => "_","-" => "_","/" => "_","%" => "_","\\" => "_","$" => "_",":" => "_","+" =>"_","#" => "_","@" => "_","." => "_", ">" => "_", "<" => "_", "," => "_", ")" => "", "(" => "_"); | |
35 | + return strtr($paramID,$pairs); | |
33 | 36 | } |
34 | 37 | |
35 | 38 | public function saveProxy() |
... | ... | @@ -38,12 +41,11 @@ abstract class RemoteDataCenterClass |
38 | 41 | } |
39 | 42 | |
40 | 43 | abstract public function init(); |
41 | - | |
42 | - | |
43 | 44 | abstract protected function getRemoteTree(); |
44 | 45 | abstract protected function setDataCenterAttributes(); |
45 | 46 | abstract protected function createMissionNodes(); |
46 | 47 | abstract protected function makeArgumentsList(); |
48 | + | |
47 | 49 | // abstract protected function createDatasetNodes(); |
48 | 50 | // abstract protected function createParameterNodes(); |
49 | 51 | // abstract protected function createDatasetGroupNodes($data); | ... | ... |
php/RemoteDataCenter/SINP.php
... | ... | @@ -12,7 +12,6 @@ class SINP extends SimulationDataCenterClass |
12 | 12 | |
13 | 13 | protected $needsArgs = true; |
14 | 14 | protected $soapMethod = 'calculateDataPointValue'; |
15 | - protected $templateFile = "SINP_Templates.xml"; | |
16 | 15 | |
17 | 16 | // OutputFormat netCDF VOTable |
18 | 17 | public $outputFormat = "VOTable"; | ... | ... |
php/RemoteDataCenter/SimulationDataCenterClass.php
... | ... | @@ -11,7 +11,8 @@ class SimulationDataCenterClass extends RemoteDataCenterClass |
11 | 11 | |
12 | 12 | protected $impex_pairs = array("/" => "_", ":" => "_", "?" => "_", '+' => "_"); |
13 | 13 | |
14 | - public $alongOrbit = true; | |
14 | + public $alongOrbit = true; | |
15 | + | |
15 | 16 | /* |
16 | 17 | * @brief init |
17 | 18 | */ | ... | ... |
php/RemoteDataCenter/makeArgs.php
... | ... | @@ -22,6 +22,11 @@ |
22 | 22 | $center = new $class(); |
23 | 23 | |
24 | 24 | $center->makeArgumentsList(); |
25 | + | |
26 | + //copy PlotSettings if exists | |
27 | + if (file_exists(DATAPATH."SimuTemplate/".$center->plotSettings)) | |
28 | + copy(DATAPATH."SimuTemplate/".$center->plotSettings, RemoteData.$center->baseID.'/'.->plotSettings); | |
29 | + | |
25 | 30 | } |
26 | 31 | |
27 | 32 | ?> |
28 | 33 | \ No newline at end of file | ... | ... |