Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 406 | Rev 636 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 406 Rev 634
Line 56... Line 56...
56
			$this->traiterErreur($e->getMessage());
56
			$this->traiterErreur($e->getMessage());
57
		}
57
		}
58
	}
58
	}
Line 59... Line 59...
59
 
59
 
60
	private function chargerBdtxa() {
60
	private function chargerBdtxa() {
61
		$chemin = Config::get('chemins.bdt');
61
		$chemin = Config::get('chemins.bdtxa');
62
		$table = Config::get('tables.bdt');
62
		$table = Config::get('tables.bdtxa');
63
		$requete = "LOAD DATA INFILE '$chemin' ".
63
		$requete = "LOAD DATA INFILE '$chemin' ".
64
				"REPLACE INTO TABLE $table ".
64
				"REPLACE INTO TABLE $table ".
65
				'CHARACTER SET utf8 '.
65
				'CHARACTER SET utf8 '.
66
				'FIELDS '.
66
				'FIELDS '.
Line 87... Line 87...
87
		}
87
		}
88
		echo "\n";
88
		echo "\n";
89
	}
89
	}
Line 90... Line 90...
90
 
90
 
91
	private function initialiserGenerationChamps() {
91
	private function initialiserGenerationChamps() {
92
		$this->table = Config::get('tables.bdt');
92
		$this->table = Config::get('tables.bdtxa');
Line 93... Line 93...
93
	}
93
	}
94
 
94
 
95
	private function preparerTablePrChpNomSciHtml() {
95
	private function preparerTablePrChpNomSciHtml() {
Line 133... Line 133...
133
	private function genererChpFamille() {
133
	private function genererChpFamille() {
134
		$this->initialiserGenerationChamps();
134
		$this->initialiserGenerationChamps();
135
		$this->preparerTablePrChpFamille();
135
		$this->preparerTablePrChpFamille();
136
		$resultats = $this->recupererTuplesPrChpFamille();
136
		$resultats = $this->recupererTuplesPrChpFamille();
137
		$noms = array();
137
		$noms = array();
138
		$introuvables = array();
138
		$introuvables = array();
139
		$introuvablesSyno = array();
139
		$introuvablesSyno = array();
140
		foreach ($resultats as $id => $nom) {
140
		foreach ($resultats as $id => $nom) {
141
			$nn = $nom['num_nom'];
141
			$nn = $nom['num_nom'];
142
			$nnr = $nom['num_nom_retenu'];
142
			$nnr = $nom['num_nom_retenu'];
143
			$nts = $nom['num_tax_sup'];
143
			$nts = $nom['num_tax_sup'];
144
			$rg = $nom['rang'];
144
			$rg = $nom['rang'];
Line 222... Line 222...
222
			}
222
			}
223
			$this->afficherAvancement("Insertion des noms de famille dans la base en cours");
223
			$this->afficherAvancement("Insertion des noms de famille dans la base en cours");
224
		}
224
		}
225
		echo "\n";
225
		echo "\n";
226
	}
226
	}
-
 
227
	private function genererDonneesTestMultiVersion() {
-
 
228
		$contenuSql = $this->recupererContenu(Config::get('chemins.structureSqlTest'));
-
 
229
		$this->executerScripSql($contenuSql);
227
 
230
	
-
 
231
		$table = Config::get('tables.bdtxa');
-
 
232
		$tableTest = Config::get('tables.bdtxaTest');
-
 
233
		$requete = "INSERT INTO $tableTest SELECT * FROM $table";
-
 
234
		$this->getBdd()->requeter($requete);
-
 
235
	}
-
 
236
	
-
 
237
	private function supprimerDonneesTestMultiVersion() {
-
 
238
		$tableMeta = Config::get('tables.bdtxaMeta');
-
 
239
		$requete = "DELETE FROM $tableMeta WHERE guid = 'urn:lsid:tela-botanica.org:bdtfx:1.02'";
-
 
240
		$this->getBdd()->requeter($requete);
-
 
241
	
-
 
242
		$tableTest = Config::get('tables.bdtxaTest');
-
 
243
		$requete = "DROP TABLE IF EXISTS $tableTest";
-
 
244
		$this->getBdd()->requeter($requete);
-
 
245
	}
228
	private function supprimerTous() {
246
	private function supprimerTous() {
229
		$requete = "DROP TABLE IF EXISTS bdtxa_meta, bdtxa_v0_01";
247
		$requete = "DROP TABLE IF EXISTS bdtxa_meta, bdtxa_v0_01";
230
		$this->getBdd()->requeter($requete);
248
		$this->getBdd()->requeter($requete);
231
	}
249
	}
232
}
250
}