String... attributes)
throws IdentifierNotFoundException, IdentifierNotResolvableException
{
log.debug("resolve {}", identifier);
ItemIterator found;
try {
found = Item.findByMetadataField(context,
MD_SCHEMA, DOI_ELEMENT, DOI_QUALIFIER,
idToDOI(identifier));
} catch (IdentifierException | SQLException | AuthorizeException | IOException ex) {
log.error(ex.getMessage());
throw new IdentifierNotResolvableException(ex);
}
try {
if (!found.hasNext())
{
throw new IdentifierNotFoundException("No object bound to " + identifier);
}
Item found1 = found.next();
if (found.hasNext())
{
log.error("More than one object bound to {}!", identifier);
}
log.debug("Resolved to {}", found1);
return found1;