Commit 2508a76d authored by Fischer, Tim's avatar Fischer, Tim
Browse files

added option for better reference names for excel sheets

parent 4d45e362
......@@ -27,15 +27,18 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource {
public SmartExcelSheetBundlesSetSource(Sheet sheet) {
String sheetName = sheet.getSheetName();
this.reference = "excel-" + UUID.randomUUID().toString() + "@@" + sheetName;
String sheetType = sheetName.substring(sheetName.indexOf(";")+1);
sheetName = sheetName.substring(0, sheetName.indexOf(";"));
this.reference = sheetName + "-" + UUID.randomUUID().toString() + "@@" + sheetName;
switch (sheetName) {
switch (sheetType) {
case "journal article" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "article"); break;
case "monograph" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "monograph"); break;
case "collection" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "collection"); break;
case "incollection" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "incollection"); break;
case "recension" : dcTypeStockMetadatum = new SimpleMetadatum("dc.type.stock", "recension"); break;
default: log.warn("sheet has an unrecognized name: {}", sheetName);
default: log.warn("sheet has an unrecognized name: {}", sheetType);
}
this.sheet = sheet;
......
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