String name2 = new File(file).getName();
name1 = name1.substring(0, name1.lastIndexOf(".") > 0 ? name1.lastIndexOf(".") : name1.length());
name2 = name2.substring(0, name2.lastIndexOf(".") > 0 ? name2.lastIndexOf(".") : name2.length());
if (StringUtils.equals(name1, name2)) {
dco.setValue(front, new DcImageIcon(file));
frontSet = true;
}
}
if (!frontSet && (files.size() == 1 ||
match(DcRepository.ModuleSettings.stImportLocalArtFrontKeywords, file))) {
dco.setValue(front, new DcImageIcon(file));
frontSet = true;
} else if (!backSet && match(DcRepository.ModuleSettings.stImportLocalArtBackKeywords, file)) {
dco.setValue(back, new DcImageIcon(file));
backSet = true;
} else if (!cdSet && match(DcRepository.ModuleSettings.stImportLocalArtMediaKeywords, file)) {
dco.setValue(cd, new DcImageIcon(file));
cdSet = true;
}
} catch (Exception e) {
logger.error(e, e);
}