Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1005 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1005 Rev 1232
Line 17... Line 17...
17
 
17
 
18
			$cmd = $this->getParametre('a');
18
			$cmd = $this->getParametre('a');
19
			$this->projet = $this->getParametre('n');
19
			$this->projet = $this->getParametre('n');
20
			switch ($cmd) {
20
			switch ($cmd) {
21
				case 'chargerTous' :
21
				case 'chargerTous' :
22
					$this->chargerDonnees();
22
					$this->chargerDonnee();
23
					$this->chargerMetaDonnees();
23
					$this->chargerMetaDonnee();
24
					break;
24
					break;
25
				case 'chargerDonnees' :
25
				case 'chargerDonnee' :
26
					$this->chargerDonnees();
26
					$this->chargerDonnee();
27
					break;
27
					break;
28
				case 'chargerMetadonnees' :
28
				case 'chargerMetadonnee' :
29
					$this->chargerMetaDonnees();
29
					$this->chargerMetaDonnee();
30
					break;
30
					break;
31
				case 'supprimerTous' :
31
				case 'supprimerTous' :
32
					$this->supprimerTous();
32
					$this->supprimerTous();
33
					break;
33
					break;
Line 37... Line 37...
37
		} catch (Exception $e) {
37
		} catch (Exception $e) {
38
			$this->traiterErreur($e->getMessage());
38
			$this->traiterErreur($e->getMessage());
39
		}
39
		}
40
	}
40
	}
Line 41... Line 41...
41
	
41
	
42
	private function chargerDonnees() {
42
	private function chargerDonnee() {
43
		$requete = "CREATE TABLE tb_eflore.".$this->projet."_tapir2 ".
43
		$requete = "CREATE TABLE tb_eflore.".$this->projet."_tapir2 ".
44
					"AS SELECT concat('urn:lsid:',institutionCode,':',collectionCode,':', catalogNumber) AS guid, ".
44
					"AS SELECT concat('urn:lsid:',institutionCode,':',collectionCode,':', catalogNumber) AS guid, ".
45
						"`catalogNumber` AS observation_id, `scientificName` AS nom_scientifique_complet, `referencess` AS num_nom, ".
45
						"`catalogNumber` AS observation_id, `scientificName` AS nom_scientifique_complet, `referencess` AS num_nom, ".
46
						"`county` AS lieu_station_nom, `locality` AS lieu_commune_code_insee, ".
46
						"`county` AS lieu_station_nom, `locality` AS lieu_commune_code_insee, ".
Line 61... Line 61...
61
		$infos['dataPublisher'] = $this->getBdd()->recuperer($requeteDataset);
61
		$infos['dataPublisher'] = $this->getBdd()->recuperer($requeteDataset);
62
		return $infos;
62
		return $infos;
63
	}
63
	}
Line 64... Line 64...
64
	
64
	
65
	
65
	
66
	private function chargerMetaDonnees() {
66
	private function chargerMetaDonnee() {
67
		$this->chargerStructureSqlMetaDonnees();
67
		$this->chargerStructureSqlMetaDonnees();
68
		$infos = $this->chercherInfosMetaDonnees();
68
		$infos = $this->chercherInfosMetaDonnees();
69
		$date = date('Y_m_d');
69
		$date = date('Y_m_d');