Skip to content

Commit

Permalink
us customization fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ffritze committed Aug 22, 2023
1 parent 7e580c3 commit 55aca64
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,6 @@ public static void writeAccessRightsElement(XMLStreamWriter xmlw, DatasetVersion
xmlw.writeEndElement(); // </rights>

writeRightsHeader(xmlw, language);

if (datasetVersionDTO.getLicense() != null) {
xmlw.writeAttribute("rightsURI", datasetVersionDTO.getLicense().getUri());
xmlw.writeCharacters(datasetVersionDTO.getLicense().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,6 @@ public static JsonObjectBuilder jsonDataFileList(List<DataFile> 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.
Expand Down
6 changes: 0 additions & 6 deletions src/main/webapp/metadataFragment.xhtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
Expand Down Expand Up @@ -326,11 +325,6 @@
<h:outputText value="#{bundle.conditionalRequiredMsg}"/>
</p>
</ui:fragment>
<ui:fragment rendered="#{dsf.datasetFieldType.name == 'keyword'}">
<p class="help-block">
<h:outputText value="#{bundle.vocabularyFaqMsg}" escape="false"/>
</p>
</ui:fragment>
<ui:repeat value="#{dsf.datasetFieldCompoundValues}" var="compoundValue" varStatus="valCount">
<div class="form-group form-col-container col-sm-9 edit-compound-field" data-cvoc-parentfield="#{cvocConf.containsKey(dsf.datasetFieldType.id)?cvocConf.get(dsf.datasetFieldType.id).getString('field-name'):''}">
<!-- Sub Fields -->
Expand Down

0 comments on commit 55aca64

Please sign in to comment.