Line 34... |
Line 34... |
34 |
'GENERIC_STRUCTURES' => 17);
|
34 |
'GENERIC_STRUCTURES' => 17);
|
Line 35... |
Line 35... |
35 |
|
35 |
|
36 |
public function executer() {
|
36 |
public function executer() {
|
37 |
try {
|
37 |
try {
|
38 |
$this->bdd = new Bdd();
|
38 |
$this->bdd = new Bdd();
|
39 |
$this->fichier = realpath(dirname(__FILE__)).'/../../../donnees/ontologie/v1.00_2003-02-18/Ontology.xml';
|
39 |
$this->fichier = realpath(dirname(__FILE__)).'/../../../donnees/prometheus/v1.00_2003-02-18/Ontology.xml';
|
40 |
// Lancement de l'action demandée
|
40 |
// Lancement de l'action demandée
|
41 |
$cmd = $this->getParametre('a');
|
41 |
$cmd = $this->getParametre('a');
|
42 |
switch ($cmd) {
|
42 |
switch ($cmd) {
|
43 |
case 'analyser' :
|
43 |
case 'analyser' :
|
Line 438... |
Line 438... |
438 |
}
|
438 |
}
|
Line 439... |
Line 439... |
439 |
|
439 |
|
440 |
private function insererLotDeTermes() {
|
440 |
private function insererLotDeTermes() {
|
441 |
$champs = implode(',', array('id_terme', 'ce_type', 'terme', 'definition', 'preference', 'ce_auteur', 'ce_publication', 'ce_image'));
|
441 |
$champs = implode(',', array('id_terme', 'ce_type', 'terme', 'definition', 'preference', 'ce_auteur', 'ce_publication', 'ce_image'));
|
442 |
$values = $this->creerValues($this->lotsTermes);
|
442 |
$values = $this->creerValues($this->lotsTermes);
|
443 |
$requete = "INSERT INTO ontologie_terme ($champs) VALUES $values";
|
443 |
$requete = "INSERT INTO prometheus_ontologie_terme_v1_00 ($champs) VALUES $values";
|
444 |
$this->executerSql($requete);
|
444 |
$this->executerSql($requete);
|
Line 445... |
Line 445... |
445 |
}
|
445 |
}
|
446 |
|
446 |
|
447 |
private function insererLotDeRelations() {
|
447 |
private function insererLotDeRelations() {
|
448 |
$champs = implode(',', array('id_terme_01', 'id_terme_02', 'relation'));
|
448 |
$champs = implode(',', array('id_terme_01', 'id_terme_02', 'relation'));
|
449 |
$values = $this->creerValues($this->lotsRelations);
|
449 |
$values = $this->creerValues($this->lotsRelations);
|
450 |
$requete = "INSERT INTO ontologie_relation ($champs) VALUES $values";
|
450 |
$requete = "INSERT INTO prometheus_ontologie_relation_v1_00 ($champs) VALUES $values";
|
Line 451... |
Line 451... |
451 |
$this->executerSql($requete);
|
451 |
$this->executerSql($requete);
|
452 |
}
|
452 |
}
|
453 |
|
453 |
|
454 |
private function insererLotImages() {
|
454 |
private function insererLotImages() {
|
455 |
$champs = implode(',', array('id_image', 'uri', 'ce_publication'));
|
455 |
$champs = implode(',', array('id_image', 'uri', 'ce_publication'));
|
456 |
$values = $this->creerValues($this->lotsImages);
|
456 |
$values = $this->creerValues($this->lotsImages);
|
Line 457... |
Line 457... |
457 |
$requete = "INSERT INTO ontologie_image ($champs) VALUES $values";
|
457 |
$requete = "INSERT INTO prometheus_ontologie_image_v1_00 ($champs) VALUES $values";
|
458 |
$this->executerSql($requete);
|
458 |
$this->executerSql($requete);
|
459 |
}
|
459 |
}
|
460 |
|
460 |
|
461 |
private function insererLotDePublications() {
|
461 |
private function insererLotDePublications() {
|
462 |
$champs = implode(',', array('id_publication', 'ce_auteur_principal', 'titre', 'date', 'uri'));
|
462 |
$champs = implode(',', array('id_publication', 'ce_auteur_principal', 'titre', 'date', 'uri'));
|
Line 463... |
Line 463... |
463 |
$values = $this->creerValues($this->lotsPublications);
|
463 |
$values = $this->creerValues($this->lotsPublications);
|
464 |
$requete = "INSERT INTO ontologie_publication ($champs) VALUES $values";
|
464 |
$requete = "INSERT INTO prometheus_ontologie_publication_v1_00 ($champs) VALUES $values";
|
465 |
$this->executerSql($requete);
|
465 |
$this->executerSql($requete);
|
466 |
}
|
466 |
}
|
467 |
|
467 |
|
468 |
private function insererLotAuteurs() {
|
468 |
private function insererLotAuteurs() {
|
Line 469... |
Line 469... |
469 |
$champs = implode(',', array('id_auteur', 'prenom', 'nom', 'naissance_date', 'deces_date'));
|
469 |
$champs = implode(',', array('id_auteur', 'prenom', 'nom', 'naissance_date', 'deces_date'));
|
470 |
$values = $this->creerValues($this->lotsAuteurs);
|
470 |
$values = $this->creerValues($this->lotsAuteurs);
|
471 |
$requete = "INSERT INTO ontologie_auteur ($champs) VALUES $values";
|
471 |
$requete = "INSERT INTO prometheus_ontologie_auteur_v1_00 ($champs) VALUES $values";
|
472 |
$this->executerSql($requete);
|
472 |
$this->executerSql($requete);
|
473 |
}
|
473 |
}
|
474 |
|
474 |
|
Line 475... |
Line 475... |
475 |
private function insererLotHierarchie() {
|
475 |
private function insererLotHierarchie() {
|
476 |
$champs = implode(',', array('id_noeud', 'id_noeud_parent', 'chemin_noms', 'chemin_ids', 'ce_terme'));
|
476 |
$champs = implode(',', array('id_noeud', 'id_noeud_parent', 'chemin_noms', 'chemin_ids', 'ce_terme'));
|
Line 503... |
Line 503... |
503 |
private function proteger($chaine) {
|
503 |
private function proteger($chaine) {
|
504 |
return $this->bdd->proteger($chaine);
|
504 |
return $this->bdd->proteger($chaine);
|
505 |
}
|
505 |
}
|
Line 506... |
Line 506... |
506 |
|
506 |
|
507 |
private function vider() {
|
507 |
private function vider() {
|
508 |
$requete = 'TRUNCATE TABLE ontologie_auteur';
|
508 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_auteur_v1_00';
|
509 |
$this->executerSql($requete);
|
509 |
$this->executerSql($requete);
|
510 |
$requete = 'TRUNCATE TABLE ontologie_hierarchie';
|
510 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_hierarchie_v1_00';
|
511 |
$this->executerSql($requete);
|
511 |
$this->executerSql($requete);
|
512 |
$requete = 'TRUNCATE TABLE ontologie_image';
|
512 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_image_v1_00';
|
513 |
$this->executerSql($requete);
|
513 |
$this->executerSql($requete);
|
514 |
$requete = 'TRUNCATE TABLE ontologie_publication';
|
514 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_publication_v1_00';
|
515 |
$this->executerSql($requete);
|
515 |
$this->executerSql($requete);
|
516 |
$requete = 'TRUNCATE TABLE ontologie_relation';
|
516 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_relation_v1_00';
|
517 |
$this->executerSql($requete);
|
517 |
$this->executerSql($requete);
|
518 |
$requete = 'TRUNCATE TABLE ontologie_terme';
|
518 |
$requete = 'TRUNCATE TABLE prometheus_ontologie_terme_v1_00';
|
519 |
$this->executerSql($requete);
|
519 |
$this->executerSql($requete);
|
520 |
}
|
520 |
}
|
521 |
}
|
521 |
}
|