Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 456 Rev 522
Line 40... Line 40...
40
					$this->chargerDonnees();
40
					$this->chargerDonnees();
41
					break;
41
					break;
42
				case 'genererChamps' :
42
				case 'genererChamps' :
43
					 $this->genererChamps();
43
					 $this->genererChamps();
44
					 break;
44
					 break;
45
				case 'chargerTous':
45
				case 'chargerTous':
46
					$this->chargerStructureSql();
46
					$this->chargerStructureSql();
47
					$this->chargerMetadonnees();
47
					$this->chargerMetadonnees();
48
					$this->chargerOntologies();
48
					$this->chargerOntologies();
49
					$this->chargerDonnees();
49
					$this->chargerDonnees();
50
					$this->genererChamps();
50
					$this->genererChamps();
51
					$this->insererDonneesBaseflorRangSupEcolo();
51
					$this->insererDonneesBaseflorRangSupEcolo();
-
 
52
					$this->insererDonneesIndex();
52
					break;
53
					break;
53
				case 'insererDonneesRangSup' :
54
				case 'insererDonneesRangSup' :
54
					$this->insererDonneesBaseflorRangSupEcolo();
55
					$this->insererDonneesBaseflorRangSupEcolo();
55
					break;
56
					break;
56
				case 'supprimerTous' :
57
				case 'supprimerTous' :
Line 60... Line 61...
60
					$this->voirRangSup();
61
					$this->voirRangSup();
61
					break;
62
					break;
62
				case 'voirRangSupEcologie' :
63
				case 'voirRangSupEcologie' :
63
					$this->voirRangSupEcologie();
64
					$this->voirRangSupEcologie();
64
					break;
65
					break;
-
 
66
				case 'insererDonneesIndex' :
-
 
67
					$this->insererDonneesIndex();
-
 
68
					break;
65
				default :
69
				default :
66
					throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
70
					throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
67
			}
71
			}
68
		} catch (Exception $e) {
72
		} catch (Exception $e) {
69
			$this->traiterErreur($e->getMessage());
73
			$this->traiterErreur($e->getMessage());
70
		}
74
		}
71
	}
75
	}
Line -... Line 76...
-
 
76
 
72
 
77
	
Line 73... Line 78...
73
	//-- traitement de la table baseflorRangSupInsertion --//
78
	//-- traitement de la table baseflorRangSupInsertion --//
74
	
79
	
75
	private function  getClasseBaseflorRangSupInsertion() {
80
	private function  getClasseBaseflorRangSupInsertion() {
76
		$conteneur = new Conteneur();
81
		$conteneur = new Conteneur();
77
		require_once dirname(__FILE__)."/BaseflorRangSupInsertion.php";
82
		require_once dirname(__FILE__)."/BaseflorRangSupInsertion.php";
78
		$rangSupInsert = new BaseflorRangSupInsertion($conteneur);///?
83
		$rangSupInsert = new BaseflorRangSupInsertion($conteneur, $this->getBdd());
79
		return $rangSupInsert;
-
 
80
	}
84
		return $rangSupInsert;
81
	
85
	}
82
	 
86
		 
83
	private function insererDonneesBaseflorRangSupEcolo(){
87
	private function insererDonneesBaseflorRangSupEcolo(){
84
		$rangSupInsert = $this->getClasseBaseflorRangSupInsertion();
88
		$rangSupInsert = $this->getClasseBaseflorRangSupInsertion();
Line 94... Line 98...
94
		$rangSupInsert = $this->getClasseBaseflorRangSupInsertion();
98
		$rangSupInsert = $this->getClasseBaseflorRangSupInsertion();
95
		$rangSupInsert->testEcologieAscendantsDeBaseflor();
99
		$rangSupInsert->testEcologieAscendantsDeBaseflor();
96
	}
100
	}
Line -... Line 101...
-
 
101
	
-
 
102
	
-
 
103
	//-- traitement de la table baseflorIndex --//
-
 
104
	
-
 
105
	private function  getClasseBaseflorIndex() {
-
 
106
		$conteneur = new Conteneur();
-
 
107
		require_once dirname(__FILE__)."/BaseflorIndex.php";
-
 
108
		$Index = new BaseflorIndex($conteneur, $this->getBdd());
-
 
109
		return $Index;
-
 
110
	}
-
 
111
	
-
 
112
	private function insererDonneesIndex(){
-
 
113
		$Index= $this->getClasseBaseflorIndex();
-
 
114
		$Index->insererDonnees();
-
 
115
	}
97
	
116
	
-
 
117
	
98
	
118
	//-- traitement de la table generer champs --//
99
	//-- traitement de la table generer champs --//
119
	
100
	private function genererChamps(){
120
	private function genererChamps(){
101
		$this->initialiserGenerationChamps();
121
		$this->initialiserGenerationChamps();
102
		$this->ajouterChamps();
122
		$this->ajouterChamps();
Line 275... Line 295...
275
			"	ESCAPED BY '\\\'";
295
			"	ESCAPED BY '\\\'";
276
		$this->getBdd()->requeter($requete);
296
		$this->getBdd()->requeter($requete);
277
	}
297
	}
Line 278... Line 298...
278
 
298
 
279
	private function supprimerTous() {
299
	private function supprimerTous() {
-
 
300
		$requete = "DROP TABLE IF EXISTS baseflor_meta, baseflor_ontologies, baseflor_v2012_03_19,".
280
		$requete = "DROP TABLE IF EXISTS baseflor_meta, baseflor_ontologies, baseflor_v2012_03_19";
301
			" baseflor_rang_sup_ecologie_v2012_03_19, baseflor_index_v2012_03_19 ";
281
		$this->getBdd()->requeter($requete);
302
		$this->getBdd()->requeter($requete);
Line 282... Line 303...
282
	}
303
	}
283
 
304