diff --git a/application/modules/opac/controllers/NoticeajaxController.php b/application/modules/opac/controllers/NoticeajaxController.php index 72b07590d339b17d84bc5bf5133732bad0f28ac9..3e4c4a36933cab411900c4e435075c0b76592717 100644 --- a/application/modules/opac/controllers/NoticeajaxController.php +++ b/application/modules/opac/controllers/NoticeajaxController.php @@ -122,7 +122,10 @@ class NoticeAjaxController extends ZendAfi_Controller_Action { public function exemplairesAction() { if ($this->notice->isFirstItemTypeSerialArticle()) - $this->notice = $this->notice->getFirstExemplaire()->getPMBSerialRecord(); + $this->notice = $this->notice->getLinkedSerialRecord(); + + if (!$this->notice) + return $this->_sendResponseWithScripts(sprintf('<p>%s</p>', $this->_('Aucun exemplaire trouvé'))); $nb_notices_oeuvre = Class_Notice::countBy(['clef_oeuvre' => $this->notice->getClefOeuvre(), 'id_notice not' => $this->notice->getId()]); @@ -163,11 +166,9 @@ class NoticeAjaxController extends ZendAfi_Controller_Action { if ($xsl->isEnabled()) return $this->_sendResponseWithScripts($this->view->Notice_Xsl($xsl)); - if ($notice->isPeriodique()) { - $periodiques = $this->notice->getArticlesPeriodique($this->id_notice); - return $this->_sendResponseWithScripts($this->notice_html->getArticlesPeriodique($periodiques)); - } + if ($notice->isPeriodique()) + return $this->_sendResponseWithScripts($this->view->Notice_ArticlesPeriodiques($notice)); $html = $this->view->notice_Entete($notice, ['entete' => Class_Codification::CHAMPS]); $this->_sendResponseWithScripts($html); diff --git a/application/modules/telephone/views/scripts/recherche/viewnotice.phtml b/application/modules/telephone/views/scripts/recherche/viewnotice.phtml index 7bcdb5c83e6b75faf1cb25bf238e0cadacf0a93b..7d048e4e112c1318a545f38c4157d84bd2fd0566 100644 --- a/application/modules/telephone/views/scripts/recherche/viewnotice.phtml +++ b/application/modules/telephone/views/scripts/recherche/viewnotice.phtml @@ -8,7 +8,7 @@ echo $this->toolbar($this->_("Recherche"), <h3><?php echo $this->iconeSupport($this->notice->getTypeDoc()) . $this->notice->getTitrePrincipal() ;?></h3> <p class="serie"> <?php - echo $this->getHelper('Notice_Entete')->addSeries($this->notice); + echo $this->notice_SeriesLink($this->notice); ?> </p> <p><?php echo $this->notice->getAuteurPrincipal();?></p> diff --git a/cosmogramme/FEATURES/92615 b/cosmogramme/FEATURES/92615 new file mode 100644 index 0000000000000000000000000000000000000000..f02c51b973d8f4681b8947cd1e6776a07e0f43e4 --- /dev/null +++ b/cosmogramme/FEATURES/92615 @@ -0,0 +1,10 @@ + '92615' => + ['Label' => $this->_('Intégration des périodiques issus des SIGB Koha et PMB'), + 'Desc' => $this->_('Bokeh gère trois niveaux de notices de périodiques: titre de périodique, fascicule et dépouillement. Pour chaque niveau de notice, Bokeh affichera des liens pour aller au niveau supérieur ou inférieur'), + 'Image' => '', + 'Video' => 'https://youtu.be/tbdQufZij_k', + 'Category' => $this->_('Intégration du catalogue'), + 'Right' => function($feature_description, $user) {return true;}, + 'Wiki' => 'http://wiki.bokeh-library-portal.org/index.php?title=Import_des_p%C3%A9riodiques_Koha_dans_Bokeh', + 'Test' => '', + 'Date' => '2020-02-06'], \ No newline at end of file diff --git a/cosmogramme/VERSIONS_WIP/92615 b/cosmogramme/VERSIONS_WIP/92615 new file mode 100644 index 0000000000000000000000000000000000000000..1996e8848880ef296add6a9325ff4d890f65d780 --- /dev/null +++ b/cosmogramme/VERSIONS_WIP/92615 @@ -0,0 +1 @@ + - ticket #92615 : Intégration des périodiques issus des SIGB Koha et PMB \ No newline at end of file diff --git a/cosmogramme/cosmozend/index.php b/cosmogramme/cosmozend/index.php index e6f94c2a1a604c883621380d69cb5823505024b6..1b39458033ea51f13cac0e334c1041929f578f07 100644 --- a/cosmogramme/cosmozend/index.php +++ b/cosmogramme/cosmozend/index.php @@ -44,4 +44,9 @@ $front = Zend_Controller_Front::getInstance() ->registerPlugin(new ZendAfi_Controller_Plugin_CosmoAuth()) ->registerPlugin(new ZendAfi_Controller_Plugin_CosmoBaseUrl()); + +$current_profil = Class_Profil::getCurrentProfil(); +defineConstant('PATH_SKIN', '.' . $current_profil->getPathTheme()); +defineConstant('URL_IMG', BASE_URL . $current_profil->getPathTheme() . 'images/'); + $front->dispatch(); \ No newline at end of file diff --git a/cosmogramme/php/classes/classe_notice_integration.php b/cosmogramme/php/classes/classe_notice_integration.php index f9d15c4837647dfabeb9fdf3ee55ef718f0b01f7..f0eebeb7391a609b80357ed105ea88cfc7db8e27 100644 --- a/cosmogramme/php/classes/classe_notice_integration.php +++ b/cosmogramme/php/classes/classe_notice_integration.php @@ -37,8 +37,10 @@ class notice_integration { RECORD_RENEW = 5, RECORD_UPGRADE = 6, RECORD_SUCCINCT = 7, + RECORD_SKIP = 8, STATUS_NOTFOUND = 'non trouvée'; + private $id_profil; // Id du profil de données initialisé private $format; // Format de fichier 0=unimarc private $id_article_periodique; // Mode d'indentification des articles de periodiques @@ -151,8 +153,6 @@ class notice_integration { public function traiteNotice($data) { - global $sql; - $this->_raw_data = $data; $id_bib = $this->id_bib; @@ -170,13 +170,17 @@ class notice_integration { return 0; } - $this->notice=$this->analyseur->getNoticeIntegration(); + $this->notice = $this->analyseur->getNoticeIntegration(); if($this->notice['type_doc'] == Class_TypeDoc::SERIAL_ARTICLE) { $this->ecrireArticlePeriodique(); return; } + $this->_handleSerials(); + if ($this->statut == static::RECORD_SKIP) + return; + $id_notice = $this->chercheNotice(); if(Class_Cosmogramme_Integration::TYPE_OPERATION_ITEM_DELETE == $this->type_operation) { @@ -189,118 +193,85 @@ class notice_integration { return; } - if($this->notice["statut"] == 1) { + if ($this->notice["statut"] == notice_unimarc::RECORD_STATUS_DELETED) { $this->statut = static::RECORD_DELETE; $this->supprimerNotice($id_notice,$this->notice["id_origine"]); return; } - if ($this->notice["type_doc"] == Class_TypeDoc::PERIODIQUE) { - // Periodiques Koha et orphee (1 exemplaire pour chaque numéro) - if(($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_KOHA - or $this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_ORPHEE) - and $this->flag_koha == false) { - $this->flag_koha = true; - $ret = $this->traitePeriodiquesKoha(); - $this->flag_koha = false; - return $ret; - } - - // pergame : on efface tous les articles - if($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_PERGAME) { - $clef_chapeau = $this->notice['clef_chapeau']; - $clef_numero = addslashes($this->notice['tome_alpha']); - $date = dateDuJour(0); - Class_Notice_SerialArticles::deleteBy(['clef_chapeau' => $clef_chapeau, - 'clef_numero' => $clef_numero, - 'date_maj not' => $date]); - } - - if($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_PMB) - $this->_traitePeriodiquesPMB(); - // opsys indexpresse : on cree les articles manquants - if($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_ALOES_INDEXPRESS - and $this->notice['articles_periodiques']) { - $enreg = ["clef_chapeau"=>$this->notice["articles_periodiques"]["clef_chapeau"], - "clef_numero"=>$this->notice["articles_periodiques"]["clef_numero"], - "date_maj"=>date("Y-m-d")]; - - foreach($this->notice["articles_periodiques"]["articles"] as $id_unimarc) { - $clef_unimarc = intval($id_unimarc); - - if(!$clef_unimarc) { - $this->notice["warnings"][] = ["Identifiant article de périodique incorrect", - $id_unimarc]; - continue; - } - - $instance = new Class_Entity(['UnimarcKey' => $clef_unimarc, - 'NameKey' => $this->notice['articles_periodiques']['clef_chapeau'], - 'NumberKey' => $this->notice['articles_periodiques']['clef_numero'], - 'Updated' => dateDuJour(0), - 'Quality' => $this->qualite_bib]); - Class_Notice_SerialArticles::updateOrInsert($instance); - } - } - } - - if(!$id_notice) { + if (!$id_notice) { $this->notice["qualite"] = $this->qualite_bib; $id_notice = $this->insertNotice(); if(!$id_notice) - return ; - else - $this->statut = static::RECORD_INSERT; + return; + $this->statut = static::RECORD_INSERT; } else { $this->updateNoticeWithId($id_notice); } + $this->ecrireExemplaires($id_notice); - return $this->notice; } - protected function updateNoticeWithId($id_notice) { - if(($this->identification["statut"] == "clef_alpha") && $this->flag_koha) - return $id_notice; - - return $this->updateNotice($id_notice,$this->qualite_bib); - } + protected function _handleSerials() { + if ((string)$this->notice["type_doc"] !== (string)Class_TypeDoc::PERIODIQUE) + return false; + // Periodiques Koha et orphee (1 exemplaire pour chaque numéro) + if (($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_KOHA + or $this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_ORPHEE) + and $this->flag_koha == false) { + return $this->traitePeriodiquesKoha(); + } - protected function _traitePeriodiquesPMB() { - if ($this->notice['exemplaires']) { - $titre_chapeau = $this->analyseur->get_subfield('200', 'h')[0]; - $this->notice["clef_chapeau"] = $this->indexation->codeAlphaTitre($titre_chapeau); - return; + // pergame : on efface tous les articles + if($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_PERGAME) { + $clef_chapeau = $this->notice['clef_chapeau']; + $clef_numero = addslashes($this->notice['tome_alpha']); + $date = dateDuJour(0); + Class_Notice_SerialArticles::deleteBy(['clef_chapeau' => $clef_chapeau, + 'clef_numero' => $clef_numero, + 'date_maj not' => $date]); } + // opsys indexpresse : on cree les articles manquants + if($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_ALOES_INDEXPRESS + and $this->notice['articles_periodiques']) { + $enreg = ["clef_chapeau"=>$this->notice["articles_periodiques"]["clef_chapeau"], + "clef_numero"=>$this->notice["articles_periodiques"]["clef_numero"], + "date_maj"=>date("Y-m-d")]; - $head_link = $this->analyseur->get_subfield('463', '9'); - if (!$id_bull = end(explode(':', $head_link[0]))) - return; + foreach($this->notice["articles_periodiques"]["articles"] as $id_unimarc) { + $clef_unimarc = intval($id_unimarc); + + if(!$clef_unimarc) { + $this->notice["warnings"][] = ["Identifiant article de périodique incorrect", + $id_unimarc]; + continue; + } - $id_head_record = $id_bull . '-bull'; - $titre_chapeau = $this->analyseur->get_subfield('461', 't')[0] . ' ' . $id_head_record; - $this->notice["clef_chapeau"] = $this->indexation->codeAlphaTitre($titre_chapeau); - - $this->notice['exemplaires'] = - [ - ['code_barres' => sprintf('%s-%s', - $this->id_int_bib, - $this->notice["id_origine"]), - 'type' => Class_Notice::TYPE_SERIAL_ARTICLE, - 'zone995' => serialize([ ['code' => '0', - 'valeur' => $id_head_record] ]) - ] - ]; - $this->notice["statut_exemplaires"]["nb_ex"] = 1; + $instance = new Class_Entity(['UnimarcKey' => $clef_unimarc, + 'NameKey' => $this->notice['articles_periodiques']['clef_chapeau'], + 'NumberKey' => $this->notice['articles_periodiques']['clef_numero'], + 'Updated' => dateDuJour(0), + 'Quality' => $this->qualite_bib]); + Class_Notice_SerialArticles::updateOrInsert($instance); + } + } } + protected function updateNoticeWithId($id_notice) { + if(($this->identification["statut"] == "clef_alpha") && $this->flag_koha) + return $id_notice; + + return $this->updateNotice($id_notice,$this->qualite_bib); + } + public function traiteHomogene($id_notice, $isbn, $ean, $id_commerciale, $no_request) { global $sql; @@ -413,31 +384,58 @@ class notice_integration { } - /** - * 1 item by number - */ - private function traitePeriodiquesKoha() { - if (0 == count($this->notice['exemplaires'])) - return []; - + protected function traitePeriodiquesKoha() { $number_map = [Class_IntProfilDonnees::SERIAL_FORMAT_KOHA => 'v', Class_IntProfilDonnees::SERIAL_FORMAT_ORPHEE => '6']; if (!array_key_exists($this->id_article_periodique, $number_map)) - return []; + return $this; + + if ($this->notice['tome_alpha']) + return $this; + + $serial_integration = new static(); + $serial_integration->setParamsIntegration($this->id_int_bib, + $this->type_operation, + $this->id_profil, + $this->type_doc_force); $champ_numero = $number_map[$this->id_article_periodique]; - $unimarc = $this->notice['unimarc']; - $items = $this->notice['exemplaires']; + foreach($this->notice['exemplaires'] as $item) + $serial_integration->_traitePeriodiquesKohaItem($this->notice, + unserialize($item['zone995']), + $champ_numero, + $id_origine); + + if ($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_ORPHEE) { + $this->statut = static::RECORD_SKIP; + return $this; + } - foreach($items as $item) - $this->_traitePeriodiquesKohaItem($unimarc, - unserialize($item['zone995']), - $champ_numero); + + $this->notice['type_doc'] = Class_TypeDoc::PERIODIQUE_TITLE; + $this->notice['clef_alpha'] = $this->_alphaKeyReplaceDocTypeBy($this->notice['clef_alpha'], + Class_TypeDoc::PERIODIQUE_TITLE); + $this->notice['clef_chapeau'] = ''; + + $this->notice['exemplaires'] = [ ['code_barres' => sprintf('%s-%s', + $this->id_int_bib, + $this->notice["id_origine"])] ]; + $this->notice['id_origine'] = $this->analyseur->getIssn(); + return $this; } - protected function _traitePeriodiquesKohaItem($unimarc, $champs, $champ_numero) { - $this->notice_sgbd->ouvrirNotice($unimarc, + protected function _alphaKeyReplaceDocTypeBy($alpha_key, $type_doc) { + $alpha_key_parts = explode('-', $alpha_key); + array_pop($alpha_key_parts); + array_push($alpha_key_parts, $type_doc); + return implode('-', $alpha_key_parts); + } + + + protected function _traitePeriodiquesKohaItem($title_record, $champs, $champ_numero) { + $this->flag_koha = true; + $this->notice_sgbd->ouvrirNotice($title_record['unimarc'], $this->id_profil, $this->sigb, $this->type_doc_force); @@ -454,15 +452,27 @@ class notice_integration { $numero = $this->_periodiqueKohaNumeroFrom($numero_value, $complement_titre); - $this->notice_sgbd->add_field('461', '11', 't' . $this->notice['titre_princ']); - $this->notice_sgbd->add_field('461', '11', 'v' . $numero); + $subfields = [['9', $title_record['id_origine']], + ['t', $title_record['titre_princ']], + ['v', $numero]]; + if ($complement_titre) - $this->notice_sgbd->add_field('461', '11', 'o' . $complement_titre); + $subfields []= ['o', $complement_titre]; + + if ($this->id_article_periodique == Class_IntProfilDonnees::SERIAL_FORMAT_KOHA) { + $id_origine = trim($this->notice_sgbd->get_subfield('001')[0]); + $this->notice_sgbd->delete_field('001'); + $this->notice_sgbd->add_field('001', '', $id_origine . '-' . $numero); + } + + $this->notice_sgbd->add_field('461', + '11', + $subfields); $this->notice_sgbd->add_field('995', ' ', $table_champs); $this->notice_sgbd->update(); - $this->traiteNotice($this->notice_sgbd->getFullRecord()); + $this->flag_koha = false; } @@ -634,7 +644,13 @@ class notice_integration { [Class_IntProfilDonnees::FORMAT_DUBLIN_CORE, Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND, Class_IntProfilDonnees::FORMAT_NUMEL])) - return $this->_realUpdate($existing_notice); + return $this->_realUpdate($existing_notice); // toujours écraser la notice précédente pour les ressources numériques + + /** + ICI si on est RECORD_UPDATE on sait déjà qu'on fera pas de mise à jour SQL de la notice + early return ? + */ + // Zones forcees $this->notice_sgbd @@ -651,6 +667,8 @@ class notice_integration { $statut_exemplaires = $this->notice["statut_exemplaires"]; $exemplaires = $this->notice["exemplaires"]; $warnings = $this->notice["warnings"]; + $type_doc = $this->notice["type_doc"]; + $clef_alpha = $this->notice["clef_alpha"]; // Si la notice de la base est de meilleure qualite on la prend if ($this->statut == static::RECORD_RENEW) { @@ -670,9 +688,11 @@ class notice_integration { $this->notice["warnings"] = $warnings; $this->notice["qualite"] = $qualite; $this->notice["id_origine"] = $id_origine; + $this->notice["type_doc"] = $type_doc; + $this->notice["clef_alpha"] = $clef_alpha; if ($this->statut == static::RECORD_UPDATE) - return $id_notice; + return $id_notice; // => jamais vraiment de mise à jour SQL en mode RECORD_UPDAET return $this->_realUpdate($existing_notice); } @@ -837,10 +857,8 @@ class notice_integration { $facettes[] = $tag->asFacet(); // Doc type - if($type_doc = $this->notice['infos_type_doc']) { - if($code_type_doc = $type_doc['code']){ - $facettes[] = 'T'.$code_type_doc; - } + if ($type_doc = $this->notice['type_doc']) { + $facettes[] = Class_TypeDoc::CODE_FACETTE . $type_doc; } // Dewey @@ -857,7 +875,7 @@ class notice_integration { $this->notice["full_dewey"] .= $dewey->getLibelle()." "; - $facettes[]="D".$indice; + $facettes[]= $dewey->asFacet(); } } @@ -881,7 +899,7 @@ class notice_integration { continue; if ($thesaurus->getLibelle()) $this->notice["full_dewey"] .= $thesaurus->getLibelle().' '; - $facettes[]="H".$thesaurus->getIdThesaurus(); + $facettes[]= $thesaurus->asFacet(); } } @@ -914,7 +932,7 @@ class notice_integration { $centre_interet->save(); } - $facettes[] = "F" . $centre_interet->getId(); + $facettes[] = $centre_interet->asFacet(); $this->notice["full_dewey"] .= $interet." "; } } @@ -924,10 +942,10 @@ class notice_integration { { foreach($this->notice["langues"] as $langue) { - if (Class_CodifLangue::find($langue)) - $facettes[]="L".$langue; + if ($codif_langue = Class_CodifLangue::find($langue)) + $facettes[]= $codif_langue->asFacet(); else - $this->notice["warnings"][]=array("Code langue non reconnu",$langue); + $this->notice["warnings"][]= ["Code langue non reconnu", $langue]; } } @@ -936,7 +954,7 @@ class notice_integration { { foreach(array_filter($this->notice["genres"]) as $genre) { - $facettes[]="G".$genre." "; + $facettes[]= Class_CodifGenre::CODE_FACETTE . $genre; if ($codif_genre = Class_CodifGenre::find($genre)) $this->notice["full_dewey"].=$codif_genre->getLibelle(); } @@ -944,7 +962,9 @@ class notice_integration { // emplacements if (isset($this->notice["emplacements"]) && count($this->notice['emplacements'])) - $facettes = array_merge($facettes, array_map(function($e) { return "E$e";}, $this->notice['emplacements'])); + $facettes = array_merge($facettes, + array_map(function($e) { return Class_CodifEmplacement::CODE_FACETTE . $e; }, + $this->notice['emplacements'])); // Maj enreg facette $this->notice["facettes"] = trim(implode(' ', array_unique($facettes))); @@ -962,7 +982,8 @@ class notice_integration { public function getFacetteAuteur($auteur) { return ($codif = $this->_getCodifAuteur($auteur)) - ? 'A' . $codif->getId() : ''; + ? $codif->asFacet() + : ''; } @@ -1084,8 +1105,6 @@ class notice_integration { $this->analyseur->ouvrirNotice($data,$this->id_profil,$this->sigb); $notice=$this->analyseur->getNoticeIntegration(); - // tracedebug($notice,true); //++++++++++++++++++++++++++++++++++++++++++++++++++++ - // Titre principal $ret["titre"]=$notice["titre_princ"]; @@ -1097,46 +1116,46 @@ class notice_integration { foreach($notice["exemplaires"] as $ex) { if($ex["code_barres"]==$piege_code_barres) {$ret["statut"]=1; return $ret;} - } + } } if($piege_isbn > "" and ($notice["isbn10"] == $piege_isbn or $notice["isbn13"] == $piege_isbn)) {$ret["statut"]=1; return $ret;} - if($piege_type_doc >"" and $notice["infos_type_doc"]["code"]==$piege_type_doc) {$ret["statut"]=1; return $ret; } - if($piege_titre > "" or $piege_code_barres > "" or $piege_isbn > "" or $piege_type_doc >""){$ret["statut"]=0; return $ret;} + if ($piege_type_doc >"" and $notice["infos_type_doc"]["code"]==$piege_type_doc) {$ret["statut"]=1; return $ret; } + if ($piege_titre > "" or $piege_code_barres > "" or $piege_isbn > "" or $piege_type_doc >""){$ret["statut"]=0; return $ret;} // Type de document - $td=$notice["infos_type_doc"]; - if(!$td["code"]){ $statut=1; $libelle=" code non reconnu"; $ret["type_doc"] = Class_TypeDoc::UNKNOWN; } - else {$statut=0; $libelle=$td["code"]." - ".$td["libelle"]; $ret["type_doc"]=$td["code"]; } - $ret["lig"][]=array($statut,"Type de document", $libelle,$td["infos"]); + $td=$notice["type_doc"]; + if (!$td){ $statut=1; $libelle=" code non reconnu"; $ret["type_doc"] = Class_TypeDoc::UNKNOWN; } + else {$statut=0; $libelle=$td . " - " . Class_TypeDoc::find($td)->getLibelle(); $ret["type_doc"]=$td; } + $ret["lig"][]=array($statut,"Type de document", $libelle,$td); // Statut : 0=notice vivante 1=à détruire $lig[0]=0; $lig[1]="Statut"; $lig[2]="ok"; - if($notice["statut"]==1) + if ($notice["statut"]==1) { $lig[0]=3; $lig[2]='<font color="purple">Notice à supprimer</font>'; } - else if($td["code"]!="100") + else if ($td!="100") { - if($ret["titre"] == "") {$lig[0]=2; $lig[2]="pas de titre principal";$ret["lig"][]=$lig;} - if($notice["statut_exemplaires"]["nb_ex"]==0) + if ($ret["titre"] == "") {$lig[0]=2; $lig[2]="pas de titre principal";$ret["lig"][]=$lig;} + if ($notice["statut_exemplaires"]["nb_ex"]==0) { $lig[0]=2; $lig[2]="pas de zone 995"; } else { - if($notice["statut_exemplaires"]["codes_barres"]==0) {$lig[0]=1; $lig[2]="code-barres non trouvé";} - if($notice["statut_exemplaires"]["cotes"]==0) {$lig[0]=1; $lig[2] ="cote non trouvée";} - if($notice["exportable"]==false)$lig[3]='<font color="purple">notice non libre de droits</font>'; else $lig[3]="notice libre de droits"; + if ($notice["statut_exemplaires"]["codes_barres"]==0) {$lig[0]=1; $lig[2]="code-barres non trouvé";} + if ($notice["statut_exemplaires"]["cotes"]==0) {$lig[0]=1; $lig[2] ="cote non trouvée";} + if ($notice["exportable"]==false)$lig[3]='<font color="purple">notice non libre de droits</font>'; else $lig[3]="notice libre de droits"; } } $ret["lig"][]=$lig; // articles de periodiques - if($td["code"]== "100") + if ($td== "100") { $lig[0]=0; $lig[1]="titre du numéro"; @@ -1156,26 +1175,26 @@ class notice_integration { $ret["nb_ex"]=$notice["statut_exemplaires"]["nb_ex"]; $lig[0]=0; $lig[1]="Exemplaires"; - $lig[2]=$notice["statut_exemplaires"]["nb_ex"]." ex. actif(s)"; + $lig[2]=$notice["statut_exemplaires"]["nb_ex"]." ex. actif (s)"; $lig[3]=""; - if($notice["statut_exemplaires"]["nb_ex_detruits"] > 0 ) $lig[3]=$notice["statut_exemplaires"]["nb_ex_detruits"]." ex. à supprimer"; + if ($notice["statut_exemplaires"]["nb_ex_detruits"] > 0 ) $lig[3]=$notice["statut_exemplaires"]["nb_ex_detruits"]." ex. à supprimer"; $ret["lig"][]=$lig; // Identifiants (isbn / ean) $isbn=$this->analyseur->getIsbn(); - if(!$isbn) $isbn=$this->analyseur->getEan(); + if (!$isbn) $isbn=$this->analyseur->getEan(); $lig[0]=0; $lig[1]="Identifiant"; $lig[2]=""; $lig[3]=""; - if($isbn["multiple"]==true) + if ($isbn["multiple"]==true) { $lig[0]=1; $lig[2]="Isbn multiple"; $lig[3]=$isbn["isbn"]; } - if($isbn["statut"] == 1) + if ($isbn["statut"] == 1) { $lig[0]=1; $lig[2]=$isbn["erreur"]; @@ -1183,8 +1202,8 @@ class notice_integration { } else { - if($isbn["isbn"]) {$lig[2]="isbn"; $lig[3]=$isbn["isbn"];} - if($isbn["ean"]) {$lig[2]="ean"; $lig[3]=$isbn["ean"];} + if ($isbn["isbn"]) {$lig[2]="isbn"; $lig[3]=$isbn["isbn"];} + if ($isbn["ean"]) {$lig[2]="ean"; $lig[3]=$isbn["ean"];} } $ret["lig"][]=$lig; @@ -1205,11 +1224,11 @@ class notice_integration { $lig[3]="auteur(s) : ".count($auteur); $ret["lig"][]=$lig; - if($td["code"]!= "100") // tout sauf articles de periodiques + if ($td!= "100") // tout sauf articles de periodiques { // section $lig[1]="Section"; - if(!$notice["sections"]) {$lig[0]=1; $lig[2]="non reconnue";} + if (!$notice["sections"]) {$lig[0]=1; $lig[2]="non reconnue";} else { $lig[0]=0; @@ -1221,7 +1240,7 @@ class notice_integration { // genre $lig[1]="Genre"; - if(!$notice["genres"]) {$lig[0]=1; $lig[2]="non reconnu";} + if (!$notice["genres"]) {$lig[0]=1; $lig[2]="non reconnu";} else { $lig[0]=0; @@ -1233,7 +1252,7 @@ class notice_integration { // emplacement $lig[1]="Emplacement"; - if(!$notice["emplacements"]) {$lig[0]=1; $lig[2]="non reconnu";} + if (!$notice["emplacements"]) {$lig[0]=1; $lig[2]="non reconnu";} else { $lig[0]=0; @@ -1248,7 +1267,7 @@ class notice_integration { $lig[1]="Champs à conserver"; $lig[2]=""; $lig[3]=""; - if(count($notice["champs_forces"]) > 0) + if (count($notice["champs_forces"]) > 0) { foreach($notice["champs_forces"] as $zone => $champ) $lig[2].= substr($zone,1)." "; } @@ -1260,13 +1279,13 @@ class notice_integration { $ret["statut"]=0; for($i=0; $i < count($ret["lig"]); $i++) { - if($ret["lig"][$i][0]==2) + if ($ret["lig"][$i][0]==2) { $ret["statut"]=2; break; } - if($ret["lig"][$i][0]==1) $ret["statut"]=1; - if($ret["lig"][$i][0]==3 and $ret["statut"] <2) $ret["statut"]=3; + if ($ret["lig"][$i][0]==1) $ret["statut"]=1; + if ($ret["lig"][$i][0]==3 and $ret["statut"] <2) $ret["statut"]=3; } return $ret; } @@ -1281,81 +1300,81 @@ class notice_integration { $notice=$this->analyseur->getNoticeIntegration(); // Notice à supprimer - if($notice["statut"]==1) {$ret["statut"]="suppr"; return $ret;} + if ($notice["statut"]==1) {$ret["statut"]="suppr"; return $ret;} // Notice rejetee $ret["statut"]="rejet"; - if(!$notice["titre_princ"]) {$ret["rejet"]="notice sans titre"; return $ret;} - if($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM and !$notice["statut_exemplaires"]["nb_ex"]) {$ret["rejet"]="notice sans exemplaire"; return $ret;} + if (!$notice["titre_princ"]) {$ret["rejet"]="notice sans titre"; return $ret;} + if ($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM and !$notice["statut_exemplaires"]["nb_ex"]) {$ret["rejet"]="notice sans exemplaire"; return $ret;} // Warnings $ret["statut"]="warning"; - if($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM) + if ($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM) { - if(!$notice["statut_exemplaires"]["codes_barres"]) $ret["warnings"][]="code-barres non trouvé"; - if(!$notice["statut_exemplaires"]["cotes"]) $ret["warnings"][]="cote non trouvée"; + if (!$notice["statut_exemplaires"]["codes_barres"]) $ret["warnings"][]="code-barres non trouvé"; + if (!$notice["statut_exemplaires"]["cotes"]) $ret["warnings"][]="cote non trouvée"; } - if(!$notice["type_doc"])$ret["warnings"][]="Type de document non reconnu"; + if (!$notice["type_doc"])$ret["warnings"][]="Type de document non reconnu"; // Type de doc - if($notice["type_doc"]) $ret["type_doc"]=$notice["infos_type_doc"]["libelle"]; + if ($notice["type_doc"]) $ret["type_doc"]=Class_TypeDoc::find($notice['type_doc'])->getLibelle(); // Identifiants (isbn / ean) - if($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM) + if ($notice["type_doc"] != Class_TypeDoc::LIVRE_NUM) { $isbn=$this->analyseur->getIsbn(); - if(!$isbn) $isbn=$this->analyseur->getEan(); - if($isbn["multiple"]==true) $ret["warnings"][]="Isbn multiple"; - if($isbn["statut"] == 1) $ret["warnings"][]="ISBN ou EAN incorrect"; - if($isbn["isbn"]) $ret["identifiant"]="ISBN identifié"; - elseif($isbn["ean"]) $ret["identifiant"]="EAN identifié"; + if (!$isbn) $isbn=$this->analyseur->getEan(); + if ($isbn["multiple"]==true) $ret["warnings"][]="Isbn multiple"; + if ($isbn["statut"] == 1) $ret["warnings"][]="ISBN ou EAN incorrect"; + if ($isbn["isbn"]) $ret["identifiant"]="ISBN identifié"; + elseif ($isbn["ean"]) $ret["identifiant"]="EAN identifié"; else $ret["identifiant"]="Aucun identifiant"; // Genres - if($notice["genres"]) + if ($notice["genres"]) { foreach($notice["genres"] as $genre) $ret["genres"][]=$sql->fetchOne("Select libelle from codif_genre where id_genre='$genre'"); } else $ret["warnings"][]="Code genre non reconnu"; // Sections - if($notice["sections"]) + if ($notice["sections"]) { foreach($notice["sections"] as $section) $ret["sections"][]=$sql->fetchOne("Select libelle from codif_section where id_section='$section'"); } else $ret["warnings"][]="Code section non reconnu"; // Emplacements - if($notice["emplacements"]) + if ($notice["emplacements"]) { foreach($notice["emplacements"] as $emplacement) $ret["emplacements"][]=$sql->fetchOne("Select libelle from codif_emplacement where id_emplacement='$emplacement'"); } else $ret["warnings"][]="Code emplacement non reconnu"; // Langues - if($notice["langues"]) + if ($notice["langues"]) { foreach($notice["langues"] as $langue) { $controle=$sql->fetchOne("Select libelle from codif_langue where id_langue='$langue'"); - if($controle) $ret["langues"][]=$controle; + if ($controle) $ret["langues"][]=$controle; else $ret["warnings"][]="Code langue non reconnu"; } } // Champs forcés - if(count($notice["champs_forces"]) > 0) + if (count($notice["champs_forces"]) > 0) { foreach($notice["champs_forces"] as $zone => $champ) $ret["zones_forcees"][]= substr($zone,1); } } // Notice sans anomalie - if(!$ret["warnings"]) $ret["statut"]="ok"; + if (!$ret["warnings"]) $ret["statut"]="ok"; // Nombre d'exemplaires $ret["nb_ex"]=$notice["statut_exemplaires"]["nb_ex"]; - if($ret["nb_ex"] > 100) $ret["warnings"][]="trop d'exemplaires"; + if ($ret["nb_ex"] > 100) $ret["warnings"][]="trop d'exemplaires"; return $ret; } @@ -1371,7 +1390,7 @@ class notice_integration { $zone=substr($champ,0,3); $sous_champ=substr($champ,-1); $valeur=$this->analyseur->get_subfield($zone,$sous_champ); - if(!$valeur) $valeur[0] = "non renseigné"; + if (!$valeur) $valeur[0] = "non renseigné"; foreach($valeur as $code) { $ret[$champ][$code]++; diff --git a/cosmogramme/php/classes/classe_profil_donnees.php b/cosmogramme/php/classes/classe_profil_donnees.php index c6f51ca655322388bdeae9a4ac94a437da73ea2e..086c234fe0dcf6373797bcc2a660492f509cf46c 100644 --- a/cosmogramme/php/classes/classe_profil_donnees.php +++ b/cosmogramme/php/classes/classe_profil_donnees.php @@ -126,18 +126,19 @@ class profil_donnees { $this->attributs[0]["type_doc"][$i]["label"] = []; $this->attributs[0]["type_doc"][$i]["zone_995"] = []; - for($j=0; $j < count($td); $j++) { - if(!isset($td[$j]["label"])) + foreach($td as $j => $definition) { + if(!isset($definition["label"])) continue; - if($td[$j]["code"] == $type_doc->getId()) { - $this->attributs[0]["type_doc"][$i]["label"]=explode(";",$td[$j]["label"]); - $this->attributs[0]["type_doc"][$i]["zone_995"]=explode(";",$td[$j]["zone_995"]); + if ($definition["code"] == $type_doc->getId()) { + $this->attributs[0]["type_doc"][$i]["label"]=explode(";",$definition["label"]); + $this->attributs[0]["type_doc"][$i]["zone_995"]=explode(";",$definition["zone_995"]); break; } } } + // decompacter et consolider champs xml $champs = getCodifsVariable("champs_abonne"); foreach($champs as $champ) { diff --git a/cosmogramme/php/classes/classe_unimarc.php b/cosmogramme/php/classes/classe_unimarc.php index 49aa13f3ac7bc5c777639b01ee22acaff92e7a8c..683020e7b9d6e66f7184758d96d31cf7f918e9d2 100644 --- a/cosmogramme/php/classes/classe_unimarc.php +++ b/cosmogramme/php/classes/classe_unimarc.php @@ -37,6 +37,9 @@ class notice_unimarc extends iso2709_record { '949', // Libermedia ]; + const RECORD_STATUS_OK = 0; + const RECORD_STATUS_DELETED = 1; + private $id_profil; // Id du profil de données pour le fichier chargé private $profil_unimarc; // Instance du profil unimarc pour optimiser private $type_doc_force; // Type de document forcé dans maj_auto @@ -44,14 +47,13 @@ class notice_unimarc extends iso2709_record { protected $profil; // Structure des valeurs du profil en cours private $copyright; // Mots clefs pour les notices non libres de droits (801$b) private $sigb; // Pour traitements specifiques - private $champs_forces; // Liste des champs forcés private $ean345; // Reconnaissance des ean par la zone 345$b private $regles_sections_genres; // Règles de reconnaissance des sections et des genres private $id_genre_documentaire; // Identifiant pour le genre "documentaire" private $controle_codes_barres; // Exception de filtrage des codes-barres protected $_id_bib; // Bibliotheque d'intégration protected $_fluent; // Class_NoticeUnimarc_Fluent - + protected $_type_doc; //type do document public function __construct($id_bib=null) { $this->_id_bib = $id_bib; @@ -60,8 +62,6 @@ class notice_unimarc extends iso2709_record { $data = getVariable('non_exportable'); $this->copyright = explode(';', $data); $this->controle_codes_barres = getVariable('controle_codes_barres'); - $data = getVariable('champs_sup'); - $this->champs_forces = explode(';', $data); $this->ean345 = getVariable('ean_345'); // Règles sections, genres, emplacements @@ -71,6 +71,7 @@ class notice_unimarc extends iso2709_record { public function ouvrirNotice($data, $id_profil, $sigb=0, $type_doc_force='', $decode_string = true) { + $this->_type_doc = null; $this->type_doc_force['label'] = $type_doc_force; $type_doc_map = ['a' => '1', 'j' => '3', 'g' => '4', 'l' => '5', 'c' => '6', 'f' => '7']; @@ -125,27 +126,13 @@ class notice_unimarc extends iso2709_record { } - public function getNoticeIntegration() { - $type_doc = $this->getTypeDocAsArray(); - if ($type_doc['code'] == Class_TypeDoc::SERIAL_ARTICLE) - return $this->getNoticeIntegrationArticlePeriodique(); - - if ($type_doc['code'] == Class_TypeDoc::PERIODIQUE) - $notice['articles_periodiques'] = $this->getIdArticlesPeriodiques(); - - // exemplaires - $ex = $this->getExemplaires(); - $warnings = $ex['warnings']; - - //external url - $this->updateItemsWithUrl($ex['exemplaires']); - - // Isbn /ean + protected function _getIdentifiers($type_doc) { $trav = $this->getIsbn(); if($trav['statut'] == 1) $warnings[] = ['isbn incorrect', $trav['code_brut']]; $isbn = $trav['isbn']; $ean = $trav['ean']; + if(!$isbn and !$ean) { $trav = $this->getEan(); if($trav['statut'] == 1) @@ -155,23 +142,55 @@ class notice_unimarc extends iso2709_record { } // Virer ISBN si autre que livre - if ((!$type = Class_TypeDoc::find((int)$type_doc['code'])) + if ((!$type = Class_TypeDoc::find((int)$type_doc)) || !$type->isBook()) { - $trav['isbn10'] = $trav['isbn13'] = $isbn = ''; + $trav['isbn10'] = $trav['isbn13'] = $trav['isbn'] = ''; } + return $trav; + } + + + public function getNoticeIntegration() { + $type_doc = $this->getTypeDoc(); + if ($type_doc == Class_TypeDoc::SERIAL_ARTICLE) + return $this->getNoticeIntegrationArticlePeriodique(); + + if ($type_doc == Class_TypeDoc::PERIODIQUE) + $notice['articles_periodiques'] = $this->getIdArticlesPeriodiques(); + + // exemplaires + $ex = $this->getExemplaires(); + $warnings = $ex['warnings']; + + //external url + $this->updateItemsWithUrl($ex['exemplaires']); + + $record_identifiers = $this->_getIdentifiers($type_doc); + // Structure notice $notice["statut"] = $this->getStatut(); - $notice["isbn"] = $isbn; - $notice["isbn10"] = $trav["isbn10"]; - $notice["isbn13"] = $trav["isbn13"]; - $notice["ean"] = $ean; + $notice["isbn"] = $record_identifiers['isbn']; + $notice["isbn10"] = $record_identifiers['isbn10']; + $notice["isbn13"] = $record_identifiers['isbn13']; + $notice["ean"] = $record_identifiers['ean']; $notice["id_origine"] = $this->getIdOrigine(); - $notice["clef_alpha"] = $this->getClefAlpha(); - $notice["clef_oeuvre"] = $this->getClefAlpha(true); + $notice["tome_alpha"] = $this->indexation->alphaMaj($this->getTome()); + $notice["clef_alpha"] = $this->indexation->getClefAlpha( + $this->getTypeDoc(), + $this->getTitrePrincipal(), + $this->getComplementTitre(), + $this->getAuteurClefAlpha(), + $notice['tome_alpha'], + $this->getEditeur(), + $this->getAnnee()); + $notice["clef_oeuvre"] = $this->indexation->getClefOeuvre( + $this->getTitrePrincipal(), + $this->getComplementTitre(), + $this->getAuteurClefAlpha(), + $notice['tome_alpha']); $notice["clef_chapeau"] = $this->getClefChapeau(); $notice["titre_princ"] = $this->getTitrePrincipal(); - $notice["tome_alpha"] = $this->indexation->alphaMaj($this->getTome()); $notice["alpha_titre"] = $this->indexation->codeAlphaTitre($notice["titre_princ"]." ".$notice["tome_alpha"]); $notice["id_commerciale"] = $this->getIdCommerciale($notice["alpha_titre"]); $notice["titres"] = $this->getTitres(); @@ -190,8 +209,8 @@ class notice_unimarc extends iso2709_record { $notice["matieres"] = $this->getMatieresLabels(); $notice["matieres_renvois"] = $this->getMatieresRenvois(); $notice["annee"] = $this->getAnnee(); - $notice["type_doc"] = $type_doc["code"]; - $notice["infos_type_doc"] = $type_doc; + $notice["type_doc"] = $type_doc; + $notice["exportable"] = $this->getExportable(); $notice["dewey"] = $this->getDewey(); @@ -216,6 +235,12 @@ class notice_unimarc extends iso2709_record { if (!empty($ret["genre"])) $notice["genres"] = $ret["genre"]; + if (in_array((string)$notice["type_doc"], + [(string)Class_TypeDoc::PERIODIQUE, + (string)Class_TypeDoc::PERIODIQUE_TITLE, + (string)Class_TypeDoc::PERIODIQUE_ARTICLE])) + $notice = $this->_handleSerials($notice); + if ($notice["statut_exemplaires"]["nb_ex"] > 0) { for($i=0; $i <count($notice["exemplaires"]); $i++) { $exemplaire = $notice["exemplaires"][$i]; @@ -244,6 +269,97 @@ class notice_unimarc extends iso2709_record { return $notice; } + + protected function _handleSerials($notice) { + if ((int)$this->profil["id_article_periodique"] == Class_IntProfilDonnees::SERIAL_FORMAT_PMB) { + return $this->_handleSerialsPMB($notice); + } + + + if ((int)$this->profil["id_article_periodique"] == Class_IntProfilDonnees::SERIAL_FORMAT_KOHA) { + return $this->_handleSerialsKoha($notice); + } + + return $notice; + } + + + protected function _handleSerialsKoha($notice) { + if (0 != count($notice['exemplaires'])) + return $notice; + + if (!$record_001 = $this->get_subfield('461', '9')[0]) + return $notice; + + $numero = $this->get_subfield('461', 'v')[0]; + $id_head_record = $record_001 . '-' . $numero; + return $this->_generateItemForSerialRecordLink($notice, $numero, $id_head_record); + } + + + protected function _handleSerialsPMB($notice) { + if ($notice['exemplaires']) { + $titre_chapeau = $this->get_subfield('200', 'h')[0]; + $notice["clef_chapeau"] = $this->indexation->codeAlphaTitre($titre_chapeau); + $notice["tome_alpha"] = $this->indexation->alphaMaj($this->get_subfield('463', 'v')[0]); + $notice["clef_oeuvre"] = $this->indexation->getClefOeuvre($titre_chapeau, + $this->getComplementTitre(), + $this->getAuteurClefAlpha(), + $notice['tome_alpha']); + + $notice["clef_alpha"] = $this->indexation->getClefAlpha( + $this->getTypeDoc(), + $this->getTitrePrincipal(), + $this->getComplementTitre(), + $this->getAuteurClefAlpha(), + $notice['tome_alpha'], + $this->getEditeur(), + $this->getAnnee()); + + return $notice; + } + + + if ($notice['type_doc'] == Class_TypeDoc::PERIODIQUE_TITLE) { + $notice['exemplaires'] = [ + ['code_barres' => sprintf('%s-%s', + $this->_id_bib, + $notice["id_origine"]) ] + ]; + $notice["statut_exemplaires"]["nb_ex"] = 1; + return $notice; + } + + + $head_link = $this->get_subfield('463', '9'); + if (!$id_bull = end(explode(':', $head_link[0]))) + return $notice; + + $numero = $this->indexation->alphaMaj($this->get_subfield('463', 'v')[0]); + $id_head_record = $id_bull . '-bull'; + return $this->_generateItemForSerialRecordLink($notice, $numero, $id_head_record); + } + + + protected function _generateItemForSerialRecordLink($notice, $numero, $id_head_record) { + $titre_chapeau = $this->get_subfield('461', 't')[0]; + $notice["clef_chapeau"] = $this->indexation->serialCodeAlphaChapeau($titre_chapeau, $numero); + + $notice['exemplaires'] = [ + ['code_barres' => sprintf('%s-%s', + $this->_id_bib, + $notice["id_origine"]), + 'type' => Class_Notice::TYPE_SERIAL_ARTICLE, + 'zone995' => serialize([ ['code' => '0', + 'valeur' => $id_head_record] ]) + ] + ]; + $notice["statut_exemplaires"]["nb_ex"] = 1; + return $notice; + } + + + // ---------------------------------------------------------------- // Notice de periodique // ---------------------------------------------------------------- @@ -251,8 +367,6 @@ class notice_unimarc extends iso2709_record { { // type de doc $notice["type_doc"] = Class_TypeDoc::SERIAL_ARTICLE; - $notice["infos_type_doc"] = ["code"=> Class_TypeDoc::SERIAL_ARTICLE, 'libelle'=>"article de périodique"]; - // statut $notice["statut"] = $this->getStatut(); $notice["clef_chapeau"]=""; @@ -281,7 +395,7 @@ class notice_unimarc extends iso2709_record { // clef titre de l'article $titre=$this->getTitrePrincipal(); - $notice["titre_princ"]=$titre; + $notice["titre_princ"] = $titre; $titre=$this->indexation->codeAlphaTitre($titre); $notice["clef_article"]=substr($titre,0,20); @@ -891,6 +1005,12 @@ class notice_unimarc extends iso2709_record { } + public function getIssn() { + $issn = $this->get_subfield("011", "a"); + return trim($issn[0]); + } + + protected function _detectIsbn($datas) { if (!$datas) return ''; @@ -928,7 +1048,7 @@ class notice_unimarc extends iso2709_record { $code=trim($data[0]); if($code) { - $oIsbn=new class_isbn($code); + $oIsbn = new Class_Isbn($code); $ean=$oIsbn->getAll(); } } @@ -994,21 +1114,6 @@ class notice_unimarc extends iso2709_record { } - public function getClefAlpha($oeuvre=false) { - $type_doc = $this->getTypeDoc(); - $titre = $this->getTitrePrincipal(); - $complement_titre = $this->getComplementTitre(); - $auteur = $this->getAuteurClefAlpha(); - $editeur = $this->getEditeur(); - $annee = $this->getAnnee(); - $tome = $this->getTome(); - - return ($oeuvre) ? - $this->indexation->getClefOeuvre($titre, $complement_titre, $auteur, $tome) : - $this->indexation->getClefAlpha($type_doc, $titre, $complement_titre, $auteur, $tome, $editeur, $annee); - } - - public function getClefChapeau() { if (!$titre = $this->get_subfield('461', 't')) $titre = $this->get_subfield('410', 't'); @@ -1019,7 +1124,10 @@ class notice_unimarc extends iso2709_record { } - public function getTypeDoc($infos=false) { + public function getTypeDoc() { + if (null !== $this->_type_doc) + return $this->_type_doc; + if($this->type_doc_force['label']) $this->inner_guide['dt'] = $this->type_doc_force['label']; @@ -1045,27 +1153,8 @@ class notice_unimarc extends iso2709_record { ? $this->type_doc_force['code'] : $this->profil_unimarc->getTypeDoc($label, $z995r, $z995p)['code']; - if ($infos) { - $ret["code"] = $typeDoc["code"]; - $ret["infos"] = "Label=".$label; - if (isset($z995r[0])) - $ret["infos"] .= " - "."995\$r=".$z995r[0]; - if (isset($z995p[0])) - $ret["infos"] .= " - \$p=".$z995p[0]; - - $ret["libelle"] = ($this->type_doc_force["label"] > "") - ? getLibCodifVariable('types_docs', $typeDoc['code']) - : ''; - - return $ret; - } - - return ($typeDoc['code']) ? $typeDoc['code'] : 0; - } - - - public function getTypeDocAsArray() { - return $this->getTypeDoc(true); + $this->_type_doc = ($typeDoc['code']) ? $typeDoc['code'] : 0; + return $this->_type_doc; } @@ -1430,9 +1519,9 @@ class notice_unimarc extends iso2709_record { * 0=ok 1=detruire la notice */ public function getStatut() { - $statut = 0; + $statut = static::RECORD_STATUS_OK; if ($this->inner_guide['rs'] == 'd') - $statut = 1; + $statut = static::RECORD_STATUS_DELETED; $ex = $data = $this->get_subfield('995'); $nb_ex = count($ex); @@ -1444,7 +1533,7 @@ class notice_unimarc extends iso2709_record { $nb_ex_detruit++; if ($nb_ex_detruit >= $nb_ex and $nb_ex > 0) - $statut = 1; + $statut = static::RECORD_STATUS_DELETED; return $statut; } @@ -1512,18 +1601,6 @@ class notice_unimarc extends iso2709_record { } - public function getChampsForces() { - $champ_forces = []; - for($i=0; $i < count($this->champs_forces); $i++) { - $champ = $this->get_subfield($this->champs_forces[$i]); - for($j=0; $j < count($champ); $j++) { - $champ_forces["Z" . $this->champs_forces[$i]][] = $champ[$j]; - } - } - return $champ_forces; - } - - public function getAll() { $data = $this->get_subfield(200, 'a'); $notice["titre_princ"] = $data[0]; diff --git a/cosmogramme/tests/php/classes/KohaPeriodiquesTest.php b/cosmogramme/tests/php/classes/KohaPeriodiquesTest.php index 7c0aa43197deb1864a29520b0264286d54c4769d..acdc8459ae75117e58daa0fe99fcffe4a6b10da4 100644 --- a/cosmogramme/tests/php/classes/KohaPeriodiquesTest.php +++ b/cosmogramme/tests/php/classes/KohaPeriodiquesTest.php @@ -100,21 +100,29 @@ class KohaPeriodiquesMarieClaireTest extends KohaPeriodiquesTestCase { /** @test */ - public function shouldHaveInserted21Records() { - $this->assertEquals(21, count(Class_Notice::findAll())); + public function loadNoticeShouldHaveInserted22Records() { + $this->assertEquals(22, count(Class_Notice::findAll())); } /** @test */ - public function typeDocShouldBeTwo() { - $this->assertEquals(2, + public function typeDocShouldBePerTitle() { + $this->assertEquals('per_title', $this->notice_integration->noticeToDBEnreg($this->notice_data)['type_doc']); } /** @test */ - public function shouldHaveInserted51Items() { - $this->assertEquals(51, count(Class_Exemplaire::findAll())); + public function loadNoticeShouldHaveInserted52Items() { + $this->assertEquals(52, count(Class_Exemplaire::findAll())); + } + + + /** @test */ + public function firstRecordItemThatIsPeriodicTitleShouldBeOneDash139179() { + $this->assertEquals('1-139179', + Class_Notice::findFirstBy(['type_doc' => 'per_title']) + ->getFirstExemplaire()->getCodeBarres()); } @@ -136,7 +144,7 @@ class KohaPeriodiquesMarieClaireTest extends KohaPeriodiquesTestCase { /** @test */ public function lastTitle411dollarOShouldBeEmpty() { - $this->assertNull($this->getSubfieldAt('461', 'o', 2, $this->marcDumpFor($this->unimarcAt(20)))); + $this->assertNull($this->getSubfieldAt('461', 'o', 0, $this->marcDumpFor($this->unimarcAt(20)))); } @@ -158,7 +166,7 @@ class KohaPeriodiquesMarieClaireTest extends KohaPeriodiquesTestCase { public function firstNumberShouldBe725() { $this->assertEquals( '725', - $this->getSubfieldAt('461', 'v', 1, $this->marcDumpFor($this->unimarcAt(0)))); + $this->getSubfieldAt('461', 'v', 0, $this->marcDumpFor($this->unimarcAt(0)))); } @@ -166,7 +174,15 @@ class KohaPeriodiquesMarieClaireTest extends KohaPeriodiquesTestCase { public function firstSubtitleShouldBeJanvier2013() { $this->assertEquals( 'Janvier 2013', - $this->getSubfieldAt('461', 'o', 2, $this->marcDumpFor($this->unimarcAt(0)))); + $this->getSubfieldAt('461', 'o', 0, $this->marcDumpFor($this->unimarcAt(0)))); + } + + + /** @test */ + public function subfield461Dollar9ShouldContains001FromTitleRecord139179() { + $this->assertEquals( + '139179', + $this->getSubfieldAt('461', '9', 0, $this->marcDumpFor($this->unimarcAt(1)))); } @@ -174,7 +190,7 @@ class KohaPeriodiquesMarieClaireTest extends KohaPeriodiquesTestCase { public function firstSetNameShouldBeMarieClaire() { $this->assertEquals( 'MARIE CLAIRE', - $this->getSubfieldAt('461', 't', 0, $this->marcDumpFor($this->unimarcAt(0)))); + $this->getSubfieldAt('461', 't', 0, $this->marcDumpFor($this->unimarcAt(1)))); } @@ -244,14 +260,30 @@ class KohaPeriodiquesMarieClaireWithoutDoubleSearchTest extends KohaPeriodiquesT /** @test */ - public function shouldHaveInserted21RecordsToo() { - $this->assertEquals(21, count(Class_Notice::findAll())); + public function shouldHaveInserted22RecordsToo() { + $this->assertEquals(22, count(Class_Notice::findAll())); + } + + + /** @test */ + public function shouldHaveInserted52Items() { + $this->assertCount(52, Class_Exemplaire::findAll()); + } +} + + + + +class KohaPeriodiquesIdeatTest extends KohaPeriodiquesTestCase { + public function setUp() { + parent::setUp(); + $this->loadNotice('unimarc_koha_perios_ideat'); } /** @test */ - public function shouldHaveInserted51Items() { - $this->assertCount(51, Class_Exemplaire::findAll()); + public function numberOfRecordsShouldBeSeven() { + $this->assertCount(7, Class_Notice::findAll()); } } @@ -281,8 +313,8 @@ class KohaPeriodiquesGeoAdoTest extends KohaPeriodiquesTestCase { /** @test */ - public function numberOfNoticesShouldBeSixtyFive() { - $this->assertEquals(65, count(Class_Notice::findAll())); + public function numberOfNoticesShouldBeSixtySix() { + $this->assertEquals(66, count(Class_Notice::findAll())); } @@ -323,20 +355,20 @@ class KohaPeriodiquesImagesDocTest extends KohaPeriodiquesTestCase { /** @test */ - public function numberOfNoticesShouldBe58() { - $this->assertEquals(58, count(Class_Notice::findAll())); + public function numberOfNoticesShouldBe59() { + $this->assertEquals(59, count(Class_Notice::findAll())); } /** @test */ - public function numberOfExemplairesShouldBe271() { - $this->assertEquals(271, count(Class_Exemplaire::findAll())); + public function numberOfExemplairesShouldBe272() { + $this->assertEquals(272, count(Class_Exemplaire::findAll())); } } -class KohaPeriodiquesOkapiTest extends KohaPeriodiquesTestCase { +class KohaPeriodiquesLaPagailleAndOkapiTest extends KohaPeriodiquesTestCase { public function getProfilDonnees() { $profil = Class_IntProfilDonnees::forKoha() ->setIdProfil(113) @@ -349,6 +381,8 @@ class KohaPeriodiquesOkapiTest extends KohaPeriodiquesTestCase { public function setUp() { parent::setUp(); + + $this->loadNotice('unimarc_la_pagaille'); $this->loadNotice('unimarc_okapi'); $this->loadNotice('unimarc_okapi2'); } @@ -369,8 +403,259 @@ class KohaPeriodiquesOkapiTest extends KohaPeriodiquesTestCase { /** @test */ - public function numberOfNoticesShouldBe60() { - $this->assertEquals(60, count(Class_Notice::findAll())); + public function numberOfNoticesShouldBe61() { + $this->assertEquals(61, count(Class_Notice::findAll())); + } + + + /** @test */ + public function perTitleRecordShouldBeDeduplicated() { + $ex = Class_Notice::findAllBy(['type_doc' => 'per_title']); + $this->assertEquals(1, Class_Notice::countBy(['type_doc' => 'per_title'])); + } + + + /** @test */ + public function perTitleRecordItemShouldHaveIdOrigine0751_6002ForISSN() { + $this->assertEquals('0751-6002', + Class_Notice::findFirstBy(['type_doc' => 'per_title']) + ->getFirstExemplaire()->getIdOrigine()); + } + + + /** @test */ + public function perTitleRecordItemTypeShouldBeBibliographic() { + $this->assertEquals(Class_Notice::TYPE_BIBLIOGRAPHIC, + Class_Notice::findFirstBy(['type_doc' => 'per_title']) + ->getFirstExemplaire()->getType()); + } +} + + + + +abstract class KohaPeriodiquesWithArticlesTestCase extends KohaPeriodiquesTestCase { + public function getProfilDonnees() { + return Class_IntProfilDonnees::forKoha() + ->setIdProfil(113) + ->setTypeDocRecognition(Class_TypeDoc::PERIODIQUE, '', 'PER') + ->setTypeDocRecognition(Class_TypeDoc::PERIODIQUE_TITLE, 'as', '') + ->setTypeDocField('h') + ->getRawAttributes(); + } +} + + + + +class KohaPeriodiquesMatriculeAngesTest extends KohaPeriodiquesWithArticlesTestCase { + public function setUp() { + parent::setUp(); + $this->loadRecordsFromFile('unimarc_article_matricule_ange'); + $this->loadRecordsFromFile('unimarc_article_matricule_ange2'); + $this->loadRecordsFromFile('unimarc_serial_matricule_ange'); + } + + + /** @test */ + public function numberOfRecordsShouldBe52() { + $this->assertEquals(52, count(Class_Notice::findAll())); + } + + + /** @test */ + public function firstItemFromMatriculeDesAnges995DollarZeroShould111511_202() { + $this->assertEquals('111511-202', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE])->getFirstExemplaire()->getSubfield(0)); + } + + + /** @test */ + public function recordMatriculeAnges202ItemIdOrigineShouldBe111511_202() { + $this->assertEquals('Matricule des Anges (Le) n° 202', + Class_Exemplaire::findFirstBy(['id_origine' => '111511-202'])->getNotice()->getTitrePrincipal()); + } + + + /** @test */ + public function firstArticleRecordTitleShouldContainsUlysseAuBayou() { + $this->assertContains('Ulysse au bayou', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE]) + ->getTitrePrincipal()); + } + + + /** @test */ + public function firstArticleRecordHeadRecordKeyShouldBeMatriculeDesAnges_202() { + $this->assertEquals('MATRICULE DES ANGES LE 202', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE]) + ->getClefChapeau()); + } + + + /** @test */ + public function afterFirstArticleRecordRenewShouldKeepHeadRecord() { + $this->loadRecordsFromFile('unimarc_article_matricule_ange'); + $this->assertEquals('MATRICULE DES ANGES LE 202', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE]) + ->getClefChapeau()); + } + + + /** @test */ + public function numberOfRecordsWithHeadKeyMatriculeAngesShould28() { + $this->assertCount(28, + Class_Notice::findAllBy(['clef_chapeau' => 'MATRICULE DES ANGES LE'])); + } + + + /** @test */ + public function twoRecordsShouldHaveTypeDocPERIODIQUE_TITLE() { + $this->assertCount(2, + Class_Notice::findAllBy(['type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])); + } + + + /** @test */ + public function titleRecordMatriculeAngesAlphaKeyShouldBeMatriculeAngePerTitle() { + $this->assertEquals('MATRICULEDESANGESLE-JOURNALDINFORMATION---LEMATRICULEDESANGES-1992-per_title', + Class_Notice::findFirstBy(['order' => 'id desc', + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE]) + ->getClefAlpha()); + } + + + /** @test */ + public function titleRecordMatriculeAngesHeadKeyShouldBeEmpty() { + $this->assertEquals('', + Class_Notice::findFirstBy(['order' => 'id desc', + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE]) + ->getClefChapeau()); + } + + + /** @test */ + public function afterReimportShouldStillHave28RecordsWithHeadKeyMatriculeAnges() { + Class_Notice::findFirstBy(['clef_chapeau' => 'MATRICULE DES ANGES LE']) + ->setClefChapeau('POUET') + ->save(); + + $this->loadRecordsFromFile('unimarc_serial_matricule_ange'); + Class_Notice::clearCache(); + $this->assertCount(28, + Class_Notice::findAllBy(['clef_chapeau' => 'MATRICULE DES ANGES LE'])); + + } + + + /** @test */ + public function thityTwothRecordAlphaKeyShouldBeMatriculeAngePerTitleAfterUpdate() { + $record = Class_Notice::findFirstBy(['clef_alpha' => 'MATRICULEDESANGESLE-JOURNALDINFORMATION---LEMATRICULEDESANGES-1992-per_title']) + ->setClefAlpha('POUET'); + + $id = $record->getId(); + $record->save(); + + $this->loadRecordsFromFile('unimarc_serial_matricule_ange'); + + $this->assertEquals('MATRICULEDESANGESLE-JOURNALDINFORMATION---LEMATRICULEDESANGES-1992-per_title', + Class_Notice::find($id)->getClefAlpha()); + } + + + /** @test */ + public function titleRecordMatriculeTitleShouldBeMatriculeAnge() { + $this->assertEquals('Matricule des Anges (Le)', + Class_Notice::findFirstBy(['order' => 'id desc', + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE]) + ->getTitrePrincipal()); + } + + + /** @test */ + public function titleRecordMatriculeFacettesShouldContainsTper_title() { + $this->assertContains('Tper_title', + Class_Notice::findFirstBy(['order' => 'id desc', + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE]) + ->getFacettes()); + } + + + /** @test */ + public function firstMatriculeAngesSerialShouldHave461WithIdAndNumber() { + $record = Class_Notice::findFirstBy(['clef_chapeau' => 'MATRICULE DES ANGES LE']); + + $this->assertEquals('111511 Matricule des Anges (Le) 179', + $record->getAllStringsInFields([['461', '9'], ['461', 't'], ['461', 'v'],])); + } +} + + + + +class KohaPeriodiquesAnimanTest extends KohaPeriodiquesWithArticlesTestCase { + public function setUp() { + parent::setUp(); + $this->loadRecordsFromFile('unimarc_koha_animan'); + } + + + /** @test */ + public function numberOfRecordsShouldBe37() { + $this->assertEquals(37, count(Class_Notice::findAll())); + } + + + /** @test */ + public function numberOfTitleRecordsShouldBeOne() { + $this->assertCount(1, + Class_Notice::findAllBy(['type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])); + } + + + /** @test */ + public function perTitleRecordFacetsShouldContainsTper_title() { + $this->assertContains('Tper_title', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])->getFacettes()); + } +} + + + + +class KohaPeriodiquesAlternativesEcoTest extends KohaPeriodiquesWithArticlesTestCase { + public function setUp() { + parent::setUp(); + $this->loadRecordsFromFile('unimarc_koha_alter_eco'); + } + + + /** @test */ + public function numberOfPeriodicTitleShouldBeZero() { + $this->assertEquals(0, + Class_Notice::countBy(['type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])); + } + + + /** @test */ + public function numberOfRecordShouldBeOne() { + $this->assertEquals(1, Class_Notice::countBy([])); + } +} + + + + +class KohaPeriodiquesDugroinLabelASWithoutItemsTest extends KohaPeriodiquesWithArticlesTestCase { + public function setUp() { + parent::setUp(); + $this->loadRecordsFromFile('unimarc_koha_dugroin'); + } + + + /** @test */ + public function numberOfRecordsShouldBeZero() { + $this->assertEquals(0, count(Class_Notice::findAll())); } } diff --git a/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php index 6a4cd3cf97a75eaff4ca797c340ee99e2ce9c661..c16b3a59c0c83a5e02cf490c3fc9eee810b2cd94 100644 --- a/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php +++ b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php @@ -217,6 +217,9 @@ class NanookRecordsIntegrationAuxAnimauxLaGuerreTest extends NanookRecordsIntegr } } + + + class NanookRecordsIntegrationLeChantDesAbbayesTest extends NanookRecordsIntegrationTestCase { public function setUp() { parent::setUp(); @@ -229,9 +232,17 @@ class NanookRecordsIntegrationLeChantDesAbbayesTest extends NanookRecordsIntegra $notice = Class_Notice::find(1); $this->assertTrue(strpos($notice->getFacettes(),'P347 P3092') != FALSE); } + + + /** @test */ + public function eanShouldBe3149020854846() { + $this->assertEquals('3149020854846', Class_Notice::find(1)->getEan()); + } } + + class NanookRecordsIntegrationUpdateNoticeTest extends NoticeIntegrationTestCase { protected $_profil_donnees = ['id_profil' => 150, 'id' => 150, diff --git a/cosmogramme/tests/php/classes/NoticeIntegrationOrpheeTest.php b/cosmogramme/tests/php/classes/NoticeIntegrationOrpheeTest.php index a7d9d95305153db80d94ef946da9165ab8f4cc7b..66ef8c70df33b16627f1a00ca6b1ad1763c7a86b 100644 --- a/cosmogramme/tests/php/classes/NoticeIntegrationOrpheeTest.php +++ b/cosmogramme/tests/php/classes/NoticeIntegrationOrpheeTest.php @@ -23,21 +23,25 @@ require_once 'NoticeIntegrationTest.php'; +abstract class NoticeIntegrationOrpheeTestCase extends NoticeIntegrationTestCase { + public function getProfilDonnees() { + return Class_IntProfilDonnees::forOrphee() + ->setIdProfil(110) + ->getRawAttributes(); + } +} + + + + /** @see http://forge.afi-sa.fr/issues/24365 */ -class NoticeIntegrationOrpheeDegreeTest extends NoticeIntegrationTestCase { +class NoticeIntegrationOrpheeDegreeTest extends NoticeIntegrationOrpheeTestCase { public function setUp() { parent::setUp(); $this->loadNotice('unimarc_orphee_24365'); } - public function getProfilDonnees() { - return Class_IntProfilDonnees::forOrphee() - ->setIdProfil(110) - ->getRawAttributes(); - } - - /** @test */ public function recordShouldHaveOneItem() { $this->assertEquals(1, Class_Exemplaire::count()); @@ -54,7 +58,7 @@ class NoticeIntegrationOrpheeDegreeTest extends NoticeIntegrationTestCase { /** @see http://forge.afi-sa.fr/issues/96923 */ -class NoticeIntegrationOrpheeSerialWithDoubleSearchNoneTest extends NoticeIntegrationTestCase { +class NoticeIntegrationOrpheeSerialWithDoubleSearchNoneTest extends NoticeIntegrationOrpheeTestCase { protected $_sigb = Class_IntBib::SIGB_ORPHEE, $_items; @@ -70,22 +74,22 @@ class NoticeIntegrationOrpheeSerialWithDoubleSearchNoneTest extends NoticeIntegr } - public function getProfilDonnees() { - return Class_IntProfilDonnees::forOrphee() - ->setIdProfil(110) - ->getRawAttributes(); - } - - /** @test */ public function shouldCreate29Records() { $this->assertEquals(29, Class_Notice::count()); } + /** @test */ + public function firstItemIdOrigineshouldBefrOr0939524523() { + $this->assertEquals('frOr0939524523', + Class_Exemplaire::find(1)->getIdOrigine()); + } + + /** @test */ public function shouldHaveCreated29Items() { - $this->assertEquals(29, Class_Exemplaire::count()); + $this->assertEquals(29, $this->_items->count()); } @@ -100,13 +104,10 @@ class NoticeIntegrationOrpheeSerialWithDoubleSearchNoneTest extends NoticeIntegr } - /** - * @test - * @dataProvider numbers - */ - public function numberShouldHaveItsRecord($number) { - $key = 'GEO-UNNOUVEAUMONDELATER--' . $number . '-GEO-1979-2'; - $this->assertNotNull(Class_Notice::findFirstBy(['clef_alpha' => $key])); + /** @test */ + public function firstRecordClefAlphaShouldExpectation() { + $this->assertEquals('458', + Class_Exemplaire::find(1)->getSubfield(6)); } @@ -121,4 +122,46 @@ class NoticeIntegrationOrpheeSerialWithDoubleSearchNoneTest extends NoticeIntegr return $item->getSubfield('6') == $number; })); } +} + + + + +class NoticeIntegrationOrpheeSerialInrockuptiblesTest extends NoticeIntegrationOrpheeTestCase { + public function setUp() { + parent::setUp(); + $this->loadNotice('unimarc_inrocks'); + } + + + /** @test */ + public function numberOnRecordsWithTypeDocSerialShouldBeFourtyTwo() { + $this->assertEquals(42, Class_Notice::countBy(['type_doc' => Class_TypeDoc::PERIODIQUE])); + } + + + /** @test */ + public function noPeriodicTitleShouldHaveBeenCreated() { + $this->assertEquals(0, Class_Notice::countBy(['type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])); + } + + + /** @test */ + public function numberOfItemsShouldBe42() { + $this->assertEquals(42, Class_Exemplaire::countBy([])); + } + + + /** @test */ + public function firstSerialAlphaKeyShouldBeLESINROCKUPTIBLES___862_LESEDITIONSINDEPENDANTES__2() { + $this->assertEquals('LESINROCKUPTIBLES---862-LESEDITIONSINDEPENDANTES--2', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE])->getClefAlpha()); + } + + + /** @test */ + public function firstSerialHeadKeyShouldBeLESINROCKUPTIBLES___862_LESEDITIONSINDEPENDANTES__2() { + $this->assertEquals('INROCKUPTIBLES', + Class_Notice::findFirstBy(['type_doc' => Class_TypeDoc::PERIODIQUE])->getClefChapeau()); + } } \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php index 93b12efde0a9e3801b3b6c796a5d2b653fc07582..05b6e07b0faad05fabb581a1d1cb3bc760b3b514 100644 --- a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php +++ b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php @@ -88,7 +88,7 @@ abstract class NoticeIntegrationTestCase extends ModelTestCase { VariableCache::getInstance() ->setValeurCache(['filtrer_fulltext' => 1, - 'mode_doublon'=> 1, + 'mode_doublon'=> Class_CosmoVar::DOUBLE_SEARCH_ALPHA_KEY, 'tracer_accents_iso'=>1, 'non_exportable'=> 'electre;decitre;gam;zebris', 'controle_codes_barres'=> 0, diff --git a/cosmogramme/tests/php/classes/PMBIntegrationTest.php b/cosmogramme/tests/php/classes/PMBIntegrationTest.php index 0fc462125e3d422d3754695db5f82ca846ea26e8..35128b3cae15dfe1e66677077e9424581486debb 100644 --- a/cosmogramme/tests/php/classes/PMBIntegrationTest.php +++ b/cosmogramme/tests/php/classes/PMBIntegrationTest.php @@ -113,6 +113,13 @@ class PMBIntegrationRecordsSixSequencesTest extends PMBIntegrationRecordsTestCas class PMBIntegrationSerialsTest extends PMBIntegrationRecordsTestCase { + public function getProfilDonnees() { + return Class_IntProfilDonnees::forPMB() + ->setIdProfil(115) + ->setAccents(Class_IntProfilDonnees::ENCODING_UTF8) + ->getRawAttributes(); + } + public function setUp() { parent::setUp(); @@ -121,22 +128,67 @@ class PMBIntegrationSerialsTest extends PMBIntegrationRecordsTestCase { /** @test */ - public function numberOfRecordsShouldBeFourtySix() { - $this->assertCount(46, Class_Notice::findAll()); + public function numberOfRecordsShouldBeFourtySeven() { + $this->assertCount(47, Class_Notice::findAll()); + } + + + /** @test */ + public function numberOfRecordsTypeDoc2ShouldBeThree() { + $this->assertCount(3, Class_Notice::findAllBy(['type_doc' => 2])); + } + + + /** @test */ + public function numberOfRecordsTypeDocPerArtShouldBeFourtyThree() { + $this->assertCount(43, Class_Notice::findAllBy(['type_doc' => 'per_art'])); + } + + + /** @test */ + public function numberOfRecordsTypeDocPerTitleShouldBeOne() { + $this->assertCount(1, Class_Notice::findAllBy(['type_doc' => 'per_title'])); } /** @test */ - public function firstRecordItemBarCodeShouldBeIdIntBibOneDashIdRecord21119() { + public function firstRecordTypePerArtItemBarCodeShouldBeIdIntBibOneDashIdRecord21119() { $this->assertEquals('1-21119', - Class_Notice::find(1)->getFirstExemplaire()->getCodeBarres()); + Class_Notice::findFirstBy(['type_doc' => 'per_art']) + ->getFirstExemplaire() + ->getCodeBarres()); } /** @test */ - public function firstRecordItemIdIntBibShouldBeOne() { + public function firstRecordType2ClefOeuvreShouldBeREVUEFRANCAISEDEPEDAGOGIE___N198() { + $this->assertEquals('REVUEFRANCAISEDEPEDAGOGIE---N198', + Class_Notice::findFirstBy(['type_doc' => 2])->getClefOeuvre()); + } + + + /** @test */ + public function firstRecordTypePerTitleItemBarCodeShouldBeIdIntBibOneDashIdRecord17165() { + $this->assertEquals('1-17165', + Class_Notice::findFirstBy(['type_doc' => 'per_title']) + ->getFirstExemplaire() + ->getCodeBarres()); + } + + + /** @test */ + public function firstRecordPertArtItemIdIntBibShouldBeOne() { $this->assertEquals(1, - Class_Notice::find(1)->getFirstExemplaire()->getIdIntBib()); + Class_Notice::findFirstBy(['type_doc' => 'per_art']) + ->getFirstExemplaire()->getIdIntBib()); + } + + + /** @test */ + public function firstRecordPertArtClefChapeauShouldBeREVUE_FRANCAISE_DE_PEDAGOGIE_N198() { + $this->assertEquals('REVUE FRANCAISE DE PEDAGOGIE N 198', + Class_Notice::findFirstBy(['type_doc' => 'per_art']) + ->getClefChapeau()); } @@ -169,8 +221,27 @@ class PMBIntegrationSerialsTest extends PMBIntegrationRecordsTestCase { /** @test */ - public function record21331ClefChapeauShouldBeREVUE_FR_60_BULL() { - $this->assertEquals('REVUE FRANCAISE DE PEDAGOGIE 60 BULL', + public function record21331ClefChapeauShouldBeREVUE_FR_200() { + $this->assertEquals('REVUE FRANCAISE DE PEDAGOGIE N 200', Class_Exemplaire::findFirstBy(['code_barres' => '1-21331'])->getNotice()->getClefChapeau()); } + + + /** @test */ + public function firstRecordType2TomeShouldBeN198() { + $this->assertEquals('N 198', Class_Notice::findFirstBy(['type_doc' => 2])->getTomeAlpha()); + } + + + /** @test */ + public function firstRecordType2HasSerieShouldBeTrue() { + $this->assertTrue(Class_Notice::findFirstBy(['type_doc' => 2])->hasSerie()); + } + + + /** @test */ + public function firstRecordType2TitreChapeauShouldBeRevueFrancaise() { + $this->assertEquals('Revue française de pédagogie', + Class_Notice::findFirstBy(['type_doc' => 2])->getTitreChapeau()); + } } \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_article_matricule_ange.txt b/cosmogramme/tests/php/classes/unimarc_article_matricule_ange.txt new file mode 100644 index 0000000000000000000000000000000000000000..4ab4b5abf4085247e3ca2ccd5e79ce8a6e2c9687 --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_article_matricule_ange.txt @@ -0,0 +1 @@ +00885naa0a2200205 4500001000700000011001400007090001100021100004100032200004900073210001300122215001300135330015200148461006100300700002400361600003000385605001400415801003000429938019300459099002700652521225 a1241-7696 a521225 a20190507d2019 uu|y0frey5003 ba10aUlysse au bayoubArticlefDominique Aussenac d01/04/19 app.28-31 aPorteÌ par un souffle eÌpique, le quatrieÌ€me roman de Lionel SalÅun nous transporte dans le Sud du Mississippi. Puissant, grinçant, haletant. 31808670tMatricule des anges (Le)v2029111511d01/04/19 aAussenacbDominique aSalaunbLionelf1959-.... aWhitesand 0aFRbIndexpressec20190507 a&rft.issn=1241-7696&rft.jtitle= Matricule des anges (Le)&rft.atitle=Ulysse au bayou&rft.aulast=Aussenac&rft.aufirst=Dominique&rft.date=01/04/19&rft.volume=202&rft.spage=pp.28&rft.epage=31 c2019-08-27d2019-08-28 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_article_matricule_ange2.txt b/cosmogramme/tests/php/classes/unimarc_article_matricule_ange2.txt new file mode 100644 index 0000000000000000000000000000000000000000..c915e1d36564c00d1a6ab586b54345dbd0f2bc4c --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_article_matricule_ange2.txt @@ -0,0 +1 @@ +02244naa0a2200253 4500001000700000011001400007090001100021100004100032200007900073210001300152215001300165330128600178461004301464700001901507605005901526969003101585969001801616969002401634606003701658600003201695801003001727938020601757099002701963521252 a0245-5676 a521252 a20190507d2019 uu|y0frey5003 ba10aKlaus Theweleit, eÌgorger, puis eÌclater de rirebArticlefLaurent Perez d01/04/19 app.94-95 aParu en 1977-78, "FantasmaÌ‚lgories" de Klaus Theweleit a reÌvolutionneÌ la compreÌhension de la violence politique, en eÌtudiant intimement l'imaginaire des membres des corps francs, ces milices d'extreÌ‚me droite qui semeÌ€rent la terreur en Allemagne apreÌ€s la PremieÌ€re Guerre mondiale et preÌpareÌ€rent l'arriveÌe au pouvoir de Hitler. Prenant aÌ€ contre-pied les interpreÌtations traditionnelles fondeÌes sur la critique ideÌologique et sociohistorique, le chercheur allemand y effectuait une lecture psychanalytique de la "structure corporelle" de ces jeunes hommes eÌleveÌs dans la violence, passeÌs par une rude discipline militaire, pathologiquement deÌsarmeÌs devant leur libido. "Le Rire des bourreaux" est le troisieÌ€me livre de Theweleit aÌ€ paraiÌ‚tre en français, apreÌ€s "Un plus un", son essai sur le cineÌma de Claude Lanzmann et Jean-Luc Godard (TheÌaÌ‚tre Typographique, 2000), et "FantasmaÌ‚lgories" (l'Arche, 2016). L'auteur y applique ses theÌories aux meurtriers de masse actuels, d'extreÌ‚me droite ou djihadistes, geÌnocidaires rwandais ou enfants-soldats en Afrique. Il y cite abondamment les criminels eux-meÌ‚mes, les comptes rendus de leurs proceÌ€s, les descriptions de leurs exactions - laissant le lecteur glaceÌ d'horreur. 336001tArt Pressv465976692d01/04/19 aPerezbLaurent aLe Rire des bourreaux. Psychogramme du plaisir de tuer aCriminels et deÌlinquants aDeÌlinquants aCrimes et criminels aCriminelsxDans la litteÌrature aTheweleitbKlausf1942-.... 0aFRbIndexpressec20190507 a&rft.issn=0245-5676&rft.jtitle=Art Press&rft.atitle=Klaus Theweleit, eÌgorger, puis eÌclater de rire&rft.aulast=Perez&rft.aufirst=Laurent&rft.date=01/04/19&rft.volume=465&rft.spage=pp.94&rft.epage=95 c2019-08-27d2019-08-28 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_inrocks.txt b/cosmogramme/tests/php/classes/unimarc_inrocks.txt new file mode 100644 index 0000000000000000000000000000000000000000..82f51d0dfb5760d63198f27fc9e750cd753929df --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_inrocks.txt @@ -0,0 +1 @@ +09156nas 2200613 450 001001500000100004100015101000800056106000600064110001600070200008900086210003900175995019600214995019800410995019800608995019800806995019601004995019601200995019801396995019801594995019801792995020001990995020002190995019602390995019802586995019802784995019602982995019803178995019803376995019803574995019603772995019803968995019604166995023404362995023504596995016404831995012304995995019805118995023005316995023205546995019805778995019805976995023206174995020006406995023406606995019606840995019807036995019807234995023407432995023407666995023407900995016208134995012308296995012308419frOr0472024727 a19950609a 0103 aFre aR aAcaz 1 aLes InrockuptiblesfChristian Fevret et Arnaud Deverre, directeurs de la publication 1aPariscLes Editions IndÂependantes00a00106002036783b472024727cpd106g1h1i1l90212728o17/07/2012p14/09/2012q26/06/2012r13/07/2012t90212272u13792w9x12y2z1C06/06/2012D49F1G3H3NeS106T1U12V106W12Z22530686200a00106002051964b472024727cpd106g1h1i1l90374271o19/11/2013p06/12/2013q03/08/2013r13/09/2013t1314900380u13984w9x12y2z1C29/08/2012D49F1G6H6NeS106T1U12V106W12Z22530687400a00106002143399b472024727cpd106g1h1i1l1300500199o26/04/2014p09/05/2014q05/04/2014r26/04/2014t90374791u14672w9x12y2z1C26/06/2013D49F1G8H8NeS106T1U12V106W12Z22530691700a00106002149925b472024727cpd106g1h1i1l1300502091o08/03/2014p29/03/2014q21/02/2014r26/02/2014t90211439u14848w9x12y2z1C11/09/2013D49F1G7H7NeS106T1U12V106W12Z22530692800a00106002162100b472024727cpd106g1h1i1l69305134o09/11/2013p28/12/2013q19/10/2013r09/11/2013t90212770u14864w9x12y2z1C18/09/2013D49F1G4H4NeS106T1U12V106W12Z22530692900a00106002162845b472024727cpd106g1h1i1l90276282o28/06/2014p08/07/2014q21/12/2013r07/01/2014t90212770u14880w9x12y2z1C25/09/2013D10F1G6H6NeS106T1U12V106W12Z22530693000a00106002163579b472024727cpd106g1h1i1l1300500199o26/04/2014p09/05/2014q22/03/2014r28/03/2014t90212728u14896w9x12y2z1C02/10/2013D49F1G8H8NeS106T1U12V106W12Z22530693100a00106002166267b472024727cpd106g1h1i1l90212272o15/01/2014p05/02/2014q16/11/2013r10/01/2014t1101000393u14928w9x12y2z1C16/10/2013D49F1G3H3NeS106T1U12V106W12Z22530693300a00106002214646b472024727cpd106g1h1i1l1314903286o27/12/2013p14/01/2014q23/11/2013r21/12/2013t90538312u14944w9x12y2z1C23/10/2013D49F1G3H3NeS106T1U12V106W12Z22530693400a00106002217383b472024727cpd106g1h1i1l1300502091o08/03/2014p29/03/2014q11/02/2014r21/02/2014t1314903286u14992w9x12y2z1C13/11/2013D49F1G5H5NeS106T1U12V106W12Z22530693700a00106002218134b472024727cpd106g1h1i1l1314901497o17/05/2014p14/06/2014q17/01/2014r21/02/2014t1314903286u15008w9x12y2z1C20/11/2013D49F1G4H4NeS106T1U12V106W12Z22530693800a00106002220320b472024727cpd106g1h1i1l90212770o29/03/2014p12/04/2014q28/02/2014r25/03/2014t90212272u15024w9x12y2z1C27/11/2013D49F1G5H5NeS106T1U12V106W12Z22530693900a00106002220965b472024727cpd106g1h1i1l90212272o04/04/2014p15/04/2014q01/03/2014r29/03/2014t1314900237u15040w9x12y2z1C04/12/2013D49F1G5H5NeS106T1U12V106W12Z22530694000a00106002222722b472024727cpd106g1h1i1l1314903286o17/01/2014p21/03/2014q20/12/2013r15/01/2014t90212272u15056w9x12y2z1C11/12/2013D49F1G2H2NeS106T1U12V106W12Z22530694100a00106002223324b472024727cpd106g1h1i1l90538312o24/05/2014p12/07/2014q02/05/2014r24/05/2014t90538312u15072w9x12y2z1C18/12/2013D10F1G5H5NeS106T1U12V106W12Z22530694200a00106002225170b472024727cpd106g1h1i1l1314903286o02/04/2014p25/04/2014q04/03/2014r29/03/2014t90538312u15120w9x12y2z1C08/01/2014D49F1G4H4NeS106T1U12V106W12Z22530694500a00106002225808b472024727cpd106g1h1i1l1300501371o16/07/2014p06/08/2014q24/05/2014r12/07/2014t90538312u15136w9x12y2z1C15/01/2014D10F1G6H6NeS106T1U12V106W12Z22530694600a00106002229776b472024727cpd106g1h1i1l90276282o28/06/2014p02/08/2014q31/05/2014r18/06/2014t1300700415u15184w9x12y2z1C05/02/2014D10F1G5H5NeS106T1U12V106W12Z22530694900a00106002230063b472024727cpd106g1h1i1l90243241o25/04/2014p02/05/2014q29/03/2014r18/04/2014t90538312u15152w9x12y2z1C22/01/2014D49F1G6H6NeS106T1U12V106W12Z22530694700a00106002230519b472024727cpd106g1h1i1l90212272o16/05/2014p06/06/2014q22/03/2014r02/05/2014t1300701885u15200w9x12y2z1C12/02/2014D49F1G5H5NeS106T1U12V106W12Z22530695000a00106002233703b472024727cpd106g1h1i1l90211439o03/05/2014p21/05/2014q22/04/2014r03/05/2014t90212728u15216w9x12y2z1C19/02/2014D49F1G6H6NeS106T1U12V106W12Z22530695100a00106002253032b472024727cpd106g1h1i1k90212770l1300700415m08/08/2014n29/08/2014o18/06/2014p02/07/2014q24/05/2014r14/06/2014t1101000393u15280w9x12y2z2C19/03/2014D10F1G6H6NeS106T1U12V106W12Z22530695500a00106002255748b472024727cpd106g1h1i1k1314900907l1300701783m26/07/2014n06/09/2014o28/06/2014p26/07/2014q14/05/2014r06/06/2014t90212728u15328w9x12y2z2C09/04/2014D149F1G5H5NeS106T1U12V106W12Z22530695800a00106002266869b472024727cpd106g1h1i1l1300501371o16/07/2014p06/08/2014u15536w9x12y2z1C09/07/2014D10F1G1H1NeS106T1U12V106W12Z22530697100a00106002268006b472024727cpd106g1h1i1u15552w9x12y2z1C24/07/2014D149F1NeS106T1U12V106W12Z22530697200a00106002304835b472024727cpd106g1h1i1l1314900616o03/05/2014p17/05/2014q15/03/2014r03/05/2014t90211439u15232w9x12y2z1C26/02/2014D49F1G3H3NeS106T1U12V106W12Z22530695200a00106002306046b472024727cpd106g1h1i1k90276282l90212728m02/08/2014n23/08/2014o14/05/2014p21/05/2014q14/05/2014r14/05/2014t90211439u15248w9x12y2z2C05/03/2014D10F1G6H6NeS106T1U12V106W12Z22530695300a00106002306798b472024727cpd106g1h1i1k1314903544l90375025m09/08/2014n20/09/2014o23/04/2014p14/05/2014q28/03/2014r15/04/2014t90211439u15264w9x12y2z2C12/03/2014D10F1G4H4NeS106T1U12V106W12Z22530695400a00106002310329b472024727cpd106g1h1i1l69304817o17/05/2014p31/05/2014q22/04/2014r06/05/2014t1314903286u15296w9x12y2z1C26/03/2014D49F1G5H5NeS106T1U12V106W12Z22530695600a00106002310998b472024727cpd106g1h1i1l90276282o08/07/2014p02/08/2014q11/06/2014r02/07/2014t1314903678u15312w9x12y2z1C02/04/2014D10F1G5H5NeS106T1U12V106W12Z22530695700a00106002315351b472024727cpd106g1h1i1k90276282l1300800045m02/08/2014n23/08/2014o30/07/2014p30/07/2014q28/06/2014r19/07/2014t90212770u15344w9x12y2z2C16/04/2014D10F1G6H6NeS106T1U12V106W12Z22530695900a00106002318173b472024727cpd106g1h1i1l1300701783o28/06/2014p26/07/2014q06/06/2014r28/06/2014t1314902315u15392w9x12y2z1C07/05/2014D10F1G3H3NeS106T1U12V106W12Z22530696200a00106002318801b472024727cpd106g1h1i1k90276282l1300800045m02/08/2014n23/08/2014o30/07/2014p02/08/2014q30/07/2014r30/07/2014t1300800045u15408w9x12y2z2C14/05/2014D10F1G6H6NeS106T1U12V106W12Z22530696300a00106002319700b472024727cpd106g1h1i1l90243241o02/07/2014p15/07/2014q21/06/2014r02/07/2014t90212272u15424w9x12y2z1C21/05/2014D10F1G3H3NeS106T1U12V106W12Z22530696400a00106002321102b472024727cpd106g1h1i1l1300500199o08/07/2014p02/08/2014q13/06/2014r05/07/2014t90212728u15440w9x12y2z1C28/05/2014D10F1G3H3NeS106T1U12V106W12Z22530696500a00106002321631b472024727cpd106g1h1i1l1300500199o08/07/2014p02/08/2014q13/06/2014r05/07/2014t90212728u15456w9x12y2z1C04/06/2014D10F1G2H2NeS106T1U12V106W12Z22530696600a00106002322803b472024727cpd106g1h1i1k1314902295l1314903286m02/08/2014n23/08/2014o12/07/2014p01/08/2014q20/06/2014r11/07/2014t69305346u15472w9x12y2z2C11/06/2014D10F1G3H3NeS106T1U12V106W12Z22530696700a00106002323405b472024727cpd106g1h1i1k90276282l1300800045m02/08/2014n23/08/2014o30/07/2014p02/08/2014q28/06/2014r26/07/2014t1300701783u15488w9x12y2z2C18/06/2014D10F1G3H3NeS106T1U12V106W12Z22530696800a00106002324957b472024727cpd106g1h1i1k1314902295l1314903286m02/08/2014n23/08/2014o18/07/2014p01/08/2014q02/07/2014r15/07/2014t90243241u15504w9x12y2z2C25/06/2014D10F1G3H3NeS106T1U12V106W12Z22530696900a00106002325582b472024727cpd106g1h1i1k90212272m11/07/2014n01/08/2014u15520w9x12y2z2C02/07/2014D10F1G1H1NeS106T1U12V106W12Z22530697000a00106002329923b472024727cpd106g1h1i1u15568w9x12y2z1C23/07/2014D149F3NeS106T1U12V106W12Z22530697300a00106002332091b472024727cpd106g1h1i1u15616w9x12y1z1C13/08/2014D149F1NeS106T1U12V106W12Z225306976 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_koha_alter_eco.txt b/cosmogramme/tests/php/classes/unimarc_koha_alter_eco.txt new file mode 100644 index 0000000000000000000000000000000000000000..b1037d590017b26062bf7afc4fcb60868abaf8e2 --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_koha_alter_eco.txt @@ -0,0 +1 @@ +00461oas2 22001331 4500001000700000011001400007035001900021090001100040100004100051200005000092210002700142461003600169995012200205494848 a0247-3739 aCHALLES-243248 a494848 a20180212 2016 frey50 aCette chimie qui nous empoisonne au quotidien d2016-06-01h2016-08-31 tAlternatives Economiquesv374N 10203052018-02-129493634bCHALLEScCHALLESeCHALLESETAGEfP-0085157313hPERi2018-02-12o0rPRETNORMALy2018-02-12 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_koha_animan.txt b/cosmogramme/tests/php/classes/unimarc_koha_animan.txt new file mode 100644 index 0000000000000000000000000000000000000000..30fc9fa9f6db2232cbafabe7e88069ba72d216fa --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_koha_animan.txt @@ -0,0 +1 @@ +04728nas0a2200565 4500001000700000011002400007035001600031090001100047099003500058100004100093101000800134102000700142106000600149200004900155210003200204300004300236326001500279606005400294676002700348676002700375801002800402856012700430856006700557999002400624999002800648902004100676902004800717902004400765995017300809995015700982995016001139995015001299995017601449995015601625995016901781995013801950995016302088995015402251995016002405995018702565995016702752995017402919995016103093995015803254995015003412995017003562995015803732995015503890995011704045259517 a1660-1025d9,00 EUR aCHY-0018917 a25951700x266s1c2016-12-19d2017-02-10 a19921002a1981 m |0frey5003 ba0 afre aFR ar1 aAnimanbPériodiqueenature et civilisations aLausannecAnimand1981-.... aAucun numéro reçu pour l'année 2009 aBimestriel 955355831358820aSciences de la viexPériodiques 9605409a910vBMCHY 2.0 9605740a570vBMCHY 2.0 0aFRb730656101c19921002 3http://www.bm-chambery.fr/opacwebaloes/index.aspx?IdPage=706uhttp://www.bm-chambery.fr/opacwebaloes/index.aspx?IdPage=706 3http://www.animan.ch/uhttp://www.animan.ch/zSite de la revue 30847632aPERcGBgP 30848027aPERcJRdSLgP 9628192aRevues - Collection en cours 962819530000000aRevues - Ecologie / Nature 9628215aRevues - Géographie / Tourisme 10203052016-02-039241963a21bCHY-JRcCHY-JRe1024f1611358gJhPERi2016-12-19m2019-06-19n2019-07-17o0rPRETNORMALv192 ; Février - Mars 2016w14x4y2019-06-19 10203052016-04-129241965a21bCHY-JRcCHY-JRe1024f1612033gJhPERi2016-12-19m2019-02-27o0rPRETNORMALv193 ; Avril - Mai 2016w11x4y2019-03-27 10203052016-05-319241966a21bCHY-JRcCHY-JRe1024f1612268gJhPERi2016-12-19m2019-04-18o0rPRETNORMALv194 ; Juin - Juillet 2016w10x4y2019-05-28 10203052016-08-029241967a21bCHY-JRcCHY-JRe1024f1614044gJhPERi2016-12-19m2019-06-08o0rPRETNORMALv195 ; Août 2016w8x4y2019-06-29 10203052016-10-059241968a21bCHY-JRcCHY-JRe1024f1618311gJhPERi2016-12-19m2019-07-13n2019-08-10o0rPRETNORMALv196 ; Octobre - Novembre 2016w18x6y2019-07-13 10203052016-12-069241969a21bCHY-JRcCHY-JRe1024fY1623116gJhPERi2016-12-19m2019-02-22o0rPRETNORMALv197 ; Décembre 2016w11x4y2019-04-02 0010203052017-03-319414816bCHY-JRcCHY-JRe1024fY1625513gJhPERm2019-07-13n2019-08-10o0p13.00rPRETNORMALvn°198 février - mars 2017w19x8y2019-07-13 10203052017-04-049415140bCHY-JRcCHY-JRe1024fY1625593gJhPERi2017-04-04m2019-03-05o0rPRETNORMALvn°199w12x3y2019-03-12 10203052017-05-319419598bCHY-JRcCHY-JRe1024fY1627000gJhPERi2017-05-31m2019-03-02o0p13.00rPRETNORMALvn°200 Juin-Juillet 2017w12x7y2019-03-12 13203052017-07-289423239bCHY-JRcCHY-JRe1024fY1628433gJhPERi2017-07-28m2018-03-14o0rPRETNORMALvn°201 août-sept. 2017w5x3y2018-12-06 1020309427840bCHY-JRcCHY-JRe1024fY1629259gJhPERi2017-10-03m2019-07-13n2019-08-10o0rPRETNORMALvn°202 octobre-novembre 2017w14x6y2019-07-13 10203052017-12-089433475bCHY-JRcCHY-JRe1024fY1631432gJhPERi2017-12-08m2019-06-27n2019-07-25o0p13.00rPRETNORMALvn°203, décembre 2017 - janvier 2018w9x6y2019-06-27 10203052018-02-029437192bCHY-JRcCHY-JRe1024fY1634075gJhPERi2018-02-02m2019-07-13n2019-08-10o0rPRETNORMALvn°204, févr-mars 2018w10x5y2019-07-13 10203052018-04-109502047bCHY-JRcCHY-JRe1024fY1635888gJhPERi2018-04-10m2019-07-13n2019-08-10o0p16.00rPRETNORMALvn°205, avril - mai 2018w9x5y2019-07-13 10203052018-06-059506967bCHY-JRcCHY-JRe1024fY1637786gJhPERi2018-06-05m2019-07-13n2019-08-10o0rPRETNORMALvn° 206, juin 2018w8x3y2019-07-13 1020309514593bCHY-JRcCHY-JRe1024f1639399gJhPERi2018-08-01m2019-06-07n2019-08-05o0rPRETNORMALvn°207, août-septembre 2018w6x4y2019-06-07 1020309521830bCHY-JRcCHY-JRe1024f1640991gJhPERi2018-10-04m2019-07-13n2019-08-10o0rPRETNORMALvn°208, octobre 2018w5x2y2019-07-13 0010203052019-04-259530306bCHY-JRcCHY-JRe1024f1642023gJhPERm2019-06-27n2019-07-25o0rPRETNORMALvn°209, décembre 2018 - janvier 2019w5x1y2019-06-27 0010203052019-04-259534709bCHY-JRcCHY-JRe1024f1644067gJhPERm2019-06-26n2019-07-24o0rPRETNORMALvn°210, février - mars 2019w3y2019-06-26 0010203052019-04-259540465bCHY-JRcCHY-JRe1024f1650468gJhPERm2019-06-07n2019-08-05o0rPRETNORMALvn°211, avril-mai 2019w1x1y2019-06-07 1020309545602bCHY-JRcCHY-JRe1024f1652890gAhPERi2019-06-05o0rPRETNORMALvn°212, juin 2019y2019-06-0501258naa0a2200241 4500001000700000011001400007090001100021100004100032200007700073210001300150215001300163330043100176461003800607700002100645969001200666969001300678607003700691969001200728969001300740607003200753801003000785938020100815519691 a1660-1025 a519691 a20190409d2019 uu|y0frey5003 ba10aBonheur et beauté. Un royaume unique au mondebArticlefRobert Dompnier d01/02/19 app.52-64 aLa chaîne de l'Himalaya abrite un petit pays qui vit encore dans l'harmonie et tous ceux qui sont revenus du Bhoutan en parlent avec émotion et admiration. Pour vivre la même découverte inoubliable, "Animan" vous propose d'accompagner l'auteur et le photographe de ce reportage à l'occasion d'un voyage-lecteurs. Vivez cette année à votre tour "L'expérience Animan 2019" en retrouvant en réel les images de ces pages. 325tAnimanv2109259517d01/02/19 aDompnierbRobert aBhutÄn aDruk-?ul aBhoutanxDescriptions et voyages aBhutÄn aDruk-?ul aBhoutanxMoeurs et coutumes 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Bonheur et beauté. Un royaume unique au monde&rft.aulast=Dompnier&rft.aufirst=Robert&rft.date=01/02/19&rft.volume=210&rft.spage=pp.52&rft.epage=6401463naa0a2200265 4500001000700000011001400007090001100021100004100032200008600073210001300159215001300172330054300185461003800728700002000766969001000786969000900796607003500805969001000840969000900850969001000859606004400869607004400913801003000957938021000987519684 a1660-1025 a519684 a20190409d2018 uu|y0frey5003 ba10aNagaland, rencontre avec les derniers coupeurs de têtesbArticlefFranck Charton d01/12/18 app.12-25 a" Attention quand vous allez entrer au Nagaland ! Les dacoïts, ces bandits coupeurs de route et les guérilleros séparatistes et ivrognes (sic) abondent dans ces montagnes sauvages. Soyez prudents, ne sortez pas la nuit ! " Voilà en substance ce qu'on entend dès qu'on évoque le but d'un voyage aux marches pré-himalayennes du sous-continent indien. Pour de nombreux habitants des plaines, le pays des Nagas reste un territoire frontière, nimbé de brumes aussi atmosphériques que culturelles : un pays de barbares. Et pour nous ? 325tAnimanv2099259517d01/12/18 aChartonbFranck aIndia aInde aIndexRelations interethniques aNagas aNoga aNagna aNagagpeuple d'AsiexMoeurs et coutumes aNagalandgIndexDescriptions et voyages 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Nagaland, rencontre avec les derniers coupeurs de têtes&rft.aulast=Charton&rft.aufirst=Franck&rft.date=01/12/18&rft.volume=209&rft.spage=pp.12&rft.epage=2501507naa0a2200349 4500001000700000011001400007090001100021100004100032200008100073210001300154215001300167330029400180461003800474700001900512969001600531969002200547606003800569969002700607969001400634969002200648969004000670969002700710969002200737969004000759606003600799969001300835969001400848969002100862607003900883801003000922938020500952519685 a1660-1025 a519685 a20190409d2018 uu|y0frey5003 ba10aCroisière au Groenland. Escale magique à IlulissatbArticlefMarie Paturel d01/12/18 app.26-33 aLa côte occidentale du Groenland offre une multitude de visions oniriques, entre gigantisme des icebergs, vêlage monstrueux des glaciers, villes multicolores et indolence des baleines boréales. Un paradis de glace qui pourrait bien devenir le "pays vert" vanté par les premiers colons. 325tAnimanv2099259517d01/12/18 aPaturelbMarie aCroisières aVoyages maritimes aVoyages en merxRégions polaires aÉcocomplexes polaires aÉcologie aÉcologie polaire aÉcosystèmes des régions polaires aÉcosystèmes polaires aRégions polaires aÉcocomplexes des régions polaires aÉcologie des régions polaires aGr?nland aGroenland aKalaallit Nunaat aGroenlandxDescriptions et voyages 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Croisière au Groenland. Escale magique à Ilulissat&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/12/18&rft.volume=209&rft.spage=pp.26&rft.epage=3301448naa0a2200313 4500001000700000011001400007090001100021100004100032200006700073210001300140215001300153330038200166461003800548700001900586700001800605969002200623969001800645969002200663969001800685606004600703969002200749969001800771969002200789969001800811606004500829606004000874801003000914938019000944519686 a1660-1025 a519686 a20190409d2018 uu|y0frey5003 ba10aYunnan et Sichuan aux origines du thébArticlefBruno Morandi d01/12/18 app.52-63 a500 millions de tasses bues chaque jour, près de 4 millions de tonnes produites chaque année, le thé est la boisson la plus consommée au monde après l'eau. Si dans certains pays il fait partie intégrante de la culture, ses nombreuses vertus bienfaisantes pour la santé font du thé un élixir irremplaçable. Exploration des coulisses chinoises d'une véritable passion. 325tAnimanv2099259517d01/12/18 aMorandibBruno aMorandibTuul aCamellia theifera aThea sinensis aCamellia sinensis aCamellia thea aThéierxCulturesxChineySichuan (Chine) aCamellia theifera aThea sinensis aCamellia sinensis aCamellia thea aThéierxCulturesyChineyYunnan (Chine) aBoissonsxFonctions socialesyChine 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Yunnan et Sichuan aux origines du thé&rft.aulast=Morandi&rft.aufirst=Tuul&rft.date=01/12/18&rft.volume=209&rft.spage=pp.52&rft.epage=6301444naa0a2200337 4500001000700000011001400007090001100021100004100032200006100073210001300134215001300147330028500160461003800445700001900483969002300502969002600525969001100551969001500562606004900577969003100626969003300657969001100690969003600701606004000737969002400777969002200801969003000823606003800853801003000891938018500921519687 a1660-1025 a519687 a20190409d2018 uu|y0frey5003 ba10aBordeaux, entre culture et futurbArticlefMarie Paturel d01/12/18 app.64-73 aDepuis l'arrivée de sa ligne ferroviaire à grande vitesse en 2018, Bordeaux se trouve au coeur d'un accélérateur urbain, économique et culturel. La cité assoupie des années 1990 s'est éveillée, valorisant son riche héritage et modelant un avenir dynamique et séduisant. 325tAnimanv2099259517d01/12/18 aPaturelbMarie aAttraction urbaine aAttractivité urbaine aVilles aAttraction aAttractivitéggéographieyFrancexBordeaux aPatrimoine culturel urbain aPatrimoine urbain historique aVilles aPatrimoine architectural urbain aPatrimoine urbainyFrancexBordeaux aVilles touristiques aTourisme de ville aTourisme en milieu urbain aTourisme urbainyFrancexBordeaux 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Bordeaux, entre culture et futur&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/12/18&rft.volume=209&rft.spage=pp.64&rft.epage=7301020naa0a2200217 4500001000700000011001400007090001100021100004100032200009800073210001300171215001300184330021400197461003800411700002000449969000900469607002900478969000900507607003400516801003000550938022200580519688 a1660-1025 a519688 a20190409d2018 uu|y0frey5003 ba10aExplorer le sultanat d'Oman. Sur les traces de Sinbad et de MonfreidbArticlefDavid Moginier d01/12/18 app.74-81 aLe riche sultanat arabique n'a pas encore cédé aux fastes ronflants et cultive un accueil humain et généreux dans un paysage minéral. Exploration entre mer et désert à la rencontre d'Omanais chaleureux. 325tAnimanv2099259517d01/12/18 aMoginierbDavid aOman aOmanxMoeurs et coutumes aOman aOmanxDescriptions et voyages 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Explorer le sultanat d'Oman. Sur les traces de Sinbad et de Monfreid&rft.aulast=Moginier&rft.aufirst=David&rft.date=01/12/18&rft.volume=209&rft.spage=pp.74&rft.epage=8101154naa0a2200193 4500001000700000011001400007090001100021100004100032200006200073210001300135215001300148330043700161461003800598700001900636607004200655607004700697801003000744938018600774519689 a1660-1025 a519689 a20190409d2019 uu|y0frey5003 ba10aAu royaume intemporel des RajputsbArticlefMarie Paturel d01/02/19 app.14-25 aLes Rajputs, peuple de guerriers aux ambitions démesurées, ont laissé au Rajasthan un héritage architectural hors du commun. Cette " terre de rois " est un concentré de palais somptueux, de forteresses plantées en plein désert et de petits royaumes préservés. Au coeur de paysages arides surgissent aussi des cités colorées où l'éclat des turbans portés par les hommes rivalise avec la vivacité des teintes des saris. 325tAnimanv2109259517d01/02/19 aPaturelbMarie aRÄjasthÄngIndexMoeurs et coutumes aRÄjasthÄngIndexDescriptions et voyages 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Au royaume intemporel des Rajputs&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/02/19&rft.volume=210&rft.spage=pp.14&rft.epage=2501744naa0a2200433 4500001000700000011001400007090001100021100004100032200006400073210001300137215001300150330033700163461003800500700001700538969002500555969001800580969002900598969002300627969001800650969002000668969002800688969002400716969001800740969001700758606005200775969002500827969001800852969002900870969002300899969001800922969002000940969002800960969002400988969001801012969001701030606004501047801003001092938018801122519690 a1660-1025 a519690 a20190409d2019 uu|y0frey5003 ba10aBalade irlandaise entre Cork et KerrybArticlefPepa Garcia d01/02/19 app.26-34 aPetites histoires, anecdotes et originalités restent les trois éléments indissociables d'une découverte des comtés irlandais de Cork et de Kerry. Forêts, lacs, ports et villages pittoresques se succèdent aussi, enveloppés parfois par une brume fantomatique qui fait passer le voyageur de la réalité au monde des légendes. 325tAnimanv2109259517d01/02/19 aGarciabPepa aVacances à la ferme aTourisme vert aTourisme en milieu rural aTourisme de nature aGîtes ruraux aFermes-auberges aExploitations agricoles aCamping à la ferme aAgri-tourisme aAgritourisme aTourisme ruralyIrlandeyCork (Irlande, comté) aVacances à la ferme aTourisme vert aTourisme en milieu rural aTourisme de nature aGîtes ruraux aFermes-auberges aExploitations agricoles aCamping à la ferme aAgri-tourisme aAgritourisme aTourisme ruralyIrlandeyKerry (Irlande) 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Balade irlandaise entre Cork et Kerry&rft.aulast=Garcia&rft.aufirst=Pepa&rft.date=01/02/19&rft.volume=210&rft.spage=pp.26&rft.epage=3401405naa0a2200253 4500001000700000011001400007090001100021100004100032200008500073210001300158215001300171330045200184461003800636700002500674969002200699606006300721969002200784969002000806969001100826969001000837606006500847801003000912938020900942519692 a1660-1025 a519692 a20190409d2019 uu|y0frey5003 ba10aEscale à Mangareva. Au royaume de la pierre noirebArticlefCharlotte Guillemot d01/02/19 app.65-73 aOn dit qu'on ne la choisit pas, que c'est elle qui nous choisit. Qu'elle éveille en nous un appel au rêve, au voyage. La perle de Tahiti, bijou de l'océan, a gardé son secret pendant longtemps. Aujourd'hui, la perliculture est devenue la plus belle symbiose entre la magie de la nature et le savoir-faire de l'homme. C'est dans le lagon de l'archipel des Gambier que les perles sont cultivées avec le plus grand soin, la plus grande patience. 325tAnimanv2109259517d01/02/19 aGuillemotbCharlotte aPerles cultivées aPerles de cultureyMangareva (Polynésie française, île) aOuvrages en nacre aObjets en nacre aNacres aNacre aTravail de la nacreyMangareva (Polynésie française, île) 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Escale à Mangareva. Au royaume de la pierre noire&rft.aulast=Guillemot&rft.aufirst=Charlotte&rft.date=01/02/19&rft.volume=210&rft.spage=pp.65&rft.epage=7301591naa0a2200397 4500001000700000011001400007090001100021100004100032200006000073210001300133215001300146330038300159461003800542702001900580700001800599969001100617969001100628969001200639969001200651969001400663969001600677969001000693969001600703607004200719969002700761969002700788969002100815969002600836969001600862969002200878969002300900969000900923606004700932801003000979938018401009519693 a1660-1025 a519693 a20190409d2019 uu|y0frey5003 ba10aVie de chat à Chefchaouen (Une)bArticlefTuul Morandi d01/02/19 app.75-81 aAu coeur du Rif marocain, la ville bleue de Chefchaouen est un véritable sanctuaire pour les chats. Ils ont toujours été appréciés dans le monde musulman, le prophète Mahomet, très attaché à sa chatte Muezza, a largement influencé les disciples d'Allah pour qu'ils respectent ces félins. Aujourd'hui, les habitants de Chefchaouen perpétuent toujours cet attachement. 325tAnimanv2109259517d01/02/19 aMorandibBruno aMorandibTuul aChauen aChaoun aXexauen aChaouen aShishawen aChefchaouen aXauen aChechaouene aChechaouengMarocxMoeurs et coutumes aFelis silvestris catus aFelis lybica domestica aFelis domesticus aFelis catus domestica aFelis catus aChats domestiques aChat de gouttière aChat aChat domestiqueyMarocyChechaouen (Maroc) 0aFRbIndexpressec20190409 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Vie de chat à Chefchaouen (Une)&rft.aulast=Morandi&rft.aufirst=Tuul&rft.date=01/02/19&rft.volume=210&rft.spage=pp.75&rft.epage=8101602naa0a2200349 4500001000700000011001400007090001100021100004100032200008300073210001300156215001300169300004500182330032700227461003800554700001900592607006300611969002500674969002400699969002000723969002100743969002400764969002200788969002100810969002000831969002400851969002100875969002400896969002900920606006600949801003001015938020701045519696 a1660-1025 a519696 a20190411d2019 uu|y0frey5003 ba10aAntibes et Juan-les-Pins, rêver en bleu et en artistebArticlefMarie Paturel d01/04/19 app.12-23 aNuméro spécial consacré à la France. aC'est une cité de marins, de musiciens et d'amateurs d'art. Elle embaume les parfums de Provence et l'huile solaire des plages de la Côte d'Azur. Des vieilles pierres de la cité fortifiée aux discothèques de la station juanaise, Antibes et Juan-les-Pins cultivent un subtil alliage d'histoire, d'art et de modernité. 325tAnimanv2119259517d01/04/19 aPaturelbMarie aAntibesgAlpes-Maritimes, régionxDescriptions et voyages aTourisme littéraire aTourisme et musique aArt et tourisme aTourisme musical aTourisme et culture aVoyages culturels aTourisme et arts aTourisme et art aCulture et tourisme aArts et tourisme aMusique et tourisme aLittérature et tourisme aTourisme culturelyFranceyAntibes (Alpes-Maritimes, région) 0aFRbIndexpressec20190411 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Antibes et Juan-les-Pins, rêver en bleu et en artiste&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/04/19&rft.volume=211&rft.spage=pp.12&rft.epage=2301523naa0a2200349 4500001000700000011001400007090001100021100004100032200009400073210001300167215001300180300004500193330030800238461003800546700001900584969000900603969000900612607004200621969002500663969001800688969002900706969002300735969001800758969002000776969002800796969002400824969001800848969001700866606004200883801003000925938021800955519697 a1660-1025 a519697 a20190411d2019 uu|y0frey5003 ba10aAude côté nature. Balades paisibles entre mer et châteaux (L')bArticlefMarie Paturel d01/04/19 app.24-34 aNuméro spécial consacré à la France. aParfois surnommée la Petite France, l'Aude conjugue les caractères français au pluriel. A la diversité des paysages répond l'infinie variation des couleurs de la mer, des étangs, des montagnes et des villages préservés. Echappée belle à la découverte d'une région attachante et ensoleillée. 325tAnimanv2119259517d01/04/19 aPaturelbMarie aAude aAude aAudegFrancexDescriptions et voyages aVacances à la ferme aTourisme vert aTourisme en milieu rural aTourisme de nature aGîtes ruraux aFermes-auberges aExploitations agricoles aCamping à la ferme aAgri-tourisme aAgritourisme aTourisme ruralyFranceyAude (France) 0aFRbIndexpressec20190411 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Aude côté nature. Balades paisibles entre mer et châteaux (L')&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/04/19&rft.volume=211&rft.spage=pp.24&rft.epage=3401125naa0a2200205 4500001000700000011001400007090001100021100004100032200010400073210001300177215001300190300004500203330027000248461003800518700001900556607004400575607004200619801003000661938022800691519698 a1660-1025 a519698 a20190411d2019 uu|y0frey5003 ba10aSuisse - Provence-Alpes-Côte d'Azur. Les belles escales de la route du SudbArticlefMarie Paturel d01/04/19 app.52-63 aNuméro spécial consacré à la France. aDu Nord des Alpes aux rives de la Méditerranée, l'itinéraire sillonne un vaste patchwork paysager. Partir du Léman et descendre à la mer, c'est traverser une mosaïque de couleurs et de senteurs qu'un road-trip très actuel permet de savourer, tout en douceur. 325tAnimanv2119259517d01/04/19 aPaturelbMarie aRhônegFrancexDescriptions et voyages aRoutes touristiquesyFrance (sud-est) 0aFRbIndexpressec20190411 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Suisse - Provence-Alpes-Côte d'Azur. Les belles escales de la route du Sud&rft.aulast=Paturel&rft.aufirst=Marie&rft.date=01/04/19&rft.volume=211&rft.spage=pp.52&rft.epage=6301316naa0a2200265 4500001000700000011001400007090001100021100004100032200010000073210001300173215001300186300004700199330034600246461003800592700002400630969001100654969001000665969001400675969001300689969001300702607004600715607003500761801003000796938022400826519699 a1660-1025 a519699 a20190411d2019 uu|y0frey5003 ba10aBretagne, ça vous gagne. Escales magiques entre terre et mer (La)bArticlefNicolas Peitrequin d01/04/19 app.64-73 aNuméro spécial consacré à la France. aDu sud au nord, de l'est à l'ouest, la Bretagne est une région qui sait distiller ses beautés, ses mystères et son authenticité à chaque saison. Bienvenue pour un road-trip inédit, de Nantes à Vannes, de la forêt mystérieuse de Brocéliande aux corsaires de Saint-Malo, pour finir en beauté au festival annuel des îles bretonnes. 325tAnimanv2119259517d01/04/19 aPeitrequinbNicolas aBreizh aBreiz aArmorique aBretagne aBretagne aBretagnegFrancexDescriptions et voyages aBretagnexCivilisationgFrance 0aFRbIndexpressec20190411 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Bretagne, ça vous gagne. Escales magiques entre terre et mer (La)&rft.aulast=Peitrequin&rft.aufirst=Nicolas&rft.date=01/04/19&rft.volume=211&rft.spage=pp.64&rft.epage=7301177naa0a2200253 4500001000700000011001400007090001100021100004100032200008400073210001300157215001300170300004700183330023600230461003800466700001900504607007100523969001700594969001500611969001200626969001100638607003600649801003000685938020800715519700 a1660-1025 a519700 a20190411d2019 uu|y0frey5003 ba10aBiarritz et la côte basque, un caractère bien trempébArticlefDidier Forray d01/04/19 app.74-81 aNuméro spécial consacré à la France. aDe Biarritz à Hendaye, la côte basque s'étire sur une trentaine de kilomètres seulement. Mais elle réserve un océan de découvertes, d'histoires et d'anecdotes. Bienvenue au pays du surf, de la pelote basque et des corsaires. 325tAnimanv2119259517d01/04/19 aForraybDidier aBiarritzgPyrénées-Atlantiques, régionxDescriptions et voyages aEuskal herri aEuskalerri aEuzkadi aBasque aPays basquexMoeurs et coutumes 0aFRbIndexpressec20190411 a&rft.issn=1660-1025&rft.jtitle=Animan&rft.atitle=Biarritz et la côte basque, un caractère bien trempé&rft.aulast=Forray&rft.aufirst=Didier&rft.date=01/04/19&rft.volume=211&rft.spage=pp.74&rft.epage=81 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_koha_dugroin.txt b/cosmogramme/tests/php/classes/unimarc_koha_dugroin.txt new file mode 100644 index 0000000000000000000000000000000000000000..aa966e26e6d910df3d760da45efa7568b82a314b --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_koha_dugroin.txt @@ -0,0 +1 @@ +00237nas0a2200109 450000100030000001900070000303500160001009000070002610000410003320000250007480100280009966 c66 aCHY-1385600 a66 a20161219 frey50 afamille Dugroin (La) 0aFRb730656101c20110329 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_koha_perios_ideat.txt b/cosmogramme/tests/php/classes/unimarc_koha_perios_ideat.txt new file mode 100644 index 0000000000000000000000000000000000000000..8e3c76431bfb2fe2dfafa80a52aa5fe43e2ac794 --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_koha_perios_ideat.txt @@ -0,0 +1 @@ +04099cum0a22006612 450000100070000000500170000701100140002403500150003809000110005310000410006410100080010511000160011320000950012921000320022446300540025646300580031046300550036846300530042346300550047646300560053146300570058746300510064446300530069546300560074846300510080446300550085546300610091046300660097146300550103746300530109246300570114546300510120270000390125380100220129280100220131480100220133699501340135899501260149299501080161899501080172699500840183499500840191899500960200299500840209899500840218299500840226699500960235099500840244699500840253099500840261499500840269899500960278299500840287899501080296299501260307099501220319699501190331833939920140515095001.0 a1294-9485 ablv-T70366 a339399 a20081230a20129999 u0frey5003 ba afre aafa 0xx011aIDEATeIdées-Design-Evasion-Architecture-Tendancefdirecteur de publication Laurent Blanc aPariscIDEAT Editionsd2008 0I140881tIDEAT : N ÌŠ 94 de juillet 2012vN ÌŠ 94 0I170270tIDEAT : N ÌŠ 105 de décembre 2013vN ÌŠ 105 0I131386tIDEAT : N ÌŠ 90 de février 2012vN ÌŠ 90 0I161952tIDEAT : N ÌŠ 101 de juin 2013vN ÌŠ 101 0I152297tIDEAT : N ÌŠ 98 de février 2013vN ÌŠ 98 0I162926tIDEAT : N ÌŠ 102 de juillet 2013vN ÌŠ 102 0I172339tIDEAT : N ÌŠ 106 de février 2014vN ÌŠ 106 0I133157tIDEAT : N ÌŠ 91 de mars 2012vN ÌŠ 91 0I173656tIDEAT : N ÌŠ 107 de mars 2014vN ÌŠ 107 0I144298tIDEAT : N ÌŠ 95 de septembre 2012vN ÌŠ 95 0I154599tIDEAT : N ÌŠ 99 de mars 2013vN ÌŠ 99 0I135465tIDEAT : N ÌŠ 92 d'avril-mai 2012vN ÌŠ 92 0I135466tIDEAT : HS n ÌŠ 92 d'avril-mai 2012vHS n ÌŠ 92 0I165190tIDEAT : N ÌŠ 103 de septembre-octobre 2013vN ÌŠ 103 0I147221tIDEAT : N ÌŠ 96 de novembre 2012vN ÌŠ 96 0I157482tIDEAT : N ÌŠ 100 d'avril 2013vN ÌŠ 100 0I167747tIDEAT : N ÌŠ 104 de novembre 2013vN ÌŠ 104 0I138052tIDEAT : N ÌŠ 93 de juin 2012vN ÌŠ 93 9384394aBlancbLaurent3874654651 1aFRbBLVc20081230 2aFRbBLVc20131127 3aFRbBLVc20140414 f058031484w2014-08-01609583830cBLV2052014-04-15n2014-08-298ARTSvN° 107 de mars 2014qADUo0eAJrREVm2014-08-0140bBLV f058031425w2014-06-17609583831cBLV2052014-04-158ARTSqADUo0vN° 106 de février 2014eAJrREVm2014-05-2440bBLV f20999w2014-07-11609583832cBLV2052014-04-15n2014-08-088ARTSqADUo0eAJrREVm2014-07-1140bBLV f20177w2014-04-26609583833cBLV2052014-04-15n2014-04-298ARTSqADUo0eAJrREVm2014-03-2940bBLV f20020w2014-04-15609583834cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f19442w2014-04-15609583835cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f18653w2014-07-12609583836cBLV2052014-04-158ARTSqADUo0eAJrREVm2014-06-1340bBLV f17991w2014-04-15609583837cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f17550w2014-04-15609583838cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f17042w2014-04-15609583839cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f15860w2014-05-16609583840cBLV2052014-04-158ARTSqADUo4eAJrREVm2014-04-2541bBLV f15557w2014-04-15609583841cBLV2052014-04-158ARTSqADUo4eAJrREV41bBLV f16650w2014-04-15609583842cBLV2052014-04-158ARTSqADUo4eAJrREV41bBLV f16210w2014-04-15609583843cBLV2052014-04-158ARTSqADUo4eAJrREV41bBLV f16209w2014-04-15609583844cBLV2052014-04-158ARTSqADUo4eAJrREV41bBLV f21369w2014-05-24609583845cBLV2052014-04-158ARTSqADUo0eAJrREVm2014-05-1340bBLV f19041w2014-04-15609583846cBLV2052014-04-158ARTSqADUo0eAJrREV40bBLV f20558w2014-05-10609583847cBLV2052014-04-15n2014-05-138ARTSqADUo0eAJrREVm2014-04-1240bBLV f058031916w2014-08-05609586054cBLV2052014-05-158ARTSqADUo0vN° 108 d'avril-mai 2014eAJrREVm2014-07-1640bBLV f058031899w2014-08-01609587232cBLV2052014-05-228ARTSvN° 109 de juin 2014qADUo0eAJrREVm2014-07-1240bBLV f058032300w2014-07-02609592918cBLV2052014-07-028ARTSqADUo0vN° 110 de juillet-août 2014eAJrREV40bBLV \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_la_pagaille.txt b/cosmogramme/tests/php/classes/unimarc_la_pagaille.txt new file mode 100644 index 0000000000000000000000000000000000000000..20083b0076933a8a623d7218c2c4bd35edbd5f21 --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_la_pagaille.txt @@ -0,0 +1 @@ +03400 2200229 45000010006000000100014000060710037000200730018000570900009000750910019000840990016001031000041001191010008001602000148001682100038003162150026003543000066003803300492004466100013009387000029009519702190009801258 d34.07 Eur bL.c.j. Editions Productionsa820 a3550460034185 a1258 a2b20140822c0 eVERLAYtDVD a20120910 frey50 afre aLa Pagaille fPascal Thomas, réal. et scén.gAgenore Incrocci, scén.gFrançois Périer, Patrick Chesnais, Remy Girard, Coralie Seyrig, act. cL.c.j. Editions Productionsd1991 a1 DVD (100 mn)ccoul. aPrêt + Consultation sur place coll. et Projection collective aMartin, séparé de sa femme Brigitte depuis 7 ans, vit avec Clément et Emilie ses deux enfants d'une vingtaine d'années, et Gabriel son beau père. Il a une relation régulière avec une jeune femme Patricia. Martin retrouve par hasard Brigitte et ils revivent un second grand amour, au grand dam de leurs proches, qui étaient tout à fait satisfaits de ce mode de vie "moderne". Pour échapper à ceux qui veulent les séparer, les époux préfèrent quitter le domicile familial... aComédie aThomasbPascal43704690 3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m3http://catalogue.bnf.fr/ark:/12148/cb16745882m9746643http://catalogue.bnf.fr/ark:/12148/cb16745882maIncroccibAgenoref1919-20054690 13146571743http://ca 13139308153http://catalogue.bnf.f 1aPérier bFrançois4005 0aFRbCVSc20120822 fSTJ006212i34.07w2014-03-05300094077cMTRSTJ20kCo THO52012-12-07o0ecinema adultesddcrDVDm2014-02 \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/unimarc_serial_matricule_ange.txt b/cosmogramme/tests/php/classes/unimarc_serial_matricule_ange.txt new file mode 100644 index 0000000000000000000000000000000000000000..c991058d80c833b78d4ef936bafc524742f5c887 --- /dev/null +++ b/cosmogramme/tests/php/classes/unimarc_serial_matricule_ange.txt @@ -0,0 +1 @@ +04611 2200601 450000100060000001100240000603500160003009000100004610000410005610100130009710200070011020000270011721000520014421500160019630000210021232600120023367600370024570000550028270200470033780100240038490200550040890200260046391200110048911000160050060600390051685600400055595500670059595500640066209900340072699501560076099501390091699501350105599501540119099501440134499501330148899501480162199501440176999501340191399501310204799501480217899501310232699501350245799501310259299501440272399501450286799501430301299501440315599501550329999501290345499501660358399501280374999501320387776692 a0245-5676d6,50 EUR aCHY-0178511 a76692 a19940209a1980 u y0frey5003 ba0 afreaeng aFR1 aArt pressbPériodique aParisb2, rue Saint SimoncArt pressd1980 -... d29 cma0 p. aEdition bilingue aMensuel 9605201a700vBMCHY 1.1eBARBERAZ 19337808aMilletbCatherinef1948-....301908574300 19389262303155404710aJouannaisbJean-Yves 0aFRc19940209gAFNOR 9628187aRevues - Collection en cours et conservée 9628207aRevues - Arts aNA- 11 aafa||||0xx0 31308686aArtxPériodiques9531816 uhttps://www.artpress.com/zSite web rno 187, 1994 -...wno 194 (1994) ; no 389 et 394 (2011)aP 982 rHS15 (1994) ; HS18 (1997) ; HS19 (1998) ; HS6 (2003)aP 982 c2016-12-19d2019-07-11x18s1 10203052017-12-229434746bCHY-JRcCHY-JRe201fY1633432gAhPERi2017-12-22m2018-09-29o0p6.00rPRETNORMALvn°451, janvier 2018w4x1y2018-10-03 1020309436582bCHY-JRcCHY-JRe201fY1633034gAhPERi2018-01-24m2018-11-27o0rPRETNORMALvn°452, février 2018w3x1y2019-01-05 1020309497468bCHY-JRcCHY-JRe201fY1634180gAhPERi2018-02-21m2018-09-21o0rPRETNORMALvn°453, mars 2018w4x2y2018-09-27 10203052018-03-279500628bCHY-JRcCHY-JRe201fY1635994gAhPERi2018-03-27m2019-05-21o0p6.80rPRETNORMALvn°454, avril 2018w5x2y2019-06-22 10203052018-04-249503307bCHY-JRcCHY-JRe201fY1635603gAhPERi2018-04-24m2019-04-27o0rPRETNORMALvn° 455, mai 2018w5y2019-04-30 1020309505608bCHY-JRcCHY-JRe201fY1637958gAhPERi2018-05-23m2018-12-06o0rPRETNORMALvn° 456, juin 2018w4y2018-12-19 10203052018-06-269509406bCHY-JRcCHY-JRe201fY1637722gAhPERi2018-06-26m2018-09-21o0rPRETNORMALvn° 457, juillet 2018w2y2018-10-19 10203052018-08-309518978bCHY-JRcCHY-JRe201f1639220gAhPERi2018-08-30m2018-12-13o0rPRETNORMALvn°458, août 2018w3y2018-12-21 1020309521075bCHY-JRcCHY-JRe201f1640503gAhPERi2018-09-26m2018-11-22o0rPRETNORMALvn°459, octobre 2018w2y2018-12-14 10203052018-10-259524561bCHY-JRcCHY-JRe201f1642415gAhPERi2018-10-25o0rPRETNORMALvn°460, octobre 2018y2018-10-25 10203052018-11-289528769bCHY-JRcCHY-JRe201f1642098gAhPERi2018-11-28m2019-01-03o0rPRETNORMALvn°461, décembre 2018w1y2019-01-09 10203052018-12-279532040bCHY-JRcCHY-JRe201f1644385gAhPERi2018-12-27o0rPRETNORMALvn°462, janvier 2019y2018-12-27 10203052019-01-229534011bCHY-JRcCHY-JRe201f1644463gAhPERm2019-02-26o0rPRETNORMALvn°463, février 2019w1y2019-03-12 10203052019-02-269536905bCHY-JRcCHY-JRe201f1650193gAhPERm2019-04-23o0rPRETNORMALvn°464, mars 2019w1y2019-05-11 10203052019-03-289539774bCHY-JRcCHY-JRe201f1650367gAhPERi2019-03-28m2019-09-18o0rPRETNORMALvn°465, avril 2019w3y2019-09-25 10203052019-04-259542644bCHY-JRcCHY-JRe201f1651591gAhPERi2019-04-25m2019-08-20o0rPRETNORMALvn°466, mai 2019w2x1y2019-09-25 10203052019-05-289545024bCHY-JRcCHY-JRe201f1651851gAhPERi2019-05-28m2019-06-27o0rPRETNORMALvn°467, juin 2019w1y2019-07-10 10203052019-06-259547029bCHY-JRcCHY-JRe201f1652512gAhPERi2019-06-25m2019-08-30o0rPRETNORMALvn°468, juil. 2019w1y2019-09-18 10203052019-07-119548840bCHY-CAcCHY-CAe905fCHY-CA19070178hPERl+ 1 cahier Jeune créationo0rPRETNORMALvn°468, juil.-août 2019y2019-07-11 10203052019-08-239551529bCHY-JRcCHY-JRe201f1654010gAhPERi2019-08-23o0rPRETNORMALvn°469, sept. 2019y2019-08-23 10203052019-09-129553220bCHY-CAcCHY-CAe905fCHY-CA19095432hPERi2019-09-12o0rPRETNORMALuFrancis Bacon en toutes lettresvn°469, sept. 2019y2019-09-12 10203052019-09-259554439bCHY-JRcCHY-JRe201f1654428gAhPERi2019-09-25o0rPRETNORMALvn°470, oct. 2019y2019-09-25 10203052019-09-259554575bCHY-CAcCHY-CAe905fCHY-CA19095596hPERi2019-09-25o0rPRETNORMALvn°470, oct. 2019y2019-09-2505349nas0a2200625 4500001000700000011001400007035001600021090001100037099003500048100004100083101000800124102000700132110001600139200007900155207002300234210004100257215001000298326001500308606004800323676002700371801002800398856012700426912001100553999002800564902004100592902004300633995015600676995015700832995015300989995015401142995015201296995014701448995015001595995012801745995014401873995015702017995013902174995014502313995015302458995013402611995013502745995015102880995014903031995015403180995013403334995015003468995013903618995013403757995013403891995015204025995013304177995013404310995015004444995012904594111511 a1241-7696 aCHY-0532879 a11151100x156s1c2016-12-19d2017-02-16 a19990128a1992 m y0frey5003 ba0 afre aFR aaga||||0xu01 aMatricule des Anges (Le)bPériodiqueejournal d'informations littéraires 0aN°1 (1992, nov.)- aPariscLe Matricule des Angesd1992- d30 cm aBimestriel 953060731398379aLittératurexPériodiques 9605285a800vBMCHY 2.0 0aFRb730656101c19990128 3http://www.bm-chambery.fr/opacwebaloes/index.aspx?IdPage=706uhttp://www.bm-chambery.fr/opacwebaloes/index.aspx?IdPage=706 aNA- 11 30848103aPERcJRdLLgP 9628192aRevues - Collection en cours 962819330000000aRevues - Littérature 10203052017-03-239413740bCHY-JRcCHY-JRe101fY1624572gAhPERi2017-03-23m2018-09-08o0p6.00rPRETNORMALvn°179, janvier 2017w6x1y2018-10-05 10203052017-03-239413741bCHY-JRcCHY-JRe101fY1624576gAhPERi2017-03-23m2017-05-27o0p6.00rPRETNORMALvn°180, février 2017w3x1y2017-06-29 10203052017-03-239413742bCHY-JRcCHY-JRe101fY1624990gAhPERi2017-03-23m2017-08-05o0p6.00rPRETNORMALvn°181, mars 2017w5x1y2017-08-12 10203052017-04-149415987bCHY-JRcCHY-JRe101fY1625691gAhPERi2017-04-14m2018-06-16o0p6.00rPRETNORMALvn°182, avril 2017w7x2y2018-06-20 10203052017-05-179418756bCHY-JRcCHY-JRe101fY1626974gAhPERi2017-05-17m2018-07-11o0p6.00rPRETNORMALvn°183, mai 2017w6x1y2018-08-10 10203052017-06-159420630bCHY-JRcCHY-JRe101fY1626662gAhPERi2017-06-15m2018-03-20o0rPRETNORMALvn°184, juin 2017w4x1y2018-05-03 10203052017-07-139422423bCHY-JRcCHY-JRe101fY1628107gAhPERi2017-07-13m2019-05-04o0rPRETNORMALvn°185, juillet 2017w7x1y2019-05-22 1020309426187bCHY-JRcCHY-JRe101fY1629234gAhPERi2017-09-12o0p6.50rPRETNORMALvn°186, septembre 2017y2017-09-12 1020309428949bCHY-JRcCHY-JRe101fY1631236gAhPERi2017-10-18m2019-04-10o0p6.50rPRETNORMALvn°187, octobre 2017w5x1y2019-05-11 10203052017-11-249432178bCHY-JRcCHY-JRe101fY1631262gAhPERi2017-11-24m2018-06-16o0p6.00rPRETNORMALvn°188, novembre 2017w6x2y2018-06-20 1020309436163bCHY-JRcCHY-JRe101fY1633369gAhPERi2018-01-17m2019-04-17o0rPRETNORMALvn°189, janvier 2018w10x2y2019-05-10 1020309496827bCHY-JRcCHY-JRe101fY1634047gAhPERi2018-02-14m2019-04-16o0p6.50rPRETNORMALvn°190, février 2018w7x2y2019-05-15 1020309499597bCHY-JRcCHY-JRe101fY1634266gAhPERi2018-03-16m2019-09-21n2019-10-19o0p6.50rPRETNORMALvn°191, mars 2018w9x1y2019-09-21 1020309502278bCHY-JRcCHY-JRe101fY1635502gAhPERi2018-04-12m2018-09-08o0rPRETNORMALvn° 192, avril 2018w3y2018-10-05 1020309505029bCHY-JRcCHY-JRe101fY1635699gAhPERi2018-05-16m2018-12-08o0rPRETNORMALvn° 193, mai 2018w3x1y2019-03-01 10203052018-06-159508065bCHY-JRcCHY-JRe101fY1637687gAhPERi2018-06-15m2019-04-18o0p6.00rPRETNORMALvn° 194, juin 2018w4y2019-05-10 10203052018-07-129511258bCHY-JRcCHY-JRe101f1639209gAhPERi2018-07-12m2018-12-08o0rPRETNORMALvn°195, juillet 2018w5x1y2019-03-01 10203052018-09-079519629bCHY-JRcCHY-JRe101f1639451gAhPERi2018-09-07m2019-01-26o0p6.50rPRETNORMALvn°196, septembre 2018w5y2019-02-16 1020309522628bCHY-JRcCHY-JRe101f1640940gAhPERi2018-10-10m2019-01-25o0rPRETNORMALvn°197, octobre 2018w4y2019-02-13 1020309526795bCHY-JRcCHY-JRe101f1642370gAhPERi2018-11-15m2019-05-31n2019-07-30o0rPRETNORMALvn°198, novembre 2018w3x2y2019-05-31 1020309533438bCHY-JRcCHY-JRe101f1644275gAhPERi2019-01-15m2019-04-17o0rPRETNORMALvn°199, décembre 2018w4x1y2019-05-10 1020309535604bCHY-JRcCHY-JRe101f1644126gAhPERi2019-02-13m2019-06-05o0rPRETNORMALvn°200, janvier 2018w4y2019-07-03 1020309538434bCHY-JRcCHY-JRe101f1650212gAhPERi2019-03-14m2019-07-31o0rPRETNORMALvn°201, mars 2019w5x1y2019-09-06 10203052019-04-129541316bCHY-JRcCHY-JRe101f1651552gAhPERi2019-04-12m2019-06-27o0p6.50rPRETNORMALvn°202, avr. 2019w3x1y2019-07-19 1020309543822bCHY-JRcCHY-JRe101f1651905gAhPERi2019-05-14m2019-08-28o0rPRETNORMALvn°203, mai 2019w3x1y2019-09-28 1020309545881bCHY-JRcCHY-JRe101f1652807gAhPERi2019-06-11m2019-08-28o0rPRETNORMALvn°204, juin 2019w3x1y2019-09-28 10203052019-09-109548967bCHY-JRcCHY-JRe101f1652805gAhPERm2019-09-21n2019-10-19o0rPRETNORMALvn°205, juil.-août 2019w1y2019-09-21 10203052019-09-109552928bCHY-JRcCHY-JRe101f1654210gAhPERi2019-09-10o0rPRETNORMALvn°207, sept. 2019y2019-09-10 \ No newline at end of file diff --git a/library/Class/CodifTypeDoc.php b/library/Class/CodifTypeDoc.php index 5aef7d14fbb63054d4c5122950f112248d7c6231..228471a527d34c7c85f5b59e4aabc6b886ac0078 100644 --- a/library/Class/CodifTypeDoc.php +++ b/library/Class/CodifTypeDoc.php @@ -38,6 +38,8 @@ class Class_CodifTypeDoc extends Storm_Model_Abstract { 'sections' => '', 'famille_id' => '']; + protected $_fixed_id = true; + protected static $_libelles = [self::INCONNU => 'Non identifié', self::LIVRE => 'Livre', self::PERIODIQUE => 'Périodique' , @@ -46,6 +48,7 @@ class Class_CodifTypeDoc extends Storm_Model_Abstract { self::LOGICIEL => 'Logiciel']; + public function getLibelle() { return $this->_(static::$_libelles[$this->getFamilleId()]); } diff --git a/library/Class/Codification.php b/library/Class/Codification.php index c8719d80dbf2109115c86eaec0e70f4a85c9ff0f..a193087727e745e88449334536b2bb368aefea00 100644 --- a/library/Class/Codification.php +++ b/library/Class/Codification.php @@ -271,13 +271,13 @@ class Class_Codification { if ($notice->isDVD()) return $me->_('Voir tous les épisodes'); - if (!$notice->isPeriodique()) - return $me->_('Voir tous les tomes'); - if ($notice->isFirstItemTypeSerialArticle()) return $me->_('Voir tous les articles de ce numéro'); - return $me->_('Voir tous les numéros'); + if ($notice->isPeriodique() || ($notice->getTypeDoc() == Class_TypeDoc::PERIODIQUE_TITLE)) + return $me->_('Voir tous les numéros'); + + return $me->_('Voir tous les tomes'); }; diff --git a/library/Class/Cosmogramme/Integration/PhaseNotice.php b/library/Class/Cosmogramme/Integration/PhaseNotice.php index 967541dae04fbb74d6edb2c7ee141cd3b96a054d..6d5494f6ea9f24c2b49f01031539a2a07d0b3d60 100644 --- a/library/Class/Cosmogramme/Integration/PhaseNotice.php +++ b/library/Class/Cosmogramme/Integration/PhaseNotice.php @@ -81,7 +81,7 @@ class Class_Cosmogramme_Integration_PhaseNotice protected function _markItemsToBeDeleted($id_int_bib) { $total = 0; - while( $items = Class_Exemplaire::findAllBy(['type' => Class_Notice::TYPE_BIBLIOGRAPHIC, + while( $items = Class_Exemplaire::findAllBy(['type not' => Class_Notice::TYPE_AUTHORITY, 'id_int_bib' => $id_int_bib, 'to_delete' => false, 'limit' => 1000])) { @@ -105,7 +105,7 @@ class Class_Cosmogramme_Integration_PhaseNotice /** hooked called after the file has been fully processed */ protected function _afterFileProcessed($integration) { - $args = ['type' => Class_Notice::TYPE_BIBLIOGRAPHIC, + $args = ['type not' => Class_Notice::TYPE_AUTHORITY, 'id_int_bib' => $integration->getIdBib(), 'to_delete' => true]; diff --git a/library/Class/CriteresRecherche.php b/library/Class/CriteresRecherche.php index 968e1b6ab3c95d44440a36113dce25c59af6a536..bef3a2dcec8361ee9f44e455717b0d7ce9eeb60a 100644 --- a/library/Class/CriteresRecherche.php +++ b/library/Class/CriteresRecherche.php @@ -266,7 +266,7 @@ class Class_CriteresRecherche extends Class_CriteresRecherche_Abstract { public function getTypeDoc() { $digital_resource = Class_DigitalResource::getInstance(); $validator = function($type) use($digital_resource){ - return $digital_resource->isPluginDocType($type) || is_numeric($type); + return null !== Class_TypeDoc::find($type); }; return array_filter(explode(',', $this->getParam('type_doc')), diff --git a/library/Class/CriteresRecherche/Validator.php b/library/Class/CriteresRecherche/Validator.php index a515f69e16fb3f2fc120a46558bb89b8b3091db3..9c1361a8b326501036e4be5d8c6d48d86f4ab987 100644 --- a/library/Class/CriteresRecherche/Validator.php +++ b/library/Class/CriteresRecherche/Validator.php @@ -24,9 +24,9 @@ class Class_CriteresRecherche_Validator { const PATTERN_YEAR = '/^[0-9]{4}$/', PATTERN_FACET = '/^[a-zA-Z0-9]+$/', - PATTERN_MULTIFACET = '/^[a-zA-Z0-9-]+$/', + PATTERN_MULTIFACET = '/^[a-zA-Z0-9-_]+$/', PATTERN_MULTI_IDS = '/^[0-9,]+$/', - PATTERN_ALPHAMAJ = '/^[A-Z0-9- *]+$/'; + PATTERN_ALPHA = '/^[a-zA-Z0-9-_ *]+$/'; public function isValid($key, $params) { return $this->_validatorFor($key)->isValid($key, $params); @@ -57,7 +57,7 @@ class Class_CriteresRecherche_Validator { static::PATTERN_FACET => ['rubrique', 'code_rebond'], static::PATTERN_MULTIFACET => ['multifacets'], static::PATTERN_MULTI_IDS => ['bib_select'], - static::PATTERN_ALPHAMAJ => ['serie'] + static::PATTERN_ALPHA => ['serie'] ]; foreach($map as $pattern => $names) diff --git a/library/Class/Exemplaire.php b/library/Class/Exemplaire.php index 72c2f23fd9dfaa954284a4c042c5a68880465aca..84793e1a097d3ce51e0510b28271cd792ea75c57 100644 --- a/library/Class/Exemplaire.php +++ b/library/Class/Exemplaire.php @@ -129,11 +129,14 @@ class Class_Exemplaire extends Storm_Model_Abstract { } - public function getPMBSerialRecord() { + public function getLinkedSerialRecord() { //see Cosmogramme PMBIntegrationSerialsTest - $item = $this->getLoader()->findFirstBy(['id_origine' => $this->getSubfield('0'), - 'id_int_bib' => $this->getIdIntBib()]); - return $item->getNotice(); + if (!$id_origine = $this->getSubfield('0')) + return null; + + $item = $this->getLoader()->findFirstBy(['id_origine' => $id_origine, + 'id_int_bib' => $this->getIdIntBib(),]); + return $item ? $item->getNotice() : null; } @@ -498,6 +501,10 @@ class Class_Exemplaire extends Storm_Model_Abstract { || (!$id_origine = $this->getSubfield($bundle_id_field))) return null; + $bundle_id_field = $data_profile->getBundleIdField(); + if (!$bundle_id = $this->getSubfield($bundle_id_field)) + return null; + $bundle_item = Class_Exemplaire::getLoader() ->findFirstBy(['id_int_bib' => $id_int_bib, 'id_origine' => $id_origine]); diff --git a/library/Class/Indexation.php b/library/Class/Indexation.php index db3c5232464a8901197debebb5fec52378b176ca..f7004363a495db33061313dec05534c30da2a174 100644 --- a/library/Class/Indexation.php +++ b/library/Class/Indexation.php @@ -114,6 +114,12 @@ class Class_Indexation { } + + public function serialCodeAlphaChapeau($titre, $tome) { + return $this->codeAlphaTitre($titre) . ' ' . $tome; + } + + // Indexation d'un titre public function codeAlphaTitre($titre) { diff --git a/library/Class/IntProfilDonnees.php b/library/Class/IntProfilDonnees.php index d11732eee3f06c8dc5497b1c833a92b2883d069a..35bb63d5ea9e0dda79a02268eecd99f2f124ab92 100644 --- a/library/Class/IntProfilDonnees.php +++ b/library/Class/IntProfilDonnees.php @@ -557,23 +557,24 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract { public static function forKoha() { - $type_doc = [['code' => '0', 'label' => '', 'zone_995' => 'IND' ], - ['code' => '1', 'label' => 'am;na', 'zone_995' => 'LIV;LIVJ;LIVA;DOC;MANUEL' ], - ['code' => '2', 'label' => 'as', 'zone_995' => 'REV;REVA;REVJ;'], - ['code' => '3', 'label' => 'i;j', 'zone_995' => 'CD'], - ['code' => '4', 'label' => 'g', 'zone_995' => 'DVD;JDVD;DVDA;DVDJ;VID'], - ['code' => '5', 'label' => 'l;m', 'zone_995' => 'CDROM;CDR'], - ['code' => '6', 'label' => '', 'zone_995' => 'LCD' ], - ['code' => '7', 'label' => '', 'zone_995' => 'PAR;JPAR;' ], - ['code' => '8', 'label' => '', 'zone_995' => ''], - ['code' => '9', 'label' => '', 'zone_995' => ''], - ['code' => '10', 'label' => ' ', 'zone_995' => ''], - ['code' => '11', 'label' => '', 'zone_995' => 'JVID'], - ['code' => '12', 'label' => '', 'zone_995' => 'MAT'], - ['code' => '13', 'label' => 'km', 'zone_995' => 'EST'], - ['code' => '14', 'label' => '', 'zone_995' => 'TLU'], - ['code' => '15', 'label' => '', 'zone_995' => 'CAR'], - ['code' => '16', 'label' => '', 'zone_995' => 'DIS']]; + $type_doc = [['code' => '0', 'label' => '', 'zone_995' => 'IND' ], + ['code' => '1', 'label' => 'am;na', 'zone_995' => 'LIV;LIVJ;LIVA;DOC;MANUEL' ], + ['code' => '2', 'label' => 'as', 'zone_995' => 'REV;REVA;REVJ;'], + ['code' => 'per_art','label' => 'aa', 'zone_995' => ''], + ['code' => '3', 'label' => 'i;j', 'zone_995' => 'CD'], + ['code' => '4', 'label' => 'g', 'zone_995' => 'DVD;JDVD;DVDA;DVDJ;VID'], + ['code' => '5', 'label' => 'l;m', 'zone_995' => 'CDROM;CDR'], + ['code' => '6', 'label' => '', 'zone_995' => 'LCD' ], + ['code' => '7', 'label' => '', 'zone_995' => 'PAR;JPAR;' ], + ['code' => '8', 'label' => '', 'zone_995' => ''], + ['code' => '9', 'label' => '', 'zone_995' => ''], + ['code' => '10', 'label' => ' ', 'zone_995' => ''], + ['code' => '11', 'label' => '', 'zone_995' => 'JVID'], + ['code' => '12', 'label' => '', 'zone_995' => 'MAT'], + ['code' => '13', 'label' => 'km', 'zone_995' => 'EST'], + ['code' => '14', 'label' => '', 'zone_995' => 'TLU'], + ['code' => '15', 'label' => '', 'zone_995' => 'CAR'], + ['code' => '16', 'label' => '', 'zone_995' => 'DIS']]; return self::newInstance( ['libelle' => 'Unimarc Koha', @@ -804,20 +805,22 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract { 'format' => self::FORMAT_UNIMARC, 'attributs' => [['type_doc' => - [[ 'code' => '0', 'label' => '', 'zone_995' => '' ], - [ 'code' => '1', 'label' => 'am;na', 'zone_995' => '' ], - [ 'code' => '2', 'label' => 'as;aa', 'zone_995' => ''], - [ 'code' => '3', 'label' => 'i;j', 'zone_995' => ''], - [ 'code' => '4', 'label' => 'g','zone_995' => ''], - [ 'code' => '5', 'label' => 'l;m', 'zone_995' => ''], - [ 'code' => '6', 'label' => '', 'zone_995' => '' ], - [ 'code' => '7', 'label' => '', 'zone_995' => '' ], - [ 'code' => '8', 'label' => '', 'zone_995' => ''], - [ 'code' => '9', 'label' => '', 'zone_995' => ''] + [[ 'code' => '0', 'label' => '', 'zone_995' => '' ], + [ 'code' => '1', 'label' => 'am;na', 'zone_995' => '' ], + [ 'code' => '2', 'label' => '', 'zone_995' => '18'], + [ 'code' => '3', 'label' => 'i;j', 'zone_995' => ''], + [ 'code' => '4', 'label' => 'g', 'zone_995' => ''], + [ 'code' => '5', 'label' => 'l;m', 'zone_995' => ''], + [ 'code' => '6', 'label' => '', 'zone_995' => '' ], + [ 'code' => '7', 'label' => '', 'zone_995' => '' ], + [ 'code' => '8', 'label' => '', 'zone_995' => ''], + [ 'code' => '9', 'label' => '', 'zone_995' => ''], + ['code' => 'per_art','label' => 'aa', 'zone_995' => ''], + ['code' => 'per_title','label' => 'as', 'zone_995' => ''], ], self::FIELD_ITEM_BARCODE => '996', self::FIELD_ITEM_COTE => 'k', - self::FIELD_ITEM_TYPE_DOC => 'e', + self::FIELD_ITEM_TYPE_DOC => 'r', self::FIELD_ITEM_GENRE => '', self::FIELD_ITEM_SECTION => 'x', self::FIELD_ITEM_EMPLACEMENT => '', @@ -929,9 +932,19 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract { public function setTypeDocRecognition($type_doc, $label, $zone_995) { $config = unserialize($this->getAttributs()); - $config[0]['type_doc'][$type_doc] = ['code' => $type_doc, - 'label' => $label, - 'zone_995' => $zone_995]; + + $entry = ['code' => $type_doc, + 'label' => $label, + 'zone_995' => $zone_995]; + + foreach($config[0][static::PROFILE_DOC_TYPES] as $index => $td) { + if ((string)$td['code'] == (string)$type_doc) { + $config[0][static::PROFILE_DOC_TYPES][$index] = $entry; + return $this->setAttributs($config); + } + } + + $config[0][static::PROFILE_DOC_TYPES][] = $entry; return $this->setAttributs($config); } @@ -1023,7 +1036,10 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract { public function getFiletypeLabel() { - return $this->getLoader()->getFileTypes()[$this->getTypeFichier()]; + $file_types = $this->getLoader()->getFileTypes(); + return isset($file_types[$this->getTypeFichier()]) + ? $file_types[$this->getTypeFichier()] + : ''; } diff --git a/library/Class/Notice.php b/library/Class/Notice.php index eda5a79fcc45998f4d5821fd184bfd7cc9c54d3f..7d5437fde0dbbbe6385bf553c5fc713594e979f2 100644 --- a/library/Class/Notice.php +++ b/library/Class/Notice.php @@ -732,13 +732,18 @@ class Class_Notice extends Storm_Model_Abstract { } - public function hasTome() { - return ($this->get_subfield("461", "t") && strlen($this->getClefChapeau()) > 1); + public function hasSerieTitle() { + return !empty($this->get_subfield("461", "t")); + } + + + public function hasSerie() { + return (strlen($this->getClefChapeau()) > 1) && (strlen($this->getTomeAlpha()) > 1 || $this->hasSerieTitle()); } public function getNoticesMemeSeries() { - if (!$this->hasTome()) + if (!$this->hasSerie()) return []; return $this->getLoader()->getAllNoticesByClefChapeau($this->getClefChapeau()); @@ -839,10 +844,15 @@ class Class_Notice extends Storm_Model_Abstract { public function getTitreChapeau() { $titre = ''; + if ($data = $this->get_subfield("461", "t")) { return $this->filtreTitre($data[0]); } + if ($data = $this->get_subfield("463", "t")) { + return $this->filtreTitre(end($data)); + } + if ($titres = $this->get_subfield('200', 'a')) $titre = trim($titres[0]); // On cherche le chapeau et le n° @@ -970,14 +980,6 @@ class Class_Notice extends Storm_Model_Abstract { return trim($titre); } -// ---------------------------------------------------------------- -// ISSN -// ---------------------------------------------------------------- - public function getIssn() - { - $issn = $this->get_subfield("011", "a"); - return trim($issn[0]); - } // ---------------------------------------------------------------- // Mention d'edition @@ -1903,4 +1905,12 @@ class Class_Notice extends Storm_Model_Abstract { public function isAuthority() { return static::TYPE_AUTHORITY === $this->getType(); } + + + public function getLinkedSerialRecord() { + $item = $this->getFirstExemplaire(); + return $item + ? $item->getLinkedSerialRecord() + : null; + } } \ No newline at end of file diff --git a/library/Class/Notice/DoubleFinder.php b/library/Class/Notice/DoubleFinder.php index 1c38621f60c7e160b72600fef88ddf55bb306585..b45706cc6bc842bb9fa4daeec1595a03afabf97d 100644 --- a/library/Class/Notice/DoubleFinder.php +++ b/library/Class/Notice/DoubleFinder.php @@ -54,6 +54,9 @@ class Class_Notice_DoubleFinder { protected function _chooseStrategy() { + if ((string)$this->_data->gettype_doc() == (string)Class_TypeDoc::PERIODIQUE_TITLE) + return new Class_Notice_DoubleFinder_PeriodicTitle(null); + $library_limit = ($this->_barcode_uniq_mode == Class_CosmoVar::UNIQ_BARCODE_WITHIN_LIBRARY) ? (int) $this->_library->getId() : null; @@ -349,4 +352,19 @@ class Class_Notice_DoubleFinder_NoDedupStrategy extends Class_Notice_DoubleFinde return $this->_getRecordIdByItem(['id_origine' => $this->_data->getid_origine(), 'id_int_bib' => $this->_library_limit]); } +} + + + + +class Class_Notice_DoubleFinder_PeriodicTitle extends Class_Notice_DoubleFinder_Strategy { + public function find($data) { + $this->_data = $data; + + if (!$this->_id = $this->_getRecordIdByItem(['id_origine' => $data->getid_origine()])) + return false; + + $this->_found_on = static::FOUND_ON_ID_ORIGINE; + return true; + } } \ No newline at end of file diff --git a/library/Class/NoticeUnimarc.php b/library/Class/NoticeUnimarc.php index 6fdbb3b724ebb39f1b271bec1c702b4ccdb5c2af..a5a35d02fff90358b829b67557be593305c5fcc0 100644 --- a/library/Class/NoticeUnimarc.php +++ b/library/Class/NoticeUnimarc.php @@ -296,6 +296,21 @@ class Class_NoticeUnimarc { } + public function getChampsForces() { + $champs_sup = explode(';', Class_CosmoVar::get('champs_sup')); + + $champ_forces = []; + for($i=0; $i < count($champs_sup); $i++) { + $champ = $this->get_subfield($champs_sup[$i]); + for($j=0; $j < count($champ); $j++) { + $champ_forces["Z" . $champs_sup[$i]][] = $champ[$j]; + } + } + return $champ_forces; + } + + + /** * Concatenate all values founds in $fields * @param $fields array of ['zone', 'field'] like: diff --git a/library/Class/TypeDoc.php b/library/Class/TypeDoc.php index 986f682722eef48293cc82e923976135692c69be..b3f559ef624f630635a191fe1109c6e3cac3a237 100644 --- a/library/Class/TypeDoc.php +++ b/library/Class/TypeDoc.php @@ -320,6 +320,8 @@ class Class_TypeDoc extends Storm_Model_Abstract { const ARTICLE = 8; const RSS = 9; const SITE = 10; + const PERIODIQUE_ARTICLE = 'per_art'; + const PERIODIQUE_TITLE = 'per_title'; const SERIAL_ARTICLE = 100; const LIVRE_NUM = 100; const DIAPORAMA = 101; @@ -343,6 +345,8 @@ class Class_TypeDoc extends Storm_Model_Abstract { $instance = new Class_TypeDoc; return [self::LIVRE => $instance->_('Livres'), self::PERIODIQUE => $instance->_('Périodiques'), + self::PERIODIQUE_TITLE => $instance->_('Titre de périodique'), + self::PERIODIQUE_ARTICLE => $instance->_('Article de périodique'), self::DISQUE => $instance->_('Disques'), self::DVD => $instance->_('DVD'), self::LOGICIEL => $instance->_('Logiciel'), diff --git a/library/ZendAfi/View/Helper/ListeNotices/Description.php b/library/ZendAfi/View/Helper/ListeNotices/Description.php new file mode 100644 index 0000000000000000000000000000000000000000..09fd82ee8f2a647a2c8aa04e84222570655c3a0c --- /dev/null +++ b/library/ZendAfi/View/Helper/ListeNotices/Description.php @@ -0,0 +1,45 @@ +<?php +/** + * Copyright (c) 2012-2019, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +class ZendAfi_View_Helper_ListeNotices_Description extends ZendAfi_View_Helper_ListeNotices_Abstract { + public function listeNotices_Description($records, $preferences=[]) { + return + $this->view->tagUlLi(array_map(function($record) use ($preferences) + { + return $this->renderRecord($record, $preferences); + }, + $records)); + } + + + public function renderRecord($record, $preferences) { + return + $this->_tag('h3', + $this->_tag('a', $record->getRecordTitle(), + ['href'=>$this->view->urlNotice($record)] + )) + . + $this->view->notice_Entete($record, [ZendAfi_View_Helper_Notice_Entete::SETTING_FIELDS => $preferences['liste_codes'], + ZendAfi_View_Helper_Notice_Entete::SETTING_ADD_SERIE_LINK => false]) + . + $this->_tag('div', '', ['class' => 'clear']); + } +} diff --git a/library/ZendAfi/View/Helper/Notice/ArticlesPeriodiques.php b/library/ZendAfi/View/Helper/Notice/ArticlesPeriodiques.php new file mode 100644 index 0000000000000000000000000000000000000000..9f6fd200961ae4865010ccd203c046d13243b472 --- /dev/null +++ b/library/ZendAfi/View/Helper/Notice/ArticlesPeriodiques.php @@ -0,0 +1,57 @@ +<?php +/** + * Copyright (c) 2012-2019, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class ZendAfi_View_Helper_Notice_ArticlesPeriodiques extends ZendAfi_View_Helper_BaseHelper { + public function Notice_ArticlesPeriodiques($notice) { + if ($periodiques = $notice->getArticlesPeriodique()) + return (new Class_NoticeHtml())->getArticlesPeriodique($periodiques); + + return $this->_renderLinkToParent($notice) . $this->_renderArticles($notice); + } + + + protected function _renderArticles($notice) { + $headkey = Class_Indexation::getInstance()->serialCodeAlphaChapeau($notice->getClefChapeau(), + $notice->getTomeAlpha()); + if ($articles = Class_Notice::findAllBy(['clef_chapeau' => $headkey, + 'type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE, + 'order' => 'id_notice'])) + return $this->view->listeNotices_Description($articles, ['liste_codes' => 'KAR']); + + return ''; + } + + + protected function _renderLinkToParent($notice) { + $clef_oeuvre_parent = explode('-', $notice->getClefOeuvre()); + array_pop($clef_oeuvre_parent); + $clef_oeuvre_parent[] = ''; + + if ($parent = Class_Notice::findFirstBy(['clef_oeuvre' => implode('-', $clef_oeuvre_parent), + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE])) + return $this->_tag('a', + $this->view->_('Voir la revue %s', $parent->getRecordTitle()), + ['href' => $this->view->urlNotice($parent)]); + + return ''; + } +} diff --git a/library/ZendAfi/View/Helper/Notice/Entete.php b/library/ZendAfi/View/Helper/Notice/Entete.php index be89f3a226d523437b6ffcb1bfe294c5c97117fa..90c1edb025fc12d3e6319160e3dc20b20d1ad485 100644 --- a/library/ZendAfi/View/Helper/Notice/Entete.php +++ b/library/ZendAfi/View/Helper/Notice/Entete.php @@ -21,6 +21,8 @@ class ZendAfi_View_Helper_Notice_Entete extends ZendAfi_View_Helper_BaseHelper { + const SETTING_FIELDS = 'entete'; + const SETTING_ADD_SERIE_LINK = 'add_serie_link'; public function notice_Entete($notice, $preferences) { if(!$notice) @@ -32,26 +34,17 @@ class ZendAfi_View_Helper_Notice_Entete extends ZendAfi_View_Helper_BaseHelper { $entetes = str_split($preferences['entete']); $libelles_valeurs = $this->getValeurs($notice, $entetes); - return $this->libellesValeursToHtmlAndSerie($libelles_valeurs, $notice); - } + $html = ''; + if (!isset($preferences[static::SETTING_ADD_SERIE_LINK]) + || ($preferences[static::SETTING_ADD_SERIE_LINK] !== false)) + $html = $this->view->Notice_SeriesLink($notice); - public function addSeries($notice) { - if (!$notice->hasTome()) - return ''; + return + $html . $this->libellesValeursToHtml($libelles_valeurs); + } - $criteres = new Class_CriteresRecherche(); - $serie = $notice->getClefChapeau() . '-' . $notice->getTypeDoc(); - $label = Class_Codification::getLibelleForSerie($notice); - - return $this - ->_tag('a', - $label, - ['class' => 'serie', - 'title' => $this->view->_('Lancer une recherche pour %s', lcfirst($label)), - 'href' => $this->view->url($criteres->getNewUrlCriteresSerie($serie), null, true)]); - } public function firstAndSecond($entetes){ @@ -78,12 +71,6 @@ class ZendAfi_View_Helper_Notice_Entete extends ZendAfi_View_Helper_BaseHelper { } - public function libellesValeursToHtmlAndSerie($libelles_valeurs, $notice) { - return $this->addSeries($notice) - . $this->libellesValeursToHtml($libelles_valeurs); - } - - public function libellesValeursToHtml($libelles_valeurs) { $i=0; $html = ''; diff --git a/library/ZendAfi/View/Helper/Notice/SeriesLink.php b/library/ZendAfi/View/Helper/Notice/SeriesLink.php new file mode 100644 index 0000000000000000000000000000000000000000..b417c099eb5843e35075e44803b963d8cd273bad --- /dev/null +++ b/library/ZendAfi/View/Helper/Notice/SeriesLink.php @@ -0,0 +1,70 @@ +<?php +/** + * Copyright (c) 2012-2019, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class ZendAfi_View_Helper_Notice_SeriesLink extends ZendAfi_View_Helper_BaseHelper { + public function Notice_SeriesLink($notice) { + if (!($notice->hasSerie() || ($notice->getTypeDoc() == Class_TypeDoc::PERIODIQUE_TITLE))) + return ''; + + return + $this->_renderLinkToParentRecord($notice) + . + $this->_renderSearchLinkForSerie($notice); + } + + + protected function _renderLinkToParentRecord($notice) { + if ($parent = $notice->getLinkedSerialRecord()) + return $this->_tag('a', + $this->view->_('Voir ce numéro de %s', $parent->getRecordTitle()), + ['href' => $this->view->urlNotice($parent)]); + return ''; + } + + + protected function _renderSearchLinkForSerie($notice) { + $criteres = new Class_CriteresRecherche(); + $serie = $this->_getSerieKeyForRecord($notice); + $label = Class_Codification::getLibelleForSerie($notice); + + return $this + ->_tag('a', + $label, + ['class' => 'serie', + 'title' => $this->view->_('Lancer une recherche pour %s', lcfirst($label)), + 'href' => $this->view->url($criteres->getNewUrlCriteresSerie($serie), null, true)]); + } + + + protected function _getSerieKeyForRecord($record) { + $headkey = $record->getClefChapeau(); + $typedoc = $record->getTypeDoc(); + + if ($record->getTypeDoc() == Class_TypeDoc::PERIODIQUE_TITLE) { + $headkey = Class_Indexation::getInstance()->codeAlphaTitre($record->getTitrePrincipal()); + $typedoc = Class_TypeDoc::PERIODIQUE; + } + + return $headkey . '-' . $typedoc; + } + +} diff --git a/library/ZendAfi/View/Helper/Notice/Unimarc.php b/library/ZendAfi/View/Helper/Notice/Unimarc.php index 143266d4c2054368fc74664e52c5895f76eea4c4..b7a5b2ebe4e21f6cf35dc319f6e5cd2a3e3dc32c 100644 --- a/library/ZendAfi/View/Helper/Notice/Unimarc.php +++ b/library/ZendAfi/View/Helper/Notice/Unimarc.php @@ -56,6 +56,7 @@ class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement { 'alpha_auteur' => $this->_('Alpha auteur'), 'titres' => $this->_('Titres'), 'auteurs' => $this->_('Auteurs'), + 'tome_alpha' => $this->_('Tome'), 'matieres' => $this->_('Matières'), 'dewey' => $this->_('Dewey'), 'collection' => $this->_('Collection'), @@ -134,7 +135,8 @@ class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement { 'getActivite' => $this->_('Activité'), 'getIdOrigine' => $this->_('Id origine'), 'getIdDataProfile' => $this->_('Profil de données'), - 'getDateNouveaute' => $this->_('Date nouveauté')]; + 'getDateNouveaute' => $this->_('Date nouveauté'), + 'getIdIntBib' => $this->_('Intégration programmée')]; $html = ''; foreach($notice->getExemplaires() as $item) diff --git a/library/storm b/library/storm index 8df83e250971ac58a84f47350cc2acc5b2610341..1bc8fe711c57d051aca40c463b05e495a06a265f 160000 --- a/library/storm +++ b/library/storm @@ -1 +1 @@ -Subproject commit 8df83e250971ac58a84f47350cc2acc5b2610341 +Subproject commit 1bc8fe711c57d051aca40c463b05e495a06a265f diff --git a/tests/application/modules/opac/controllers/NoticeAjaxControllerItemsTest.php b/tests/application/modules/opac/controllers/NoticeAjaxControllerItemsTest.php index fc887f331331a09cfa2803d35751aa42b6149a16..9bdfe722b11b8c89b4e7dd05f33418ffd1592052 100644 --- a/tests/application/modules/opac/controllers/NoticeAjaxControllerItemsTest.php +++ b/tests/application/modules/opac/controllers/NoticeAjaxControllerItemsTest.php @@ -67,7 +67,7 @@ abstract class NoticeAjaxControllerItemsTestCase extends AbstractControllerTestC $this->fixture('Class_Notice', ['id' => 731325, - + 'titre_principal' => 'Ceci est un livre', 'exemplaires' => [$itemA, $itemB, $itemC]]); $sigb_exemplaire = new Class_WebService_SIGB_Exemplaire(1); @@ -428,6 +428,12 @@ class NoticeAjaxControllerItemWithEmptyBundleIdTest public function tdShouldNotContainsLinkToEmptyBundle() { $this->assertNotXPathContentContains('//td//a', 'Fait partie du lot ""'); } + + + /** @test */ + public function noTDShouldContainsLinkToRecordCeciEstUnLivre731325() { + $this->assertNotXPath('//a[contains(@href, "/recherche/viewnotice/id/731325")]'); + } } diff --git a/tests/application/modules/opac/controllers/NoticeAjaxControllerPMBTest.php b/tests/application/modules/opac/controllers/NoticeAjaxControllerPMBTest.php index 3de06bd92aecf5a2873574bc966b69728d2172c6..9e5df8e563344fadb468c9b9085ab814b437069b 100644 --- a/tests/application/modules/opac/controllers/NoticeAjaxControllerPMBTest.php +++ b/tests/application/modules/opac/controllers/NoticeAjaxControllerPMBTest.php @@ -108,36 +108,57 @@ class NoticeAjaxControllerPMBRecordTest extends AbstractControllerTestCase { - -class NoticeAjaxControllerPMBSerialArticleTest extends AbstractControllerTestCase { +abstract class NoticeAjaxControllerPMBSerialArticleTestCase extends AbstractControllerTestCase { protected $_storm_default_to_volatile = true; - public function setUp() { parent::setUp(); - $with_item_other_int_bib = $this->fixture('Class_Notice', - ['id' => '666', + $with_same_clefoeuvre = $this->fixture('Class_Notice', + ['id' => 6, + 'clef_oeuvre' => 'REVUEFRANC--', + 'type_doc' => Class_TypeDoc::DVD, 'exemplaires' => [ - $this->fixture('Class_Exemplaire', - ['id' => 666, - 'id_origine' => '60-bull', - 'id_int_bib' => 2, - 'code_barres' => '666', - 'type' => Class_Notice::TYPE_BIBLIOGRAPHIC, - 'cote' => 'THIS IS NOT GOOD']) - ] - ]); + $this->fixture('Class_Exemplaire', + ['id' => 6, + 'id_origine' => '', + 'id_int_bib' => 3, + 'code_barres' => '666', + 'type' => Class_Notice::TYPE_BIBLIOGRAPHIC, + 'cote' => '']) + ]]); + + $serial_head = $this->fixture('Class_Notice', + ['id' => 12, + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE, + 'clef_chapeau' => 'REVUE FRANC', + 'clef_oeuvre' => 'REVUEFRANC--', + 'unimarc' => file_get_contents( ROOT_PATH.'/tests/fixtures/unimarc_articles_rfp_perio.txt'), + 'exemplaires' => [ + $this->fixture('Class_Exemplaire', + ['id' => 12, + 'id_origine' => '123-1234', + 'id_int_bib' => 3, + 'code_barres' => 'ZXY35', + 'type' => Class_Notice::TYPE_BIBLIOGRAPHIC, + 'cote' => 'RFI1']) + ] + ]); + $serial = $this->fixture('Class_Notice', ['id' => '123', 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'clef_chapeau' => 'REVUE FRANC', + 'clef_oeuvre' => 'REVUEFRANC--35', + 'tome_alpha' => '35', + 'unimarc' => file_get_contents( ROOT_PATH.'/tests/fixtures/unimarc_articles_rfp_perio.txt'), 'exemplaires' => [ $this->fixture('Class_Exemplaire', ['id' => 1, - 'id_origine' => '60-bull', + 'id_origine' => '35-bull', 'id_int_bib' => 3, - 'code_barres' => 'ZXY60', + 'code_barres' => 'ZXY35', 'type' => Class_Notice::TYPE_BIBLIOGRAPHIC, 'cote' => 'RFI1']) ] @@ -146,8 +167,9 @@ class NoticeAjaxControllerPMBSerialArticleTest extends AbstractControllerTestCas $article = $this->fixture('Class_Notice', ['id' => '234', - 'clef_chapeau' => 'REVUE FRANC', - 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'clef_chapeau' => 'REVUE FRANC 35', + 'tome_alpha' => '35', + 'type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE, 'unimarc' => file_get_contents(ROOT_PATH . '/tests/fixtures/unimarc_article_rfp.txt'), 'exemplaires' => [ $this->fixture('Class_Exemplaire', @@ -157,12 +179,42 @@ class NoticeAjaxControllerPMBSerialArticleTest extends AbstractControllerTestCas 'code_barres' => '1-234', 'type' => Class_Notice::TYPE_SERIAL_ARTICLE, 'zone995' => serialize([ ['code' => '0', - 'valeur' => '60-bull'] ])]) + 'valeur' => '35-bull'] ])]) ] ]); + + + $another_article = $this->fixture('Class_Notice', + ['id' => '235', + 'clef_chapeau' => 'REVUE FRANC 35', + 'type_doc' => Class_TypeDoc::PERIODIQUE_ARTICLE, + 'unimarc' => file_get_contents(ROOT_PATH . '/tests/fixtures/unimarc_article_rfp2.txt'), + 'exemplaires' => [ + $this->fixture('Class_Exemplaire', + ['id' => 3, + 'id_origine' => '1788', + 'id_int_bib' => 3, + 'code_barres' => '1-234', + 'type' => Class_Notice::TYPE_SERIAL_ARTICLE, + 'zone995' => serialize([ ['code' => '0', + 'valeur' => '35-bull'] ])]) + ] + ]); + + + $not_an_article_bad_record = $this->fixture('Class_Notice', + ['id' => '236', + 'clef_chapeau' => 'REVUE FRANC 35', + 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'unimarc' => file_get_contents(ROOT_PATH . '/tests/fixtures/unimarc_article_rfp2.txt'), + 'exemplaires' => []]); } +} + + +class NoticeAjaxControllerPMBSerialArticleTest extends NoticeAjaxControllerPMBSerialArticleTestCase { /** @test */ public function itemsTableShouldContainsCoteRFI1() { $this->dispatch('/opac/noticeajax/exemplaires/id_notice/234', true); @@ -172,12 +224,129 @@ class NoticeAjaxControllerPMBSerialArticleTest extends AbstractControllerTestCas } + /** @test */ + public function itemsTableShouldBeEmptyWhenRecordIsNotFound() { + Class_Exemplaire::find(1)->delete(); + $this->dispatch('/opac/noticeajax/exemplaires/id_notice/234', true); + $this->assertXPathContentContains('//p', + utf8_encode('Aucun exemplaire trouvé')); + } + + /** @test */ public function recordShouldContainsLinkForSerie() { + Class_Notice::find(234) + ->setTypeDoc(Class_TypeDoc::PERIODIQUE)->save(); + $this->dispatch('/opac/recherche/viewnotice/id/234', true); - $this->assertXPathContentContains('//a[contains(@href,"/serie/REVUE+FRANC-2/")]', + $this->assertXPathContentContains('//a[contains(@href,"/serie/REVUE+FRANC+35-2/")]', 'Voir tous les articles de ce numéro de Revue française de pédagogie', $this->_response->getBody()); } + + + /** @test */ + public function usingTypeDocPeriodiqueArticleRecordShouldContainsLinkForSerieWithTypeDocPerArt() { + $this->dispatch('/opac/recherche/viewnotice/id/234', true); + + $this->assertXPathContentContains('//a[contains(@href,"/serie/REVUE+FRANC+35-per_art/")]', + 'Voir tous les articles de ce numéro de Revue française de pédagogie'); + } + + + /** @test */ + public function detailsContentForArticleShouldContainsLinkToParentRecord123() { + $this->dispatch('/opac/noticeajax/detail/id/234', true); + $this->assertXPathContentContains('//a[contains(@href,"/viewnotice/id/123")]', + utf8_encode('Voir ce numéro de Revue française de pédagogie')); + } + + + /** @test */ + public function usingTypeDocPeriodiqueTitleRecordShouldContainsLinkForSerieWithTypeDocTwo() { + $this->fixture('Class_Notice', + ['id' => '233', + 'clef_chapeau' => 'REVUE FRANC', + 'type_doc' => Class_TypeDoc::PERIODIQUE_TITLE, + 'titre_principal' => 'Matricule des anges', + 'exemplaires' => [ + $this->fixture('Class_Exemplaire', + ['id' => 4, + 'id_origine' => '1787', + 'id_int_bib' => 3, + 'code_barres' => '1-234', + 'type' => Class_Notice::TYPE_BIBLIOGRAPHIC, + 'zone995' => serialize([ ['code' => '0', + 'valeur' => '35-bull'] ])]) + ] + ]); + $this->dispatch('/opac/recherche/viewnotice/id/233', true); + + $this->assertXPathContentContains('//a[contains(@href,"/serie/MATRICULE+DES+ANGES-2/")]', + 'Voir tous les numéros de Matricule des anges'); + } +} + + + + +class NoticeAjaxControllerPMBSerialDetailsActionTest extends NoticeAjaxControllerPMBSerialArticleTestCase { + public function setUp() { + parent::setUp(); + $this->fixture('Class_CodifAuteur', + ['id' => 2, + 'code_alpha' => 'LEBLANCxSERGE']); + $this->dispatch('/opac/noticeajax/detail/id/123', true); + } + + + /** @test */ + public function firstLIShouldContainsH3WithGARNIERPascale() { + $this->assertXPathContentContains('//ul/li/h3/a[contains(@href,"/recherche/viewnotice/id/234")]', + 'GARNIER Pascale'); + } + + + /** @test */ + public function firstLIShouldSummaryClassePasserelleJardinMaternel() { + $this->assertXPathContentContains('//ul/li[1]/dl/dd', + 'classe passerelle, jardin maternel'); + } + + + /** @test */ + public function secondLiShouldContainsAuthorSergeLeblanc() { + $this->assertXPathContentContains('//ul/li[2]/dl/dd', + 'Serge Leblanc'); + } + + + /** @test */ + public function onlyTwoArticlesLiCountShouldBeTwo() { + $this->assertXPathCount('//ul/li', 2); + } + + + /** @test */ + public function detailsContentForSerialShouldContainsLinkToParentRecord12() { + $this->assertXPathContentContains('//a[contains(@href,"/viewnotice/id/12")]', + utf8_encode('Voir la revue Revue française de pédagogie')); + } +} + + + + +class NoticeAjaxControllerPMBTitleDetailsActionTest extends NoticeAjaxControllerPMBSerialArticleTestCase { + public function setUp() { + parent::setUp(); + $this->dispatch('/opac/noticeajax/detail/id/12', true); + } + + + /** @test */ + public function htmlShouldNotContainsLinkToViewNotice() { + $this->assertNotXPath('//a[contains(@href, "/viewnotice")]'); + } } \ No newline at end of file diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php index 982baf0bf752e5f0206b43b35f9a3b7809cbb6ce..9fd08850ce8892929fb168b855fea28bb3472e9c 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php @@ -376,7 +376,9 @@ class RechercheControllerViewNoticeWithPreferencesTest extends RechercheControll /** @test */ public function enteteShouldDisplayDocumentDeLaMemeSerie() { - $this->assertXPathContentContains('//div//a[contains(@href,"Gallimard+serie")]', 'Voir tous les tomes de Gallimard serie',$this->_response->getBody()); + $this->assertXPathContentContains('//div//a[contains(@href,"Gallimard+serie")]', + 'Voir tous les tomes de Gallimard serie', + $this->_response->getBody()); } diff --git a/tests/fixtures/unimarc_article_rfp2.txt b/tests/fixtures/unimarc_article_rfp2.txt new file mode 100644 index 0000000000000000000000000000000000000000..1d92102059f142ada518d8d8f850110503329719 --- /dev/null +++ b/tests/fixtures/unimarc_article_rfp2.txt @@ -0,0 +1 @@ +00807naa2 22001931i 450 00100060000010000350000600900150004120000670005610100080012321500150013130000290014633001600017531900280033570000330036321000090039689600220040546100630042746301230049021352 a20190509u u u0frey50 a2018-08-011 aVEYRUNES Philippe. La Classe : hier, aujourd’hui et demain ?0 afre ap. 123-124 aTexte intégral en ligne a Notes critiques Référence(s) : VEYRUNES Philippe. La Classe : hier, aujourd’hui et demain ? Toulouse : Presses universitaires du Midi, 2017, 248 p. aAucun droit spécifique 1aLeblancbSerge40709id:4608 d2018 a./images/vide.png 017165tRevue française de pédagogie9id:171659lnk:perio d2018-08-01eJanvier-Février-Mars 2017vn° 198tRegards croisés sur le baccalauréat professionnel 9id:359lnk:bull \ No newline at end of file diff --git a/tests/fixtures/unimarc_articles_rfp_perio.txt b/tests/fixtures/unimarc_articles_rfp_perio.txt new file mode 100644 index 0000000000000000000000000000000000000000..ced8dc69f9dd493982b4bbed7bbf3d703c61c4ba --- /dev/null +++ b/tests/fixtures/unimarc_articles_rfp_perio.txt @@ -0,0 +1 @@ +10795nas1 22006371i 450 00100060000010000350000620000350004131900280007689600220010446201230012646200900024946201200033946401760045946401990063546402640083446401950109846401980129346402000149146402010169146402110189246403250210346402540242846403230268246402010300546402780320646402130348446403150369746401410401246401620415346401600431546401860447546402090466146402280487046402240509846402910532246402100561346401970582346402450602046401800626546402580644546402320670346401710693546402060710646402050731246402350751746401860775246402380793846401930817646402890836946401960865846402650885446402820911946402410940146402530964246402620989517165 a20181208u u u0frey50 1 aRevue française de pédagogie aAucun droit spécifique a./images/vide.png d2018-08-01eJanvier-Février-Mars 2017vn° 198tRegards croisés sur le baccalauréat professionnel 9id:359lnk:bull d2018-11-01eAvril-Mai-Juin 2017vn° 199tL'histoire des disciplines9id:369lnk:bull d2019-03-01eJuillet-Août-Septembre 2017vn° 200tRecherche, politique et pratiques en éducation9id:609lnk:bull 021119tFaire et agir sur l'élèvetRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:211199page:61-74 p.9lnk:art 021120tRegards croisés sur le baccalauréat professionneltRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:211209page:5-10 p.9lnk:art 021121tLa gouvernance par les résultats est-elle un mode de régulation de l'école légitime aux yeux des enseignants ?tRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:211219page:93-108 p.9lnk:art 021126tCHOPIN Marie-Pierre. Pédagogues de la dansetRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:211269page:109-111 p.9lnk:art 021142tLes mathématiques au baccalauréat professionneltRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:211429page:p. 23-349lnk:art 021344tLe baccalauréat professionnel de 1985 à nos jourstRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213449page:p. 11-229lnk:art 021345tElèves et enseignant·e·s de lycée professionnel.tRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213459page:p. 35-489lnk:art 021346tLes bacheliers professionnels face à Admission Post-Bac (APB)tRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213469page:p. 49-609lnk:art 021347tL’influence d’une formation au tutorat sur les performances en résolution de problèmes et sur la motivation autodéterminée d’élèves de fin d’enseignement primairetRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213479page:p. 75-929lnk:art 021348tDUTERCQ Yves & MAROY Christian (dir.). Professionnalisme enseignant et politiques de responsabilisationtRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213489page:p. 111-1159lnk:art 021349tGARNIER Pascale, BROUGÈRE Gilles, RAYNA Sylvie & RUPIN Pablo. À 2 ans, vivre dans un collectif d’enfants. Crèche, école maternelle, classe passerelle, jardin materneltRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213499page:p. 115-1199lnk:art 021350tLHOSTE Yann. Épistémologie et didactique des SVTtRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213509page:p. 119-1219lnk:art 021351tTHÉMINES Jean-François & DOUSSOT Sylvain. Acteurs et action. Perspectives en didactiques de l’histoire et de la géographietRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213519page:p. 121-1229lnk:art 021352tVEYRUNES Philippe. La Classe : hier, aujourd’hui et demain ?tRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213529page:p. 123-1249lnk:art 021353tZAID Abdelkarim. Élaborer, transmettre et construire des contenus. Perspective didactique des dispositifs d’éducation et de formation en sciences et technologietRegards croisés sur le baccalauréat professionnel d2018-08-01eJanvier-Février-Mars 2017vn° 1989id:213539page:p. 124-1269lnk:art 021123tL'histoire des disciplinestL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:211239page:5-22 p.9lnk:art 021124tEcrire des manuels pour « une » discipline ?tL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:211249page:59-80 p.9lnk:art 021125tUne ségrégation peut en cacher une autretL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:211259page:117-138 p.9lnk:art 021143tL'enseignement des langues étrangères sous la Troisième RépubliquetL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:211439page:p. 23-379lnk:art 021333tLa Société des professeurs d’histoire et de géographie (SPHG) et ses membres (1910-1939)tL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213339page:p. 39-579lnk:art 021334tLes professeurs d’ENNA et leur rôle dans la structuration de la discipline « français » entre 1945 et 1960tL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213349page:p. 81-949lnk:art 021335tDes disciplines en recomposition ? Heurs et malheurs d’une réforme du curriculum au collège (1988-1989)tL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213359page:p. 95-1169lnk:art 021337tALBERO Brigitte, YURÉN Teresa & GUÉRIN Jérôme (dir.). Modèles de formation et architecture dans l’enseignement supérieur. Culture numérique et développement humaintL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213379page:p. 139-1419lnk:art 021338tDEVIGNE Matthieu. L’École des années noires. Une histoire du primaire en temps de guerretL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213389page:p. 141-1439lnk:art 021339tLESSARD Claude & CARPENTIER Anylène. Politiques éducatives. La mise en Å“uvretL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213399page:p. 143-1459lnk:art 021340tMONNIER Anne. Le temps des dissertations. Chronique de l’accès des jeunes filles aux études supérieures (Genève xixe-xxe)tL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213409page:p. 145-1479lnk:art 021341tPAYET Jean-Paul. École et familles. Une approche sociologiquetL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213419page:p. 147-1489lnk:art 021342tPIERROT Alain, CARVALHO Isabel & MEDAETS Chantal (dir.). Domination et apprentissage. Anthropologie des formes de la transmission culturelletL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213429page:p. 148-1539lnk:art 021343tVEILLARD Laurent. La formation professionnelle initiale. Apprendre dans l’alternance entre différents contextestL'histoire des disciplinesd2018-11-01eAvril-Mai-Juin 2017vn° 1999id:213439page:p. 153-1549lnk:art 021319tTransmettre et légitimertRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213199page:p. 11-219lnk:art 021320tLa refondation de l’éducation prioritaire et la recherchetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213209page:p. 23-329lnk:art 021321tDes possibilités de sociologie en territoire d’expertisetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213219page:p. 33-419lnk:art 021322tRéconcilier l’action publique, la recherche et l’engagement professionnel et citoyentRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213229page:p. 43-509lnk:art 021323tPour des collectifs militants apprenantstRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213239page:p. 51-599lnk:art 021324tDe l’usage des outils issus de la recherche pour accompagner les établissements scolairestRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213249page:p. 61-679lnk:art 021325tObjets et pratiques de l’évaluation scolairetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213259page:p. 69-799lnk:art 021326tUne recherche sur la scolarité des enfants du voyage ou quelques conditions de transformations de pratiques institutionnelles par la recherchetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213269page:p. 81-879lnk:art 021327tArticuler recherche et développement pédagogiquetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213279page:p. 89-979lnk:art 021328tLes effets de l’intégration sociale étudiante sur la réussite universitaire en 1er cycle sont-ils significatifs ?tRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213289page:p. 99-1179lnk:art 021329tL’impact conjoint du genre de l’étudiant et du diplôme de ses parents pour comprendre le processus de persévérance académiquetRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213299page:p. 119-1339lnk:art 021330tBOURDON Étienne. La forge gauloise de la nation. Ernest Lavisse et la fabrique des ancêtrestRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213309page:p. 135-1369lnk:art 021331tLIGNIER Wilfried & PAGIS Julie. L’enfance de l’ordre. Comment les enfants perçoivent le monde socialtRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213319page:p. 136-1399lnk:art 021332tMILLET Mathias & CROIZET Jean-Claude. L’école des incapables ? La maternelle, un apprentissage de la dominationtRecherche, politique et pratiques en éducationd2019-03-01eJuillet-Août-Septembre 2017vn° 2009id:213329page:p. 139-1419lnk:art \ No newline at end of file diff --git a/tests/library/Class/Cosmogramme/Integration/PhaseNoticeTest.php b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeTest.php index 2808f39cb81938108f54d2e314863f6688f92773..05469e0bd8818b3ce3df2a0cbcf76f16dd86d1c9 100644 --- a/tests/library/Class/Cosmogramme/Integration/PhaseNoticeTest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeTest.php @@ -44,11 +44,18 @@ abstract class PhaseNoticeImportTestCase extends PhaseNoticeTestCase { Class_CodifThesaurus::addFacetForSigb('Public', '993$a', Class_IntBib::COM_NANOOK); + $this->fixture('Class_Exemplaire', + ['type' => Class_Notice::TYPE_SERIAL_ARTICLE, + 'id' => 889038, + 'id_int_bib' => 2]); + $this->fixture('Class_Exemplaire', ['id' => 889039, 'id_int_bib' => 2]); $this->fixture('Class_Exemplaire', - ['type' => Class_Notice::TYPE_AUTHORITY, 'id' => 889040, 'id_int_bib' => 2]); + ['type' => Class_Notice::TYPE_AUTHORITY, + 'id' => 889040, + 'id_int_bib' => 2]); $oscar = $this->fixture('Class_CodifAuteur', ['id' => 42, @@ -131,6 +138,12 @@ class PhaseNoticeImportFullTest extends PhaseNoticeImportTestCase { } + /** @test */ + public function serialArticleItemShouldHaveBeenDeleted() { + $this->assertNull(Class_Exemplaire::find(889038)); + } + + /** @test */ public function previousAuthorityItemShouldNotBeDeleted() { $this->assertNotNull(Class_Exemplaire::find(889040)); @@ -138,8 +151,8 @@ class PhaseNoticeImportFullTest extends PhaseNoticeImportTestCase { /** @test */ - public function logShouldContainsDeletedOneItemMessage() { - $this->assertLogContains('1 exemplaire(s) supprimé(s)'); + public function logShouldContainsDeletedTwoItemsMessage() { + $this->assertLogContains('2 exemplaire(s) supprimé(s)'); } diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php index e1f535e80714f9367916a84737a5a3fc087b42ef..cca6cdaaa46d9c91491816bf3ec3a58f18d15b0c 100644 --- a/tests/library/Class/MoteurRechercheTest.php +++ b/tests/library/Class/MoteurRechercheTest.php @@ -295,6 +295,13 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { 'nb_mots'=> null, 'req_liste' => $this->listSqlWith("(isbn='2-7427-6157-8' or isbn='978-2-7427-6157-9')")], + [['expressionRecherche' => 'pomme', + 'type_doc' => 'per_art,per_title', + 'tri' => 'alpha_titre'], + 'nb_mots'=> 1, + 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(POMME POMMES POM)' IN BOOLEAN MODE) and type_doc in('per_art','per_title')", + 'alpha_titre')], + [['expressionRecherche' => '9782742761579', 'selection_bib'=> 1], 'nb_mots'=> null, @@ -309,6 +316,12 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and MATCH(facettes) AGAINST('+YMED1 +M52291 +A15067 +(YTUN YTAP) +(S1 S12 S9)' IN BOOLEAN MODE)", "(MATCH(titres) AGAINST(' LOGO') * 1.5) + (MATCH(auteurs) AGAINST(' LOGO')) desc")], + [['expressionRecherche' => 'logo', + 'multifacets' => 'Tper_title'], + 'nb_mots'=> 1, + 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and MATCH(facettes) AGAINST('+(Tper_title)' IN BOOLEAN MODE)", + "(MATCH(titres) AGAINST(' LOGO') * 1.5) + (MATCH(auteurs) AGAINST(' LOGO')) desc")], + [['expressionRecherche' => 'security', 'annexe' => 'MED(")', 'facettes' => '; select * \b zork', @@ -414,6 +427,12 @@ class MoteurRechercheSerieTest extends MoteurRechercheTestCase { 'serie'=> 'GEO', 'tri' => 'date_creation desc'], 'req_liste' => $this->listSqlWith('clef_chapeau="GEO" ', + 'cast(tome_alpha as SIGNED INTEGER) desc')], + + [['expressionRecherche' => 'Geo', + 'serie'=> 'GEO-per_art', + 'tri' => 'date_creation desc'], + 'req_liste' => $this->listSqlWith('clef_chapeau="GEO" and type_doc="per_art"', 'cast(tome_alpha as SIGNED INTEGER) desc')]]; } diff --git a/tests/library/Class/TypeDocTest.php b/tests/library/Class/TypeDocTest.php index 40365da09e3c3a607695e1cf95df0d8c925d5962..d275f5c618bb7928106100cf86bd319c0d89da15 100644 --- a/tests/library/Class/TypeDocTest.php +++ b/tests/library/Class/TypeDocTest.php @@ -79,7 +79,7 @@ class TypeDocTest extends ModelTestCase { ->setLabel('journaux') ->save(); - $this->assertContains("0:non identifié\r\n1:livres\r\n2:journaux\r\n3:Disques", + $this->assertContains("0:non identifié\r\n1:livres\r\n2:journaux\r\n", $this->cosmo_types->getListe(), $this->cosmo_types->getListe()); } @@ -97,8 +97,8 @@ class TypeDocTest extends ModelTestCase { public function deleteLivresShouldUpdateTypesDocsVar() { array_at(1, $this->types_docs)->delete(); - $this->assertContains("0:non identifié\r\n2:périodiques\r\n3:Disques", - $this->cosmo_types->getListe()); + $this->assertNotContains("1:livres", + $this->cosmo_types->getListe()); } @@ -107,8 +107,7 @@ class TypeDocTest extends ModelTestCase { $array = Class_TypeDoc::toIdLabelArray(Class_TypeDoc::getLoader()->findAll()); $this->assertContains(implode(' ', [0 => 'non identifié', 1 => 'livres', - 2 => 'périodiques', - 3 => 'Disques']), + 2 => 'périodiques']), implode(' ', $array)); }