mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Resolving another small METS validation bug in AIP code. The METS @ID attribute doesn't allow a "/" (slash). Fixing the generated @ID value so that it instead includes the Handle with any slashes replaced with dashes. Also fixed a possible NullPointerException if Handle==null.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5425 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -733,8 +733,12 @@ public abstract class AbstractMETSDisseminator
|
||||
// Create the METS manifest in memory
|
||||
Mets mets = new Mets();
|
||||
|
||||
// this ID should be globally unique
|
||||
mets.setID("DSpace-" + Constants.typeText[dso.getType()] +"-" + dso.getHandle());
|
||||
String identifier = "DB-ID-" + dso.getID();
|
||||
if(dso.getHandle()!=null)
|
||||
identifier = dso.getHandle().replace('/', '-');
|
||||
|
||||
// this ID should be globally unique (format: DSpace_[objType]_[handle with slash replaced with a dash])
|
||||
mets.setID("DSpace_" + Constants.typeText[dso.getType()] + "_" + identifier);
|
||||
|
||||
// identifies the object described by this document
|
||||
mets.setOBJID(makePersistentID(dso));
|
||||
|
Reference in New Issue
Block a user