115693: DataCiteConnector fallback for blank metadata doi

(cherry picked from commit 021e424347)
This commit is contained in:
Kristof De Langhe
2024-06-27 10:59:36 +02:00
committed by github-actions[bot]
parent f1dc25195f
commit d240a16b05

View File

@@ -15,6 +15,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.StatusLine; import org.apache.http.StatusLine;
@@ -412,7 +413,7 @@ public class DataCiteConnector
} }
String metadataDOI = extractDOI(root); String metadataDOI = extractDOI(root);
if (null == metadataDOI) { if (StringUtils.isBlank(metadataDOI)) {
// The DOI will be saved as metadata of dso after successful // The DOI will be saved as metadata of dso after successful
// registration. To register a doi it has to be part of the metadata // registration. To register a doi it has to be part of the metadata
// sent to DataCite. So we add it to the XML we'll send to DataCite // sent to DataCite. So we add it to the XML we'll send to DataCite