metaData.setNodeStatus(NodeStatus.DONE);
node.setMetaData(metaData);
node.setExtensionMismatch(results.getExtensionMismatch());
node.setFinished(new Date());
ResourceId parentId = results.getCorrelationId();
resultHandlerDao.save(node, parentId);
if (results.getResults().isEmpty()) {
node.addFormatIdentification(Format.NULL);
node.setZeroIdentifications();
} else {
for (IdentificationResult result : results.getResults()) {
node.getMetaData().setIdentificationMethod(result.getMethod());
//log.debug(String.format("Handling ID puid[%s]; uri[%s]", result.getPuid(), results.getUri()));
Format format = resultHandlerDao.loadFormat(result.getPuid());
node.addFormatIdentification(format);
}
}
progressMonitor.stopJob(node);
return new ResourceId(node.getId(), node.getPrefix());
}