Skip to content

Commit

Permalink
MARC record field 530 value updated.
Browse files Browse the repository at this point in the history
Field 530 has a fixed value that depends on the record format
(printed/electronic). #25
  • Loading branch information
petkivim committed Sep 24, 2016
1 parent 5dac95e commit 458800f
Showing 1 changed file with 6 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,40 +386,21 @@ private static function addField530($record, $publication, $format) {
if (!self::isElectronical($format)) {
$json = json_decode($publication->publication_identifier_electronical);
if (!empty($json)) {
foreach ($json as $identifier => $publicationType) {
$datafield = new DataField('530', ' ', ' ');
$a = JText::_('COM_ISBNREGISTRY_MARC_530_A_PRINT') . ' ' . $publication->publication_identifier_type . ' ';
$a .= $identifier;
$fileFormat = self::getFileFormat($publicationType);
if (!empty($fileFormat)) {
$a .= ' (' . $fileFormat . ')';
}
$datafield->addSubfield(new Subfield('a', $a));
$datafield->addSubfield(new Subfield('9', 'FENNI<KEEP>'));
$record->addDataField($datafield);
}
$datafield = new DataField('530', ' ', ' ');
$datafield->addSubfield(new Subfield('a', JText::_('COM_ISBNREGISTRY_MARC_530_A_PRINT') . '.'));
$record->addDataField($datafield);
}
} else {
$json = json_decode($publication->publication_identifier_print);
if (!empty($json)) {
foreach ($json as $identifier => $publicationType) {
$datafield = new DataField('530', ' ', ' ');
$a = JText::_('COM_ISBNREGISTRY_MARC_530_A_ELECTRONICAL') . ' ' . $publication->publication_identifier_type . ' ';
$a .= $identifier;
$type = self::getType($publicationType);
if (!empty($type)) {
$a .= ' (' . $type . ')';
}
$datafield->addSubfield(new Subfield('a', $a));
$datafield->addSubfield(new Subfield('9', 'FENNI<KEEP>'));
$record->addDataField($datafield);
}
$datafield = new DataField('530', ' ', ' ');
$datafield->addSubfield(new Subfield('a', JText::_('COM_ISBNREGISTRY_MARC_530_A_ELECTRONICAL') . '.'));
$record->addDataField($datafield);
}
}
}
}


private static function addField594($record, $selection) {
$datafield = new DataField('594', ' ', ' ');
switch ($selection) {
Expand Down

0 comments on commit 458800f

Please sign in to comment.