Skip to content
Snippets Groups Projects
Commit 88c7ae61 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- use catalog specific record format (based on...

- use catalog specific record format (based on https://wiki.k10plus.de/pages/viewpage.action?pageId=132874251)
parent c2d1b378
No related branches found
No related tags found
No related merge requests found
...@@ -81,23 +81,23 @@ package SLUB::LZA::SIPBuilderBagIt; ...@@ -81,23 +81,23 @@ package SLUB::LZA::SIPBuilderBagIt;
my $swb_url = 'https://sru.bsz-bw.de/swb'; my $swb_url = 'https://sru.bsz-bw.de/swb';
my $searchkey_swb = 'pica.swn'; my $searchkey_swb = 'pica.swn';
my $searchkey_k10p = 'pica.ppn'; my $searchkey_k10p = 'pica.ppn';
my $recordschema = 'marcxmlvbos'; my $recordschema_swb = 'marcxmlvbos';
my $recordschema_k10p = 'marcxmlk10os';
our $with_debug = 0; our $with_debug = 0;
sub prepare_mods_section_with_ppn($){ sub prepare_mods_section_with_ppn($){
if(! defined $_[0]){ croak "ppn not defined!"; } if(! defined $_[0]){ croak "ppn not defined!"; }
my $ppn = shift; my $ppn = shift;
my $mods; my $mods;
eval { eval {
$mods = SLUB::LZA::SIPBuilderBagIt::get_mods_from($swb_url, $ppn, $searchkey_swb, $recordschema); $mods = SLUB::LZA::SIPBuilderBagIt::get_mods_from($swb_url, $ppn, $searchkey_swb, $recordschema_swb);
}; };
if ($@) { if ($@) {
# Fallback to K10plus PPN # Fallback to K10plus PPN
if ($@ =~ m#ERROR: Did not get any <recordData/> for PPN#) { if ($@ =~ m#ERROR: Did not get any <recordData/> for PPN#) {
print_scalar_data("", "WARNING: '$ppn' not a SWB PPN, fallback to K10plus", "", "yellow"); print_scalar_data("", "WARNING: '$ppn' not a SWB PPN, fallback to K10plus", "", "yellow");
$mods = SLUB::LZA::SIPBuilderBagIt::get_mods_from($swb_url, $ppn, $searchkey_k10p, $recordschema); $mods = SLUB::LZA::SIPBuilderBagIt::get_mods_from($swb_url, $ppn, $searchkey_k10p, $recordschema_k10p);
} }
else { else {
die "$@"; # throw exception again die "$@"; # throw exception again
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment