DS-1879 Do not require ADMID for bundles in METS

This commit is contained in:
Andrea Schweer
2014-01-28 11:57:31 +13:00
parent 9fc0e06794
commit fbfea0c0cd

View File

@@ -844,13 +844,6 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
{
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;
@@ -864,7 +857,18 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
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