Skip to content
Snippets Groups Projects
Commit 522c2930 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #73934 : fix RT

parent 9eca7741
Branches
Tags
3 merge requests!2660Master,!2619Dev#73934 explo suivi bibliondemand,!2610dev #73934 : explo bibliondemand , cosmogrammme can handle bibliondemand xml file
Pipeline #3960 passed with stage
in 35 minutes and 36 seconds
......@@ -31,7 +31,7 @@ abstract class Class_Cosmogramme_FileParser {
Class_IntProfilDonnees::FORMAT_TABBED_ASCII => 'Ascii_Tab',
Class_IntProfilDonnees::FORMAT_SEMI_COLON_ASCII => 'Ascii_Comma',
Class_IntProfilDonnees::FORMAT_PIPED_ASCII => 'Ascii_Pipe',
Class_IntProfilDonnees::FORMAT_XML => 'Xml',
Class_IntProfilDonnees::FORMAT_XML => 'XmlPatrons',
Class_IntProfilDonnees::FORMAT_CSV => 'Csv',
Class_IntProfilDonnees::FORMAT_MARC21 => 'Marc',
Class_IntProfilDonnees::FORMAT_AVENIO => 'Ascii_Tab',
......@@ -58,7 +58,7 @@ abstract class Class_Cosmogramme_FileParser {
$this->_profil = $profil;
$fileSystem = $this->getFileSystem();
;
if (false === ($this->_file_handle = @$fileSystem->fopen($file, 'rb')))
return;
......@@ -200,17 +200,6 @@ class Class_Cosmogramme_FileParser_Xml extends Class_Cosmogramme_FileParser {
protected $_xml_separator;
public function __construct($file, $position, $profil) {
parent::__construct($file, $position, $profil);
$data = $this->_profil->getAttributs();
$attributs = unserialize($data);
if (array_key_exists(5, $attributs)
&& array_key_exists('xml_balise_abonne', $attributs[5]))
$this->_xml_separator = $attributs[5]['xml_balise_abonne'];
}
public function isValid() {
return parent::isValid() && $this->_xml_separator;
......@@ -256,14 +245,19 @@ class Class_Cosmogramme_FileParser_Xml extends Class_Cosmogramme_FileParser {
}
class Class_Cosmogramme_FileParser_OaiDC extends Class_Cosmogramme_FileParser_Xml {
class Class_Cosmogramme_FileParser_XmlPatrons extends Class_Cosmogramme_FileParser_Xml {
public function __construct($file, $position, $profil) {
parent::__construct($file, $position, $profil);
$this->_xml_separator = 'record';
$this->_xml_separator = $profil->getXmlPatronField();
}
}
class Class_Cosmogramme_FileParser_OaiDC extends Class_Cosmogramme_FileParser_Xml {
protected $_xml_separator = 'record';
}
class Class_Cosmogramme_FileParser_Csv extends Class_Cosmogramme_FileParser_Ascii {
protected $_separator = ',';
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment