Commit 993fbc44 authored by Fischer, Tim's avatar Fischer, Tim
Browse files

added backup to old way for excel sheets with no attached name

parent 2508a76d
......@@ -27,10 +27,14 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource {
public SmartExcelSheetBundlesSetSource(Sheet sheet) {
String sheetName = sheet.getSheetName();
String sheetType = sheetName.substring(sheetName.indexOf(";")+1);
sheetName = sheetName.substring(0, sheetName.indexOf(";"));
this.reference = sheetName + "-" + UUID.randomUUID().toString() + "@@" + sheetName;
String sheetType = sheet.getSheetName();
if(sheetName.contains(";")) {
sheetType = sheetName.substring(sheetName.indexOf(";")+1);
sheetName = sheetName.substring(0, sheetName.indexOf(";"));
this.reference = sheetName + "-" + UUID.randomUUID().toString() + "@@" + sheetName;
} else {
this.reference = "excel-" + UUID.randomUUID().toString() + "@@" + sheetName;
}
switch (sheetType) {
case "journal article" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "article"); break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment