Improvements to changes in PR#364. Ensure withdrawn items are still exported to CSV. Improve error logging on export.

This commit is contained in:
Tim Donohue
2013-12-04 22:59:09 +00:00
parent 7a8054d646
commit 928267a220
2 changed files with 7 additions and 3 deletions

View File

@@ -385,8 +385,9 @@ public class DSpaceCSV implements Serializable
*/
public final void addItem(Item i) throws Exception
{
// If the item is not in the archive, the call to get its handle below will fail
if (i.isWithdrawn() || !i.isArchived() || i.getOwningCollection() == null) {
// If the item does not have an "owningCollection" the the below "getHandle()" call will fail
// This should not happen but is here for safety.
if (i.getOwningCollection() == null) {
return;
}

View File

@@ -137,6 +137,9 @@ public class MetadataExport
}
catch (Exception e)
{
// Something went wrong...
System.err.println("Error exporting to CSV:");
e.printStackTrace();
return null;
}
}
@@ -263,4 +266,4 @@ public class MetadataExport
c.restoreAuthSystemState();
c.complete();
}
}
}