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

- refactor: get marc21 and mods with new funtionality

parent 873bdc8c
No related branches found
No related tags found
No related merge requests found
......@@ -552,6 +552,7 @@ PATCH
my @addMetaFile = @{ $aRefAddMetaFile };
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
......@@ -560,6 +561,11 @@ PATCH
# copy payload files to data
print_scalar_data("", "INFO: copying original data...", "", "white");
dircopy($ieDirectory, $dataPath) || die ("Error coping $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......@@ -582,12 +588,18 @@ PATCH
my @addMetaFile = @{ $aRefAddMetaFile };
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......@@ -610,12 +622,18 @@ PATCH
my @addMetaFile = @{ $aRefAddMetaFile };
my @addBagInfo = @{ $refAddBagInfo };
my ($mods, $marc21);
# create bag dir
SLUB::LZA::SIPBuilderBagIt::createDir($bagPath);
# move payloads to data dir (which is automatically renamed from IE Directory)
print_scalar_data("", "INFO: moving original data...", "", "white");
dirmove($ieDirectory, $dataPath) || die ("Error moving $ieDirectory to $dataPath");
# get descriptive metadata from catalog
if ($ppn) {
$marc21 = get_marc21_from_catalogue($ppn);
$mods = get_mods_from_marc21($marc21);
}
# create meta dir
SLUB::LZA::SIPBuilderBagIt::createDir($metaPath);
# copy not payload files to meta
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment