From a2b3fd753ef3b0b1ef58b51e8c59945f7d30ca3e Mon Sep 17 00:00:00 2001 From: pbarroca <pbarroca@afi-sa.fr> Date: Mon, 13 Feb 2017 17:49:34 +0100 Subject: [PATCH] dev #50215 : work in progress --- VERSIONS_WIP/50215 | 1 + .../php/classes/classe_notice_integration.php | 4 +++ .../Integration/Record/Bibliondemand.php | 25 +++++++++++++++++++ library/Class/IntProfilDonnees.php | 7 ++++-- library/Class/ProfileSerializer.php | 3 ++- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 VERSIONS_WIP/50215 create mode 100644 library/Class/Cosmogramme/Integration/Record/Bibliondemand.php diff --git a/VERSIONS_WIP/50215 b/VERSIONS_WIP/50215 new file mode 100644 index 00000000000..2b313a9c4cf --- /dev/null +++ b/VERSIONS_WIP/50215 @@ -0,0 +1 @@ + - ticket #50215 : Ressource Numériques : Moissonnage Bibliondemand \ 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 063ba09d37e..183fc572f14 100644 --- a/cosmogramme/php/classes/classe_notice_integration.php +++ b/cosmogramme/php/classes/classe_notice_integration.php @@ -131,6 +131,10 @@ class notice_integration { $this->analyseur = new Class_Cosmogramme_Integration_Record_DublinCore(); break; + case Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND: + $this->analyseur = new Class_Cosmogramme_Integration_Record_Bibliondemand(); + break; + default: require_once("classe_notice_ascii.php"); $this->analyseur = new notice_ascii(); diff --git a/library/Class/Cosmogramme/Integration/Record/Bibliondemand.php b/library/Class/Cosmogramme/Integration/Record/Bibliondemand.php new file mode 100644 index 00000000000..b848e068abb --- /dev/null +++ b/library/Class/Cosmogramme/Integration/Record/Bibliondemand.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright (c) 2012-2017, 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 Class_Cosmogramme_Integration_Record_Bibliondemand extends Class_Cosmogramme_Integration_Record_DublinCore { + +} diff --git a/library/Class/IntProfilDonnees.php b/library/Class/IntProfilDonnees.php index 7f38359c8c0..e23d0a79c4d 100644 --- a/library/Class/IntProfilDonnees.php +++ b/library/Class/IntProfilDonnees.php @@ -73,7 +73,8 @@ class IntProfilDonneesLoader extends Storm_Model_Loader { Class_IntProfilDonnees::FORMAT_MARC21 => $this->_('MARC 21'), Class_IntProfilDonnees::FORMAT_UNIMARC_XML => $this->_('Unimarc XML'), Class_IntProfilDonnees::FORMAT_AVENIO => $this->_('Avenio'), - Class_IntProfilDonnees::FORMAT_DUBLIN_CORE => $this->_('Dublin Core')]; + Class_IntProfilDonnees::FORMAT_DUBLIN_CORE => $this->_('Dublin Core'), + Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND => $this->_('Dublin Core Bibliondemand')]; } @@ -114,7 +115,8 @@ class IntProfilDonneesLoader extends Storm_Model_Loader { Class_IntProfilDonnees::FORMAT_MARC21 => '', Class_IntProfilDonnees::FORMAT_UNIMARC_XML => '', Class_IntProfilDonnees::FORMAT_AVENIO => '', - Class_IntProfilDonnees::FORMAT_DUBLIN_CORE => '']); + Class_IntProfilDonnees::FORMAT_DUBLIN_CORE => '', + Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND => '']); } @@ -241,6 +243,7 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract { FORMAT_AVENIO = 8, FORMAT_DUBLIN_CORE = 9, FORMAT_CG68_ARCHIVES = 10, + FORMAT_BIBLIONDEMAND = 11, SERIAL_FORMAT_NONE = 0, SERIAL_FORMAT_PERGAME = 1, SERIAL_FORMAT_ALOES_INDEXPRESS = 2, diff --git a/library/Class/ProfileSerializer.php b/library/Class/ProfileSerializer.php index 2a5f9c095f3..5a5263a5009 100644 --- a/library/Class/ProfileSerializer.php +++ b/library/Class/ProfileSerializer.php @@ -45,7 +45,8 @@ class Class_ProfileSerializer { return new Class_ProfileSerializer_UnimarcRecord(); if($this->_datas[Class_IntProfilDonnees::PROFILE_FILE_TYPE] == Class_IntProfilDonnees::FT_RECORDS - && $this->_datas[Class_IntProfilDonnees::PROFILE_FILE_FORMAT] == Class_IntProfilDonnees::FORMAT_DUBLIN_CORE) + && in_array($this->_datas[Class_IntProfilDonnees::PROFILE_FILE_FORMAT], [Class_IntProfilDonnees::FORMAT_DUBLIN_CORE, + Class_IntProfilDonnees::FORMAT_BIBLIONDEMAND])) return new Class_ProfileSerializer_DublinCoreRecords(); if($this->_datas[Class_IntProfilDonnees::PROFILE_FILE_TYPE] == Class_IntProfilDonnees::FT_RECORDS -- GitLab