if($zeile!~m#^.*:.*$#){# : must be minimum once present
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("",'ERROR: wrong construct in --add_key_value="'.$zeile.'", expected --add_key_value="key:value", regexp to match is (^[^:]+:[^:]+$)',"","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data('ERROR: wrong construct in --add_key_value="'.$zeile.'", expected --add_key_value="key:value", regexp to match is (^[^:]+:[^:]+$)',"","red");
exit1;
}
utf8::decode($zeile);
...
...
@@ -228,18 +228,18 @@ if (@addKeyValue) {
$keyeq'SLUBArchiv-hasConservationReason'||
$keyeq'SLUBArchiv-archivalValueDescription'||
$keyeq'SLUBArchiv-rightsVersion'){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: duplicate key $key present at --add_key_value. Notice: $key is reserved by SLUB Dresden.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: duplicate key $key present at --add_key_value. Notice: $key is reserved by SLUB Dresden.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
exit1;
}
if($keyeq'Bag-Count'){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: $key present at --add_key_value. This key is not available due to SLUB spesification.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: $key present at --add_key_value. This key is not available due to SLUB spesification.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
exit1;
}
if($keyeq'Bag-Group-Identifier'){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: $key present at --add_key_value. This key is not available due to SLUB spesification.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: $key present at --add_key_value. This key is not available due to SLUB spesification.","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
exit1;
}
push@addBagInfo,{$key=>$value};
...
...
@@ -249,18 +249,18 @@ if (@addKeyValue) {
# rightsFilePath
if(!defined$rightsFilePath||$rightsFilePatheq""){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: you need to specify --rights_xml file, which needs to be added","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: you need to specify --rights_xml file, which needs to be added","","red");
exit1;
}
if(!-f$rightsFilePath){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: you need to specify --rights_xml file, status: is not a file","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: you need to specify --rights_xml file, status: is not a file","","red");
exit1;
}
# addMetaFile
if(@addMetaFile){
foreachmy$file(@addMetaFile){
if(!-f$file){
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("","ERROR: file $file at --add_meta_file, is not a file or could not be found","","red");
SLUB::LZA::SIPBuilderBagIt::print_scalar_data("ERROR: file $file at --add_meta_file, is not a file or could not be found","","red");
@@ -116,7 +116,7 @@ sub get_marc21_from_catalogue($ppn){
if($@){# error
say"$@"unless(!$with_debug);
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");
$use_fallback=1;
}
else{
...
...
@@ -131,7 +131,7 @@ sub get_marc21_from_catalogue($ppn){
if($@){# error
say"$@"unless(!$with_debug);
if($@=~m#ERROR: Did not get any <recordData/> for PPN#){
print_scalar_data("","ERROR: '$ppn' also not a K10plus PPN","","red");
print_scalar_data("ERROR: '$ppn' also not a K10plus PPN","","red");
exit1;
}
else{
...
...
@@ -140,7 +140,7 @@ sub get_marc21_from_catalogue($ppn){
}
}
print_scalar_data("","INFO: Found metadata for PPN '$ppn'","","white");
print_scalar_data("INFO: Found metadata for PPN '$ppn'","","white");
return$marc21;
}
...
...
@@ -213,7 +213,7 @@ sub createDir($path){
if(!-d$path&&!-f$path){
eval{path($path)->mkpath;};
if($@){# error
print_scalar_data("","ERROR: Failed to create directory '$path'.","","red");
print_scalar_data("ERROR: Failed to create directory '$path'.","","red");
die$@;
}
}
...
...
@@ -237,8 +237,8 @@ sub copyFilesToMeta($ppn, $metaPath,$rightsFilePath,$aRefAddMetaFile,$marc21){
$i++;
}
}
print_scalar_data("","WARNING: Renaming ".$meta_file_name." to $i.xml, because meta filename <rights.xml> or <marc21.xml> is reserved.","","yellow");
print_scalar_data("","INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
print_scalar_data("WARNING: Renaming ".$meta_file_name." to $i.xml, because meta filename <rights.xml> or <marc21.xml> is reserved.","","yellow");
print_scalar_data("INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
@@ -256,8 +256,8 @@ sub copyFilesToMeta($ppn, $metaPath,$rightsFilePath,$aRefAddMetaFile,$marc21){
# rights.xml
if(basename($rightsFilePath)ne"rights.xml"){
my$rights_name=basename($rightsFilePath);
print_scalar_data("","WARNING: Renaming ".$rights_name." to rights.xml, because meta filename <rights.xml> is required.","","yellow");
print_scalar_data("","INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");
print_scalar_data("WARNING: Renaming ".$rights_name." to rights.xml, because meta filename <rights.xml> is required.","","yellow");
print_scalar_data("INFO: Read Docu for more information at https://slubarchiv.slub-dresden.de/technische-standards-fuer-die-ablieferung-von-digitalen-dokumenten/","","white");