Regarding the install item
|
public Item installItem(Context c, InProgressSubmission is, |
|
String suppliedHandle) throws SQLException, |
|
AuthorizeException { |
|
Item item = is.getItem(); |
|
Collection collection = is.getCollection(); |
|
|
|
// Get map of filters to use for identifier types. |
|
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(false); |
|
try { |
|
if (suppliedHandle == null) { |
|
// Register with the filters we've set up |
|
identifierService.register(c, item, filters); |
|
} else { |
|
// This will register the handle but a pending DOI won't be compatible and so won't be registered |
|
identifierService.register(c, item, suppliedHandle); |
|
} |
|
} catch (IdentifierException e) { |
|
throw new RuntimeException("Can't create an Identifier!", e); |
|
} |
We are going throug L98 to
|
public String register(Context context, DSpaceObject dso) { |
|
String id = mint(context, dso); |
|
try { |
|
if (dso instanceof Item || dso instanceof Collection || dso instanceof Community) { |
|
populateHandleMetadata(context, dso, id); |
|
} |
|
} catch (IOException | SQLException | AuthorizeException e) { |
|
log.error(LogHelper.getHeader(context, "Error while attempting to create handle", |
|
"Item id: " + (dso != null ? dso.getID() : "")), e); |
|
throw new RuntimeException( |
|
"Error while attempting to create identifier for Item id: " + (dso != null ? dso.getID() : "")); |
|
} |
|
return id; |
where mint just returns dso.getHandle()
So we are not hitting the epic endpoint again - which is rather unfortunate as
|
public static Map<String, String> extractMetadata(DSpaceObject dso) { |
can never provide the title.
Originally posted by @kosarko in #1267
Originally posted by @kosarko in #1267