log.warn("DOIConsumer got an event whose subject was not an item, "
+ "skipping: " + event.toString());
}
Item item = (Item) dso;
DOIIdentifierProvider provider = new DSpace().getSingletonService(
DOIIdentifierProvider.class);
String doi = null;
try {
doi = provider.lookup(ctx, dso);
}
catch (IdentifierNotFoundException ex)
{
log.warn("DOIConsumer cannot handles items without DOIs, skipping: "
+ event.toString());
}
try
{
provider.updateMetadata(ctx, dso, doi);
}
catch (IllegalArgumentException ex)
{
// should not happen, as we got the DOI from the DOIProvider
log.warn("DOIConsumer caught an IdentifierException.", ex);