Skip to content

Commit

Permalink
DS-1879 Do not require ADMID for bundles in METS
Browse files Browse the repository at this point in the history
  • Loading branch information
aschweer authored and tdonohue committed Jan 28, 2014
1 parent b1a75fa commit 51a0b07
Showing 1 changed file with 12 additions and 8 deletions.
Expand Up @@ -844,13 +844,6 @@ protected void addBitstreams(Context context, Item item,
{
Element mfile = mi.next();

String mfileGrp = mfile.getAttributeValue("ADMID");
if (mfileGrp == null)
{
throw new PackageValidationException(
"Invalid METS Manifest: file element without ID attribute.");
}

String bundleName = METSManifest.getBundleName(mfile, false);

Bundle bundle;
Expand All @@ -864,7 +857,18 @@ protected void addBitstreams(Context context, Item item,
bundle = item.createBundle(bundleName);
}

manifest.crosswalkBundle(context, params, bundle, mfileGrp,mdRefCallback);
String mfileGrp = mfile.getAttributeValue("ADMID");
if (mfileGrp != null)
{
manifest.crosswalkBundle(context, params, bundle, mfileGrp,mdRefCallback);
}
else
{
if (log.isDebugEnabled())
{
log.debug("Ingesting bundle with no ADMID, not crosswalking bundle metadata");
}
}

bundle.update();
}// end for each manifest file
Expand Down

0 comments on commit 51a0b07

Please sign in to comment.