From 55aca64a2ac5a1350e8b6fb20e8198a2373f5a26 Mon Sep 17 00:00:00 2001
From: Florian Fritze
Date: Tue, 22 Aug 2023 07:59:30 +0200
Subject: [PATCH] us customization fixes
---
.../iq/dataverse/api/dto/DatasetVersionDTO.java | 3 ---
.../export/openaire/OpenAireExportUtil.java | 1 -
.../harvard/iq/dataverse/util/json/JsonParser.java | 2 +-
.../harvard/iq/dataverse/util/json/JsonPrinter.java | 12 ------------
src/main/webapp/metadataFragment.xhtml | 6 ------
5 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/dto/DatasetVersionDTO.java b/src/main/java/edu/harvard/iq/dataverse/api/dto/DatasetVersionDTO.java
index 84a76e9017b..37fe197280b 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/dto/DatasetVersionDTO.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/dto/DatasetVersionDTO.java
@@ -56,9 +56,6 @@ public void setInReview(boolean inReview) {
}
public String getTermsOfUse() {
- if (termsOfUse != null && termsOfUse.contains("CC0")) {
- termsOfUse = termsOfUse.replace("CC0", "CC BY");
- }
return termsOfUse;
}
diff --git a/src/main/java/edu/harvard/iq/dataverse/export/openaire/OpenAireExportUtil.java b/src/main/java/edu/harvard/iq/dataverse/export/openaire/OpenAireExportUtil.java
index 5866003aee7..bea3858a60e 100644
--- a/src/main/java/edu/harvard/iq/dataverse/export/openaire/OpenAireExportUtil.java
+++ b/src/main/java/edu/harvard/iq/dataverse/export/openaire/OpenAireExportUtil.java
@@ -1143,7 +1143,6 @@ public static void writeAccessRightsElement(XMLStreamWriter xmlw, DatasetVersion
xmlw.writeEndElement(); //
writeRightsHeader(xmlw, language);
-
if (datasetVersionDTO.getLicense() != null) {
xmlw.writeAttribute("rightsURI", datasetVersionDTO.getLicense().getUri());
xmlw.writeCharacters(datasetVersionDTO.getLicense().getName());
diff --git a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java
index 0ea5baee6c2..22e2c6c8d78 100644
--- a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java
+++ b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java
@@ -407,7 +407,7 @@ public DatasetVersion parseDatasetVersion(JsonObject obj, DatasetVersion dsv) th
throw new JsonParseException(BundleUtil.getStringFromBundle("jsonparser.error.parsing.number", Arrays.asList(ex.getMessage())), ex);
}
}
-
+
private edu.harvard.iq.dataverse.license.License parseLicense(String licenseNameOrUri) throws JsonParseException {
if (licenseNameOrUri == null){
boolean safeDefaultIfKeyNotFound = true;
diff --git a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
index df8b649f54c..9f5401f77d1 100644
--- a/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
+++ b/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
@@ -421,18 +421,6 @@ public static JsonObjectBuilder jsonDataFileList(List dataFiles){
return bld;
}
- private static String getLicense(DatasetVersion dsv) {
- if (dsv.getTermsOfUseAndAccess().getLicense() != null) {
- if (dsv.getTermsOfUseAndAccess().getLicense().equals(TermsOfUseAndAccess.License.CC0)) {
- return "CC BY";
- } else {
- return dsv.getTermsOfUseAndAccess().getLicense().toString();
- }
- } else {
- return null;
- }
- }
-
/**
* Export formats such as DDI require the citation to be included. See
* https://github.com/IQSS/dataverse/issues/2579 for more on DDI export.
diff --git a/src/main/webapp/metadataFragment.xhtml b/src/main/webapp/metadataFragment.xhtml
index b7d87bbd60c..324fd2e0b84 100755
--- a/src/main/webapp/metadataFragment.xhtml
+++ b/src/main/webapp/metadataFragment.xhtml
@@ -1,4 +1,3 @@
-
-
-
-
-
-