Commit bfd8acb2 authored by Steinberg, Jan's avatar Steinberg, Jan

added urn registration to known metadata keys, changed Integer parsing from excel sheet

parent d8e6b8d9
......@@ -177,6 +177,7 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource {
case "ssoar.contributor.institution": result = extractCleanedMetadatum(metadatumKey, cell); break;
case "ssoar.licence.dfg": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break;
case "ssoar.wgl.collection": result = extractBinaryMetadatum(metadatumKey, cell, "true", null); break;
case "ssoar.urn.registration": result = extractCleanedMetadatum(metadatumKey, cell); break;
default: result = new HashSet<>();
}
}
......@@ -256,8 +257,15 @@ public class SmartExcelSheetBundlesSetSource implements BundlesSetSource {
if ( isNotBlank(rawValue) ) {
Metadatum metadatum;
try {
int intValue = (int) Double.parseDouble(rawValue);
//int intValue = (int) Double.parseDouble(rawValue);
int intValue = Integer.parseInt(rawValue.trim());
String intString = Integer.toString(intValue);
if (intString.contains(".0")) {
intString = intString.replace(".0", "");
}
if (intString.contains("\"")) {
intString = intString.replaceAll("[^\\d]", "");
}
metadatum = new SimpleMetadatum(metadatumKey, intString);
}
catch (Throwable t) {
......
Markdown is supported
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