o.moresis
2 years ago
5 changed files with 87 additions and 254 deletions
@ -1,104 +0,0 @@
@@ -1,104 +0,0 @@
|
||||
<?php |
||||
namespace MSFD\Configuration; |
||||
|
||||
class Globals { |
||||
public static $importType; |
||||
public static $debugMode = true; |
||||
public static $filename = ''; |
||||
public static $root_path = __DIR__ . '/../../'; |
||||
} |
||||
|
||||
|
||||
class Constants { |
||||
const LINE_READ_LIMIT = 500; |
||||
const BYTE_READ_LIMIT = 450000000; |
||||
const MODE = 1; |
||||
const API_BASE_URL = "https://geoserver.hcmr.gr/geoserver/rest/"; |
||||
const API_CREDENTIALS = ["portal", "@dm!n322"]; |
||||
/* const REPO_API = "http://msfd-repo.ath.hcmr.gr"; */ |
||||
const API_URL = array( |
||||
"REPO" => "http://msfd-repo.ath.hcmr.gr/", |
||||
"GSRV" => "https://geoserver.hcmr.gr/geoserver/", |
||||
"POSD" => "https://api.poseidon.hcmr.gr/", |
||||
"WFD" => "https://watermonitoring.hcmr.gr/api/" |
||||
); |
||||
|
||||
// Database configuration |
||||
// Production / Development |
||||
const API_CREDS = array( |
||||
"REPO" => "", |
||||
"GSRV" => "", |
||||
"POSD" => "", |
||||
"WFD" => "" |
||||
); |
||||
|
||||
const DB_CREDS = array( |
||||
"HOST" => "192.168.11.45", |
||||
"NAME" => "newschema", |
||||
"USER" => "vaslak", |
||||
"PASS" => "postgre2020" |
||||
); |
||||
|
||||
// Header translations |
||||
const HEADER_TRANSLATIONS = [ |
||||
'Cruise' => 'cruise', |
||||
'Station' => 'station', |
||||
'Type' => 'type', |
||||
'YYYY-MM-DDThh:mm:ss.sss' => 'datetime', |
||||
'YYYY-MM-DDThh:mm' => 'datetime', |
||||
'Longitude [degrees_east]' => 'lon', |
||||
'Latitude [degrees_north]' => 'lat', |
||||
'LOCAL_CDI_ID' => 'cdi', |
||||
'EDMO_code' => 'edmo', |
||||
'Bot. Depth [m]' => 'bottom_depth', |
||||
'DEPHPR01 [m]' => 'depth', |
||||
'DEPHPR01 [meter]' => 'depth', |
||||
'DEPH [m]' => 'depth', |
||||
'COREDIST [m]' => 'depth', |
||||
'DEPHPR01 [m]' => 'depth', |
||||
'MaximumObservationDepth [m]' => 'depth' |
||||
]; |
||||
|
||||
// Sequence according to which the tables are going to be updated through import |
||||
public static function getReplaceableChars() { |
||||
return self::REPLACEABLE_CHARS; |
||||
} |
||||
|
||||
|
||||
public static function getLineReadLimit() |
||||
{ |
||||
return self::LINE_READ_LIMIT; |
||||
} |
||||
|
||||
|
||||
public static function getByteReadLimit() |
||||
{ |
||||
return self::BYTE_READ_LIMIT; |
||||
} |
||||
|
||||
|
||||
public static function getItemSeparator() |
||||
{ |
||||
return self::ITEM_SEPARATOR; |
||||
} |
||||
|
||||
|
||||
public static function getDatabaseCreds($mode = self::MODE) |
||||
{ |
||||
return array(self::DB_CREDS['HOST'], self::DB_CREDS['NAME'], self::DB_CREDS['USER'], self::DB_CREDS['PASS']); |
||||
} |
||||
|
||||
|
||||
// GEOSERVER API CONSTANTS |
||||
public static function getAPIBaseURL($api_name) { |
||||
return self::API_URL[$api_name]; |
||||
} |
||||
|
||||
|
||||
public static function getAPICredentials($api_name) |
||||
{ |
||||
return self::API_CREDENTIALS; |
||||
} |
||||
} |
||||
|
||||
?> |
Loading…
Reference in new issue