affectedFileIds = fileService.selectFilesWithMissingOriginalTypes();
+
+ if (affectedFileIds.isEmpty()) {
+ info.add("message",
+ "All the tabular files in the database already have the original types set correctly; exiting.");
+ } else {
+ for (Long fileid : affectedFileIds) {
+ logger.fine("found file id: " + fileid);
+ }
+ info.add("message", "Found " + affectedFileIds.size()
+ + " tabular files with missing original types. Kicking off an async job that will repair the files in the background.");
+ }
+
+ ingestService.fixMissingOriginalTypes(affectedFileIds);
+
+ return ok(info);
+ }
@Path("datafiles/integrity/fixmissingoriginalsizes")
@GET
@@ -1421,60 +1421,60 @@ public Response fixMissingOriginalSizes(@QueryParam("limit") Integer limit) {
return ok(info);
}
- /**
- * This method is used in API tests, called from UtilIt.java.
- */
- @GET
- @Path("datasets/thumbnailMetadata/{id}")
- public Response getDatasetThumbnailMetadata(@PathParam("id") Long idSupplied) {
- Dataset dataset = datasetSvc.find(idSupplied);
- if (dataset == null) {
- return error(Response.Status.NOT_FOUND, "Could not find dataset based on id supplied: " + idSupplied + ".");
- }
- JsonObjectBuilder data = Json.createObjectBuilder();
- DatasetThumbnail datasetThumbnail = dataset.getDatasetThumbnail(ImageThumbConverter.DEFAULT_CARDIMAGE_SIZE);
- data.add("isUseGenericThumbnail", dataset.isUseGenericThumbnail());
- data.add("datasetLogoPresent", DatasetUtil.isDatasetLogoPresent(dataset, ImageThumbConverter.DEFAULT_CARDIMAGE_SIZE));
- if (datasetThumbnail != null) {
- data.add("datasetThumbnailBase64image", datasetThumbnail.getBase64image());
- DataFile dataFile = datasetThumbnail.getDataFile();
- if (dataFile != null) {
- /**
- * @todo Change this from a String to a long.
- */
- data.add("dataFileId", dataFile.getId().toString());
- }
- }
- return ok(data);
- }
-
- /**
- * validatePassword
- *
- * Validate a password with an API call
- *
- * @param password
- * The password
- * @return A response with the validation result.
- */
- @Path("validatePassword")
- @POST
- public Response validatePassword(String password) {
-
- final List errors = passwordValidatorService.validate(password, new Date(), false);
- final JsonArrayBuilder errorArray = Json.createArrayBuilder();
- errors.forEach(errorArray::add);
- return ok(Json.createObjectBuilder().add("password", password).add("errors", errorArray));
- }
-
- @GET
- @Path("/isOrcid")
- public Response isOrcidEnabled() {
- return authSvc.isOrcidEnabled() ? ok("Orcid is enabled") : ok("no orcid for you.");
- }
+ /**
+ * This method is used in API tests, called from UtilIt.java.
+ */
+ @GET
+ @Path("datasets/thumbnailMetadata/{id}")
+ public Response getDatasetThumbnailMetadata(@PathParam("id") Long idSupplied) {
+ Dataset dataset = datasetSvc.find(idSupplied);
+ if (dataset == null) {
+ return error(Response.Status.NOT_FOUND, "Could not find dataset based on id supplied: " + idSupplied + ".");
+ }
+ JsonObjectBuilder data = Json.createObjectBuilder();
+ DatasetThumbnail datasetThumbnail = dataset.getDatasetThumbnail(ImageThumbConverter.DEFAULT_CARDIMAGE_SIZE);
+ data.add("isUseGenericThumbnail", dataset.isUseGenericThumbnail());
+ data.add("datasetLogoPresent", DatasetUtil.isDatasetLogoPresent(dataset, ImageThumbConverter.DEFAULT_CARDIMAGE_SIZE));
+ if (datasetThumbnail != null) {
+ data.add("datasetThumbnailBase64image", datasetThumbnail.getBase64image());
+ DataFile dataFile = datasetThumbnail.getDataFile();
+ if (dataFile != null) {
+ /**
+ * @todo Change this from a String to a long.
+ */
+ data.add("dataFileId", dataFile.getId().toString());
+ }
+ }
+ return ok(data);
+ }
+
+ /**
+ * validatePassword
+ *
+ * Validate a password with an API call
+ *
+ * @param password
+ * The password
+ * @return A response with the validation result.
+ */
+ @Path("validatePassword")
+ @POST
+ public Response validatePassword(String password) {
+
+ final List errors = passwordValidatorService.validate(password, new Date(), false);
+ final JsonArrayBuilder errorArray = Json.createArrayBuilder();
+ errors.forEach(errorArray::add);
+ return ok(Json.createObjectBuilder().add("password", password).add("errors", errorArray));
+ }
+
+ @GET
+ @Path("/isOrcid")
+ public Response isOrcidEnabled() {
+ return authSvc.isOrcidEnabled() ? ok("Orcid is enabled") : ok("no orcid for you.");
+ }
@POST
- @AuthRequired
+ @AuthRequired
@Path("{id}/reregisterHDLToPID")
public Response reregisterHdlToPID(@Context ContainerRequestContext crc, @PathParam("id") String id) {
logger.info("Starting to reregister " + id + " Dataset Id. (from hdl to doi)" + new Date());
@@ -1805,7 +1805,7 @@ public Response updateHashValues(@Context ContainerRequestContext crc, @PathPara
}
@POST
- @AuthRequired
+ @AuthRequired
@Path("/computeDataFileHashValue/{fileId}/algorithm/{alg}")
public Response computeDataFileHashValue(@Context ContainerRequestContext crc, @PathParam("fileId") String fileId, @PathParam("alg") String alg) {
@@ -1867,7 +1867,7 @@ public Response computeDataFileHashValue(@Context ContainerRequestContext crc, @
}
@POST
- @AuthRequired
+ @AuthRequired
@Path("/validateDataFileHashValue/{fileId}")
public Response validateDataFileHashValue(@Context ContainerRequestContext crc, @PathParam("fileId") String fileId) {
@@ -1934,7 +1934,7 @@ public Response validateDataFileHashValue(@Context ContainerRequestContext crc,
}
@POST
- @AuthRequired
+ @AuthRequired
@Path("/submitDatasetVersionToArchive/{id}/{version}")
public Response submitDatasetVersionToArchive(@Context ContainerRequestContext crc, @PathParam("id") String dsid,
@PathParam("version") String versionNumber) {
@@ -2007,7 +2007,7 @@ public void run() {
* @return
*/
@POST
- @AuthRequired
+ @AuthRequired
@Path("/archiveAllUnarchivedDatasetVersions")
public Response archiveAllUnarchivedDatasetVersions(@Context ContainerRequestContext crc, @QueryParam("listonly") boolean listonly, @QueryParam("limit") Integer limit, @QueryParam("latestonly") boolean latestonly) {
@@ -2106,7 +2106,7 @@ public Response clearMetricsCacheByName(@PathParam("name") String name) {
}
@GET
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/addRoleAssignmentsToChildren")
public Response addRoleAssignementsToChildren(@Context ContainerRequestContext crc, @PathParam("alias") String alias) throws WrappedResponse {
Dataverse owner = dataverseSvc.findByAlias(alias);
@@ -2137,90 +2137,90 @@ public Response addRoleAssignementsToChildren(@Context ContainerRequestContext c
}
@GET
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/storageDriver")
public Response getStorageDriver(@Context ContainerRequestContext crc, @PathParam("alias") String alias) throws WrappedResponse {
- Dataverse dataverse = dataverseSvc.findByAlias(alias);
- if (dataverse == null) {
- return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
- }
- try {
- AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
- if (!user.isSuperuser()) {
- return error(Response.Status.FORBIDDEN, "Superusers only.");
- }
- } catch (WrappedResponse wr) {
- return wr.getResponse();
- }
- //Note that this returns what's set directly on this dataverse. If null/DataAccess.UNDEFINED_STORAGE_DRIVER_IDENTIFIER, the user would have to recurse the chain of parents to find the effective storageDriver
- return ok(dataverse.getStorageDriverId());
+ Dataverse dataverse = dataverseSvc.findByAlias(alias);
+ if (dataverse == null) {
+ return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
+ }
+ try {
+ AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
+ if (!user.isSuperuser()) {
+ return error(Response.Status.FORBIDDEN, "Superusers only.");
+ }
+ } catch (WrappedResponse wr) {
+ return wr.getResponse();
+ }
+ //Note that this returns what's set directly on this dataverse. If null/DataAccess.UNDEFINED_STORAGE_DRIVER_IDENTIFIER, the user would have to recurse the chain of parents to find the effective storageDriver
+ return ok(dataverse.getStorageDriverId());
}
@PUT
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/storageDriver")
public Response setStorageDriver(@Context ContainerRequestContext crc, @PathParam("alias") String alias, String label) throws WrappedResponse {
- Dataverse dataverse = dataverseSvc.findByAlias(alias);
- if (dataverse == null) {
- return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
- }
- try {
- AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
- if (!user.isSuperuser()) {
- return error(Response.Status.FORBIDDEN, "Superusers only.");
- }
- } catch (WrappedResponse wr) {
- return wr.getResponse();
- }
- for (Entry store: DataAccess.getStorageDriverLabels().entrySet()) {
- if(store.getKey().equals(label)) {
- dataverse.setStorageDriverId(store.getValue());
- return ok("Storage set to: " + store.getKey() + "/" + store.getValue());
- }
- }
- return error(Response.Status.BAD_REQUEST,
- "No Storage Driver found for : " + label);
+ Dataverse dataverse = dataverseSvc.findByAlias(alias);
+ if (dataverse == null) {
+ return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
+ }
+ try {
+ AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
+ if (!user.isSuperuser()) {
+ return error(Response.Status.FORBIDDEN, "Superusers only.");
+ }
+ } catch (WrappedResponse wr) {
+ return wr.getResponse();
+ }
+ for (Entry store: DataAccess.getStorageDriverLabels().entrySet()) {
+ if(store.getKey().equals(label)) {
+ dataverse.setStorageDriverId(store.getValue());
+ return ok("Storage set to: " + store.getKey() + "/" + store.getValue());
+ }
+ }
+ return error(Response.Status.BAD_REQUEST,
+ "No Storage Driver found for : " + label);
}
@DELETE
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/storageDriver")
public Response resetStorageDriver(@Context ContainerRequestContext crc, @PathParam("alias") String alias) throws WrappedResponse {
- Dataverse dataverse = dataverseSvc.findByAlias(alias);
- if (dataverse == null) {
- return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
- }
- try {
- AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
- if (!user.isSuperuser()) {
- return error(Response.Status.FORBIDDEN, "Superusers only.");
- }
- } catch (WrappedResponse wr) {
- return wr.getResponse();
- }
- dataverse.setStorageDriverId("");
- return ok("Storage reset to default: " + DataAccess.DEFAULT_STORAGE_DRIVER_IDENTIFIER);
+ Dataverse dataverse = dataverseSvc.findByAlias(alias);
+ if (dataverse == null) {
+ return error(Response.Status.NOT_FOUND, "Could not find dataverse based on alias supplied: " + alias + ".");
+ }
+ try {
+ AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
+ if (!user.isSuperuser()) {
+ return error(Response.Status.FORBIDDEN, "Superusers only.");
+ }
+ } catch (WrappedResponse wr) {
+ return wr.getResponse();
+ }
+ dataverse.setStorageDriverId("");
+ return ok("Storage reset to default: " + DataAccess.DEFAULT_STORAGE_DRIVER_IDENTIFIER);
}
@GET
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/storageDrivers")
public Response listStorageDrivers(@Context ContainerRequestContext crc) throws WrappedResponse {
- try {
- AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
- if (!user.isSuperuser()) {
- return error(Response.Status.FORBIDDEN, "Superusers only.");
- }
- } catch (WrappedResponse wr) {
- return wr.getResponse();
- }
- JsonObjectBuilder bld = jsonObjectBuilder();
- DataAccess.getStorageDriverLabels().entrySet().forEach(s -> bld.add(s.getKey(), s.getValue()));
- return ok(bld);
+ try {
+ AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
+ if (!user.isSuperuser()) {
+ return error(Response.Status.FORBIDDEN, "Superusers only.");
+ }
+ } catch (WrappedResponse wr) {
+ return wr.getResponse();
+ }
+ JsonObjectBuilder bld = jsonObjectBuilder();
+ DataAccess.getStorageDriverLabels().entrySet().forEach(s -> bld.add(s.getKey(), s.getValue()));
+ return ok(bld);
}
@GET
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/curationLabelSet")
public Response getCurationLabelSet(@Context ContainerRequestContext crc, @PathParam("alias") String alias) throws WrappedResponse {
Dataverse dataverse = dataverseSvc.findByAlias(alias);
@@ -2242,7 +2242,7 @@ public Response getCurationLabelSet(@Context ContainerRequestContext crc, @PathP
}
@PUT
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/curationLabelSet")
public Response setCurationLabelSet(@Context ContainerRequestContext crc, @PathParam("alias") String alias, @QueryParam("name") String name) throws WrappedResponse {
Dataverse dataverse = dataverseSvc.findByAlias(alias);
@@ -2273,7 +2273,7 @@ public Response setCurationLabelSet(@Context ContainerRequestContext crc, @PathP
}
@DELETE
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/{alias}/curationLabelSet")
public Response resetCurationLabelSet(@Context ContainerRequestContext crc, @PathParam("alias") String alias) throws WrappedResponse {
Dataverse dataverse = dataverseSvc.findByAlias(alias);
@@ -2293,7 +2293,7 @@ public Response resetCurationLabelSet(@Context ContainerRequestContext crc, @Pat
}
@GET
- @AuthRequired
+ @AuthRequired
@Path("/dataverse/curationLabelSets")
public Response listCurationLabelSets(@Context ContainerRequestContext crc) throws WrappedResponse {
try {
@@ -2403,7 +2403,7 @@ public Response getBannerMessages(@PathParam("id") Long id) throws WrappedRespon
}
@POST
- @AuthRequired
+ @AuthRequired
@Consumes("application/json")
@Path("/requestSignedUrl")
public Response getSignedUrl(@Context ContainerRequestContext crc, JsonObject urlInfo) {
@@ -2521,162 +2521,162 @@ public Response getFeatureFlag(@PathParam("flag") String flagIn) {
}
}
- @GET
- @AuthRequired
- @Path("/datafiles/auditFiles")
- public Response getAuditFiles(@Context ContainerRequestContext crc,
- @QueryParam("firstId") Long firstId, @QueryParam("lastId") Long lastId,
- @QueryParam("datasetIdentifierList") String datasetIdentifierList) throws WrappedResponse {
- try {
- AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
- if (!user.isSuperuser()) {
- return error(Response.Status.FORBIDDEN, "Superusers only.");
- }
- } catch (WrappedResponse wr) {
- return wr.getResponse();
- }
-
- int datasetsChecked = 0;
- long startId = (firstId == null ? 0 : firstId);
- long endId = (lastId == null ? Long.MAX_VALUE : lastId);
-
- List datasetIdentifiers;
- if (datasetIdentifierList == null || datasetIdentifierList.isEmpty()) {
- datasetIdentifiers = Collections.emptyList();
- } else {
- startId = 0;
- endId = Long.MAX_VALUE;
- datasetIdentifiers = List.of(datasetIdentifierList.split(","));
- }
- if (endId < startId) {
- return badRequest("Invalid Parameters: lastId must be equal to or greater than firstId");
- }
-
- NullSafeJsonBuilder jsonObjectBuilder = NullSafeJsonBuilder.jsonObjectBuilder();
- JsonArrayBuilder jsonDatasetsArrayBuilder = Json.createArrayBuilder();
- JsonArrayBuilder jsonFailuresArrayBuilder = Json.createArrayBuilder();
-
- if (startId > 0) {
- jsonObjectBuilder.add("firstId", startId);
- }
- if (endId < Long.MAX_VALUE) {
- jsonObjectBuilder.add("lastId", endId);
- }
-
- // compile the list of ids to process
- List datasetIds;
- if (datasetIdentifiers.isEmpty()) {
- datasetIds = datasetService.findAllLocalDatasetIds();
- } else {
- datasetIds = new ArrayList<>(datasetIdentifiers.size());
- JsonArrayBuilder jab = Json.createArrayBuilder();
- datasetIdentifiers.forEach(id -> {
- String dId = id.trim();
- jab.add(dId);
- Dataset d = datasetService.findByGlobalId(dId);
- if (d != null) {
- datasetIds.add(d.getId());
- } else {
- NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
- job.add("datasetIdentifier",dId);
- job.add("reason","Not Found");
- jsonFailuresArrayBuilder.add(job);
- }
- });
- jsonObjectBuilder.add("datasetIdentifierList", jab);
- }
-
- for (Long datasetId : datasetIds) {
- if (datasetId < startId) {
- continue;
- } else if (datasetId > endId) {
- break;
- }
- Dataset dataset;
- try {
- dataset = findDatasetOrDie(String.valueOf(datasetId));
- datasetsChecked++;
- } catch (WrappedResponse e) {
- NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
- job.add("datasetId", datasetId);
- job.add("reason", e.getMessage());
- jsonFailuresArrayBuilder.add(job);
- continue;
- }
-
- List missingFiles = new ArrayList<>();
- List missingFileMetadata = new ArrayList<>();
- try {
- Predicate filter = s -> true;
- StorageIO datasetIO = DataAccess.getStorageIO(dataset);
- final List result = datasetIO.cleanUp(filter, true);
- // add files that are in dataset files but not in cleanup result or DataFiles with missing FileMetadata
- dataset.getFiles().forEach(df -> {
- try {
- StorageIO datafileIO = df.getStorageIO();
- String storageId = df.getStorageIdentifier();
- FileMetadata fm = df.getFileMetadata();
- if (!datafileIO.exists()) {
- missingFiles.add(storageId + "," + (fm != null ?
- (fm.getDirectoryLabel() != null || !fm.getDirectoryLabel().isEmpty() ? "directoryLabel,"+fm.getDirectoryLabel()+"," : "")
- +"label,"+fm.getLabel() : "type,"+df.getContentType()));
- }
- if (fm == null) {
- missingFileMetadata.add(storageId + ",dataFileId," + df.getId());
- }
- } catch (IOException e) {
- NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
- job.add("dataFileId", df.getId());
- job.add("reason", e.getMessage());
- jsonFailuresArrayBuilder.add(job);
- }
- });
- } catch (IOException e) {
- NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
- job.add("datasetId", datasetId);
- job.add("reason", e.getMessage());
- jsonFailuresArrayBuilder.add(job);
- }
-
- JsonObjectBuilder job = Json.createObjectBuilder();
- if (!missingFiles.isEmpty() || !missingFileMetadata.isEmpty()) {
- job.add("id", dataset.getId());
- job.add("identifier", dataset.getIdentifier());
- job.add("authority", dataset.getAuthority());
- job.add("protocol", dataset.getProtocol());
- job.add("persistentURL", dataset.getPersistentURL());
- if (!missingFileMetadata.isEmpty()) {
- JsonArrayBuilder jabMissingFileMetadata = Json.createArrayBuilder();
- missingFileMetadata.forEach(mm -> {
- String[] missingMetadata = mm.split(",");
- NullSafeJsonBuilder jobj = NullSafeJsonBuilder.jsonObjectBuilder()
- .add("storageIdentifier", missingMetadata[0])
- .add(missingMetadata[1], missingMetadata[2]);
- jabMissingFileMetadata.add(jobj);
- });
- job.add("missingFileMetadata", jabMissingFileMetadata);
- }
- if (!missingFiles.isEmpty()) {
- JsonArrayBuilder jabMissingFiles = Json.createArrayBuilder();
- missingFiles.forEach(mf -> {
- String[] missingFile = mf.split(",");
- NullSafeJsonBuilder jobj = NullSafeJsonBuilder.jsonObjectBuilder()
- .add("storageIdentifier", missingFile[0]);
- for (int i = 2; i < missingFile.length; i+=2) {
- jobj.add(missingFile[i-1], missingFile[i]);
- }
- jabMissingFiles.add(jobj);
- });
- job.add("missingFiles", jabMissingFiles);
- }
- jsonDatasetsArrayBuilder.add(job);
- }
- }
-
- jsonObjectBuilder.add("datasetsChecked", datasetsChecked);
- jsonObjectBuilder.add("datasets", jsonDatasetsArrayBuilder);
- jsonObjectBuilder.add("failures", jsonFailuresArrayBuilder);
-
- return ok(jsonObjectBuilder);
- }
+ @GET
+ @AuthRequired
+ @Path("/datafiles/auditFiles")
+ public Response getAuditFiles(@Context ContainerRequestContext crc,
+ @QueryParam("firstId") Long firstId, @QueryParam("lastId") Long lastId,
+ @QueryParam("datasetIdentifierList") String datasetIdentifierList) throws WrappedResponse {
+ try {
+ AuthenticatedUser user = getRequestAuthenticatedUserOrDie(crc);
+ if (!user.isSuperuser()) {
+ return error(Response.Status.FORBIDDEN, "Superusers only.");
+ }
+ } catch (WrappedResponse wr) {
+ return wr.getResponse();
+ }
+
+ int datasetsChecked = 0;
+ long startId = (firstId == null ? 0 : firstId);
+ long endId = (lastId == null ? Long.MAX_VALUE : lastId);
+
+ List datasetIdentifiers;
+ if (datasetIdentifierList == null || datasetIdentifierList.isEmpty()) {
+ datasetIdentifiers = Collections.emptyList();
+ } else {
+ startId = 0;
+ endId = Long.MAX_VALUE;
+ datasetIdentifiers = List.of(datasetIdentifierList.split(","));
+ }
+ if (endId < startId) {
+ return badRequest("Invalid Parameters: lastId must be equal to or greater than firstId");
+ }
+
+ NullSafeJsonBuilder jsonObjectBuilder = NullSafeJsonBuilder.jsonObjectBuilder();
+ JsonArrayBuilder jsonDatasetsArrayBuilder = Json.createArrayBuilder();
+ JsonArrayBuilder jsonFailuresArrayBuilder = Json.createArrayBuilder();
+
+ if (startId > 0) {
+ jsonObjectBuilder.add("firstId", startId);
+ }
+ if (endId < Long.MAX_VALUE) {
+ jsonObjectBuilder.add("lastId", endId);
+ }
+
+ // compile the list of ids to process
+ List datasetIds;
+ if (datasetIdentifiers.isEmpty()) {
+ datasetIds = datasetService.findAllLocalDatasetIds();
+ } else {
+ datasetIds = new ArrayList<>(datasetIdentifiers.size());
+ JsonArrayBuilder jab = Json.createArrayBuilder();
+ datasetIdentifiers.forEach(id -> {
+ String dId = id.trim();
+ jab.add(dId);
+ Dataset d = datasetService.findByGlobalId(dId);
+ if (d != null) {
+ datasetIds.add(d.getId());
+ } else {
+ NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
+ job.add("datasetIdentifier",dId);
+ job.add("reason","Not Found");
+ jsonFailuresArrayBuilder.add(job);
+ }
+ });
+ jsonObjectBuilder.add("datasetIdentifierList", jab);
+ }
+
+ for (Long datasetId : datasetIds) {
+ if (datasetId < startId) {
+ continue;
+ } else if (datasetId > endId) {
+ break;
+ }
+ Dataset dataset;
+ try {
+ dataset = findDatasetOrDie(String.valueOf(datasetId));
+ datasetsChecked++;
+ } catch (WrappedResponse e) {
+ NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
+ job.add("datasetId", datasetId);
+ job.add("reason", e.getMessage());
+ jsonFailuresArrayBuilder.add(job);
+ continue;
+ }
+
+ List missingFiles = new ArrayList<>();
+ List missingFileMetadata = new ArrayList<>();
+ try {
+ Predicate filter = s -> true;
+ StorageIO datasetIO = DataAccess.getStorageIO(dataset);
+ final List result = datasetIO.cleanUp(filter, true);
+ // add files that are in dataset files but not in cleanup result or DataFiles with missing FileMetadata
+ dataset.getFiles().forEach(df -> {
+ try {
+ StorageIO datafileIO = df.getStorageIO();
+ String storageId = df.getStorageIdentifier();
+ FileMetadata fm = df.getFileMetadata();
+ if (!datafileIO.exists()) {
+ missingFiles.add(storageId + "," + (fm != null ?
+ (fm.getDirectoryLabel() != null || !fm.getDirectoryLabel().isEmpty() ? "directoryLabel,"+fm.getDirectoryLabel()+"," : "")
+ +"label,"+fm.getLabel() : "type,"+df.getContentType()));
+ }
+ if (fm == null) {
+ missingFileMetadata.add(storageId + ",dataFileId," + df.getId());
+ }
+ } catch (IOException e) {
+ NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
+ job.add("dataFileId", df.getId());
+ job.add("reason", e.getMessage());
+ jsonFailuresArrayBuilder.add(job);
+ }
+ });
+ } catch (IOException e) {
+ NullSafeJsonBuilder job = NullSafeJsonBuilder.jsonObjectBuilder();
+ job.add("datasetId", datasetId);
+ job.add("reason", e.getMessage());
+ jsonFailuresArrayBuilder.add(job);
+ }
+
+ JsonObjectBuilder job = Json.createObjectBuilder();
+ if (!missingFiles.isEmpty() || !missingFileMetadata.isEmpty()) {
+ job.add("id", dataset.getId());
+ job.add("identifier", dataset.getIdentifier());
+ job.add("authority", dataset.getAuthority());
+ job.add("protocol", dataset.getProtocol());
+ job.add("persistentURL", dataset.getPersistentURL());
+ if (!missingFileMetadata.isEmpty()) {
+ JsonArrayBuilder jabMissingFileMetadata = Json.createArrayBuilder();
+ missingFileMetadata.forEach(mm -> {
+ String[] missingMetadata = mm.split(",");
+ NullSafeJsonBuilder jobj = NullSafeJsonBuilder.jsonObjectBuilder()
+ .add("storageIdentifier", missingMetadata[0])
+ .add(missingMetadata[1], missingMetadata[2]);
+ jabMissingFileMetadata.add(jobj);
+ });
+ job.add("missingFileMetadata", jabMissingFileMetadata);
+ }
+ if (!missingFiles.isEmpty()) {
+ JsonArrayBuilder jabMissingFiles = Json.createArrayBuilder();
+ missingFiles.forEach(mf -> {
+ String[] missingFile = mf.split(",");
+ NullSafeJsonBuilder jobj = NullSafeJsonBuilder.jsonObjectBuilder()
+ .add("storageIdentifier", missingFile[0]);
+ for (int i = 2; i < missingFile.length; i+=2) {
+ jobj.add(missingFile[i-1], missingFile[i]);
+ }
+ jabMissingFiles.add(jobj);
+ });
+ job.add("missingFiles", jabMissingFiles);
+ }
+ jsonDatasetsArrayBuilder.add(job);
+ }
+ }
+
+ jsonObjectBuilder.add("datasetsChecked", datasetsChecked);
+ jsonObjectBuilder.add("datasets", jsonDatasetsArrayBuilder);
+ jsonObjectBuilder.add("failures", jsonFailuresArrayBuilder);
+
+ return ok(jsonObjectBuilder);
+ }
}
From a79015f6785fbd572e01033584dfafe25fb153bc Mon Sep 17 00:00:00 2001
From: Don Sizemore
Date: Wed, 20 Nov 2024 10:09:41 -0500
Subject: [PATCH 133/226] #11037 limit beta testing deployments to one
concurrent action at a time
---
.github/workflows/deploy_beta_testing.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/deploy_beta_testing.yml b/.github/workflows/deploy_beta_testing.yml
index 4cec08564a4..eca8416732a 100644
--- a/.github/workflows/deploy_beta_testing.yml
+++ b/.github/workflows/deploy_beta_testing.yml
@@ -5,6 +5,10 @@ on:
branches:
- develop
+concurrency:
+ group: deploy-beta-testing
+ cancel-in-progress: false
+
jobs:
build:
runs-on: ubuntu-latest
From 2db26b20f3d01895cfa4d0c5093ca1ce4b539be2 Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Wed, 20 Nov 2024 10:26:56 -0500
Subject: [PATCH 134/226] add pid
---
doc/sphinx-guides/source/api/native-api.rst | 16 ++++++----------
.../java/edu/harvard/iq/dataverse/api/Admin.java | 4 +---
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 84e8bf45d9d..9a5f469a4d0 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -6226,17 +6226,15 @@ Sample JSON Audit Response::
"firstId": 0,
"lastId": 100,
"datasetIdentifierList": [
- "doi.org/10.5072/FK2/XXXXXX",
- "doi.org/10.5072/FK2/JXYBJS",
- "doi.org/10.7910/DVN/MPU019"
+ "doi:10.5072/FK2/XXXXXX",
+ "doi:10.5072/FK2/JXYBJS",
+ "doi:10.7910/DVN/MPU019"
],
"datasetsChecked": 100,
"datasets": [
{
"id": 6,
- "identifier": "FK2/JXYBJS",
- "authority": "10.5072",
- "protocol": "doi",
+ "pid": "doi:10.5072/FK2/JXYBJS",
"persistentURL": "https://doi.org/10.5072/FK2/JXYBJS",
"missingFileMetadata": [
{
@@ -6247,9 +6245,7 @@ Sample JSON Audit Response::
},
{
"id": 47731,
- "identifier": "DVN/MPU019",
- "authority": "10.7910",
- "protocol": "doi",
+ "pid": "doi:10.5072/FK2/MPU019",
"persistentURL": "https://doi.org/10.7910/DVN/MPU019",
"missingFiles": [
{
@@ -6262,7 +6258,7 @@ Sample JSON Audit Response::
],
"failures": [
{
- "datasetIdentifier": "doi.org/10.5072/FK2/XXXXXX",
+ "datasetIdentifier": "doi:10.5072/FK2/XXXXXX",
"reason": "Not Found"
}
]
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Admin.java b/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
index 61f76c9928c..152bcf5066e 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
@@ -2641,9 +2641,7 @@ public Response getAuditFiles(@Context ContainerRequestContext crc,
JsonObjectBuilder job = Json.createObjectBuilder();
if (!missingFiles.isEmpty() || !missingFileMetadata.isEmpty()) {
job.add("id", dataset.getId());
- job.add("identifier", dataset.getIdentifier());
- job.add("authority", dataset.getAuthority());
- job.add("protocol", dataset.getProtocol());
+ job.add("pid", dataset.getProtocol() + ":" + dataset.getAuthority() + "/" + dataset.getIdentifier());
job.add("persistentURL", dataset.getPersistentURL());
if (!missingFileMetadata.isEmpty()) {
JsonArrayBuilder jabMissingFileMetadata = Json.createArrayBuilder();
From 2c5aca8e952b39fd1e1f7cfa99298303ca535799 Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Wed, 20 Nov 2024 10:30:50 -0500
Subject: [PATCH 135/226] fix typos
---
doc/sphinx-guides/source/api/native-api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 9a5f469a4d0..9d6871041fd 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -6210,7 +6210,7 @@ Scans the Datasets in the database and verifies that the stored files exist. If
Optional Parameters are available for filtering the Datasets scanned.
-For auditing the Datasets in a paged manor (firstId and lastId)::
+For auditing the Datasets in a paged manner (firstId and lastId)::
curl "$SERVER_URL/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
From 3c67a7977fdaa862460e25208bb1bcb7a9c4a3c4 Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Wed, 20 Nov 2024 10:31:15 -0500
Subject: [PATCH 136/226] Update
doc/release-notes/220-harvard-edu-audit-files.md
Co-authored-by: Philip Durbin
---
doc/release-notes/220-harvard-edu-audit-files.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/220-harvard-edu-audit-files.md b/doc/release-notes/220-harvard-edu-audit-files.md
index c697bc225c0..79391703041 100644
--- a/doc/release-notes/220-harvard-edu-audit-files.md
+++ b/doc/release-notes/220-harvard-edu-audit-files.md
@@ -5,7 +5,7 @@ The Datasets scanned can be limited by optional firstId and lastId query paramet
Once the audit report is generated, a superuser can either delete the missing file(s) from the Dataset or contact the author to re-upload the missing file(s).
The JSON response includes:
-- List of files in each DataFile where the file exists in the database but the physical file is not on the file store.
+- List of files in each DataFile where the file exists in the database but the physical file is not in the file store.
- List of DataFiles where the FileMetadata is missing.
- Other failures found when trying to process the Datasets
From 58d32357978ddbae7abe587e5645fbc52192e471 Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Wed, 20 Nov 2024 10:31:24 -0500
Subject: [PATCH 137/226] Update
doc/release-notes/220-harvard-edu-audit-files.md
Co-authored-by: Philip Durbin
---
doc/release-notes/220-harvard-edu-audit-files.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/220-harvard-edu-audit-files.md b/doc/release-notes/220-harvard-edu-audit-files.md
index 79391703041..002c8e85063 100644
--- a/doc/release-notes/220-harvard-edu-audit-files.md
+++ b/doc/release-notes/220-harvard-edu-audit-files.md
@@ -13,4 +13,4 @@ curl "http://localhost:8080/api/admin/datafiles/auditFiles
curl "http://localhost:8080/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
curl "http://localhost:8080/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/RVNT9Q,doi:10.5072/FK2/RVNT9Q
-For more information, see issue [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220)
+For more information, see [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220)
From a1f057287ee1297e8ddf5ab9c0f8ec94dbcf640f Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Wed, 20 Nov 2024 10:42:30 -0500
Subject: [PATCH 138/226] added a configurable batch size limit for when to
apply the single file size lookup method for the entire batch. #10977
---
.../iq/dataverse/globus/GlobusServiceBean.java | 16 ++++++++++------
.../dataverse/settings/SettingsServiceBean.java | 6 ++++++
.../harvard/iq/dataverse/util/SystemConfig.java | 6 ++++++
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
index 3d1c5a1044d..5c9a2f1d946 100644
--- a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
@@ -986,11 +986,15 @@ private void processUploadedFiles(JsonArray filesJsonArray, Dataset dataset, Aut
inputList.add(fileId + "IDsplit" + fullPath + "IDsplit" + fileName);
}
- // Look up the sizes of all the files in the dataset folder, to avoid
- // looking them up one by one later:
- // @todo: we should only be doing this if this is a managed store, probably?
- GlobusEndpoint endpoint = getGlobusEndpoint(dataset);
- Map fileSizeMap = lookupFileSizes(endpoint, endpoint.getBasePath());
+ Map fileSizeMap = null;
+
+ if (filesJsonArray.size() >= systemConfig.getGlobusBatchLookupSize()) {
+ // Look up the sizes of all the files in the dataset folder, to avoid
+ // looking them up one by one later:
+ // @todo: we should only be doing this if this is a managed store, probably (?)
+ GlobusEndpoint endpoint = getGlobusEndpoint(dataset);
+ fileSizeMap = lookupFileSizes(endpoint, endpoint.getBasePath());
+ }
// calculateMissingMetadataFields: checksum, mimetype
JsonObject newfilesJsonObject = calculateMissingMetadataFields(inputList, myLogger);
@@ -1034,7 +1038,7 @@ private void processUploadedFiles(JsonArray filesJsonArray, Dataset dataset, Aut
.add("/fileSize", Json.createValue(uploadedFileSize)).build();
fileJsonObject = patch.apply(fileJsonObject);
} else {
- logger.warning("No file size entry found for file "+fileId);
+ logger.fine("No file size entry found for file "+fileId);
}
addFilesJsonData.add(fileJsonObject);
countSuccess++;
diff --git a/src/main/java/edu/harvard/iq/dataverse/settings/SettingsServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/settings/SettingsServiceBean.java
index 8ed96690e84..b5eb483c2c8 100644
--- a/src/main/java/edu/harvard/iq/dataverse/settings/SettingsServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/settings/SettingsServiceBean.java
@@ -539,6 +539,12 @@ Whether Harvesting (OAI) service is enabled
*
*/
GlobusSingleFileTransfer,
+ /** Lower limit of the number of files in a Globus upload task where
+ * the batch mode should be utilized in looking up the file information
+ * on the remote end node (file sizes, primarily), instead of individual
+ * lookups.
+ */
+ GlobusBatchLookupSize,
/**
* Optional external executables to run on the metadata for dataverses
* and datasets being published; as an extra validation step, to
diff --git a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
index 434b3bd8f8f..e769cacfdb1 100644
--- a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
+++ b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
@@ -78,6 +78,7 @@ public class SystemConfig {
public static final long defaultZipDownloadLimit = 104857600L; // 100MB
private static final int defaultMultipleUploadFilesLimit = 1000;
private static final int defaultLoginSessionTimeout = 480; // = 8 hours
+ private static final int defaultGlobusBatchLookupSize = 50;
private String buildNumber = null;
@@ -954,6 +955,11 @@ public boolean isGlobusFileDownload() {
return (isGlobusDownload() && settingsService.isTrueForKey(SettingsServiceBean.Key.GlobusSingleFileTransfer, false));
}
+ public int getGlobusBatchLookupSize() {
+ String batchSizeOption = settingsService.getValueForKey(SettingsServiceBean.Key.GlobusBatchLookupSize);
+ return getIntLimitFromStringOrDefault(batchSizeOption, defaultGlobusBatchLookupSize);
+ }
+
private Boolean getMethodAvailable(String method, boolean upload) {
String methods = settingsService.getValueForKey(
upload ? SettingsServiceBean.Key.UploadMethods : SettingsServiceBean.Key.DownloadMethods);
From 50b752a0116d060de95b790a23a63840c90feb6c Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Wed, 20 Nov 2024 10:45:48 -0500
Subject: [PATCH 139/226] fix typos
---
doc/sphinx-guides/source/api/native-api.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 9d6871041fd..bfcbbb96f93 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -6204,7 +6204,8 @@ Datafile Audit
~~~~~~~~~~~~~~
Produce an audit report of missing files and FileMetadata for Datasets.
-Scans the Datasets in the database and verifies that the stored files exist. If the files are missing or if the FileMetadata is missing, this information is returned in a JSON response::
+Scans the Datasets in the database and verifies that the stored files exist. If the files are missing or if the FileMetadata is missing, this information is returned in a JSON response.
+The call will return a status code of 200 if the report was generated successfully. Issues found will be documented in the report and will not return a failure status code unless the report could not be generated::
curl "$SERVER_URL/api/admin/datafiles/auditFiles"
From 536c1bfe9466242797ce5a037936560d5cd0e197 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Wed, 20 Nov 2024 12:08:21 -0500
Subject: [PATCH 140/226] release note #10977
---
doc/release-notes/10977-globus-filesize-lookup.md | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 doc/release-notes/10977-globus-filesize-lookup.md
diff --git a/doc/release-notes/10977-globus-filesize-lookup.md b/doc/release-notes/10977-globus-filesize-lookup.md
new file mode 100644
index 00000000000..49fd10d9ffe
--- /dev/null
+++ b/doc/release-notes/10977-globus-filesize-lookup.md
@@ -0,0 +1,6 @@
+## A new Globus optimization setting
+
+An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
+
+
+See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides for more information.
\ No newline at end of file
From 617b13ae40fbed89a14816aa0c07cb10b228db6d Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Wed, 20 Nov 2024 12:11:25 -0500
Subject: [PATCH 141/226] configuration guide entry #10977
---
doc/sphinx-guides/source/installation/config.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst
index e3965e3cd7c..30a36da9499 100644
--- a/doc/sphinx-guides/source/installation/config.rst
+++ b/doc/sphinx-guides/source/installation/config.rst
@@ -4849,6 +4849,13 @@ The URL where the `dataverse-globus
Date: Thu, 21 Nov 2024 10:57:37 +0000
Subject: [PATCH 142/226] Changed: docs and release note tweak for input levels
---
doc/release-notes/11018-update-dataverse-endpoint-update.md | 2 +-
doc/sphinx-guides/source/api/native-api.rst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/release-notes/11018-update-dataverse-endpoint-update.md b/doc/release-notes/11018-update-dataverse-endpoint-update.md
index dcd8eb0c90d..c2d9cf64af3 100644
--- a/doc/release-notes/11018-update-dataverse-endpoint-update.md
+++ b/doc/release-notes/11018-update-dataverse-endpoint-update.md
@@ -3,6 +3,6 @@ The updateDataverse API endpoint has been updated to support an "inherit from pa
When it comes to omitting any of these fields in the request JSON:
- Omitting ``facetIds`` or ``metadataBlockNames`` causes the Dataverse collection to inherit the corresponding configuration from its parent.
-- Omitting ``inputLevels`` removes any existing input levels in the Dataverse collection.
+- Omitting ``inputLevels`` removes any existing custom input levels in the Dataverse collection.
Previously, not setting these fields meant keeping the existing ones in the Dataverse.
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 9ac6fe196ff..cb3c7750961 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -129,7 +129,7 @@ Note that setting any of these fields overwrites the previous configuration.
When it comes to omitting these fields in the JSON:
- Omitting ``facetIds`` or ``metadataBlockNames`` causes the Dataverse collection to inherit the corresponding configuration from its parent.
-- Omitting ``inputLevels`` removes any existing input levels in the Dataverse collection.
+- Omitting ``inputLevels`` removes any existing custom input levels in the Dataverse collection.
To obtain an example of how these objects are included in the JSON file, download :download:`dataverse-complete-optional-params.json <../_static/api/dataverse-complete-optional-params.json>` file and modify it to suit your needs.
From c7da932cabfc3b395002bcbf373da4542b808a48 Mon Sep 17 00:00:00 2001
From: GPortas
Date: Thu, 21 Nov 2024 11:05:44 +0000
Subject: [PATCH 143/226] Added: doc tweak related to excluding metadataBlocks
in updateDataverse
---
doc/sphinx-guides/source/api/native-api.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 351688e2731..4689a46b40b 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -130,6 +130,7 @@ When it comes to omitting these fields in the JSON:
- Omitting ``facetIds`` or ``metadataBlockNames`` causes the Dataverse collection to inherit the corresponding configuration from its parent.
- Omitting ``inputLevels`` removes any existing custom input levels in the Dataverse collection.
+- Omitting the entire ``metadataBlocks`` object in the request JSON would exclude the three sub-objects, resulting in the application of the two changes described above.
To obtain an example of how these objects are included in the JSON file, download :download:`dataverse-complete-optional-params.json <../_static/api/dataverse-complete-optional-params.json>` file and modify it to suit your needs.
From b63b1ffe9bb6c511d7445ccd2cc451bb44a39815 Mon Sep 17 00:00:00 2001
From: GPortas
Date: Thu, 21 Nov 2024 11:09:02 +0000
Subject: [PATCH 144/226] Added: doc tweak explaining metadataBlocks is
optional in updateDataverse endpoint
---
doc/sphinx-guides/source/api/native-api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 4689a46b40b..e542ad8bafd 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -118,7 +118,7 @@ The fully expanded example above (without environment variables) looks like this
You should expect an HTTP 200 response and JSON beginning with "status":"OK" followed by a representation of the updated Dataverse collection.
-Same as in :ref:`create-dataverse-api`, the request JSON supports a ``metadataBlocks`` object, with the following supported sub-objects:
+Same as in :ref:`create-dataverse-api`, the request JSON supports an optional ``metadataBlocks`` object, with the following supported sub-objects:
- ``metadataBlockNames``: The names of the metadata blocks to be assigned to the Dataverse collection.
- ``inputLevels``: The names of the fields in each metadata block for which you want to add a custom configuration regarding their inclusion or requirement when creating and editing datasets in the Dataverse collection. Note that if the corresponding metadata blocks names are not specified in the ``metadataBlockNames``` field, they will be added automatically to the Dataverse collection.
From 4449679d2af3614de54a077aaaae4ea2551ed22b Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 21 Oct 2024 17:14:19 -0400
Subject: [PATCH 145/226] quick draft implementation of addressing issue 1.
from #10909.
---
.../api/imports/ImportGenericServiceBean.java | 41 +++++++++++++++----
.../api/imports/ImportServiceBean.java | 13 +++++-
.../harvest/client/HarvestingClient.java | 23 ++++++++++-
src/main/resources/db/migration/V6.4.0.1.sql | 2 +-
4 files changed, 65 insertions(+), 14 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
index 41a57665010..bf8d068a69c 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
@@ -150,12 +150,16 @@ public DatasetDTO processXML( XMLStreamReader xmlr, ForeignMetadataFormatMapping
}
- // Helper method for importing harvested Dublin Core xml.
+ // Helper methods for importing harvested Dublin Core xml.
// Dublin Core is considered a mandatory, built in metadata format mapping.
// It is distributed as required content, in reference_data.sql.
// Note that arbitrary formatting tags are supported for the outer xml
// wrapper. -- L.A. 4.5
public DatasetDTO processOAIDCxml(String DcXmlToParse) throws XMLStreamException {
+ return processOAIDCxml(DcXmlToParse, null);
+ }
+
+ public DatasetDTO processOAIDCxml(String DcXmlToParse, String oaiIdentifier) throws XMLStreamException {
// look up DC metadata mapping:
ForeignMetadataFormatMapping dublinCoreMapping = findFormatMappingByName(DCTERMS);
@@ -185,18 +189,37 @@ public DatasetDTO processOAIDCxml(String DcXmlToParse) throws XMLStreamException
datasetDTO.getDatasetVersion().setVersionState(DatasetVersion.VersionState.RELEASED);
- // Our DC import handles the contents of the dc:identifier field
- // as an "other id". In the context of OAI harvesting, we expect
- // the identifier to be a global id, so we need to rearrange that:
+ // In some cases, the identifier that we want to use for the dataset is
+ // already supplied to the method explicitly. For example, in some
+ // harvesting cases we'll want to use the OAI identifier (the identifier
+ // from the section of the OAI record) for that purpose, without
+ // expecting to find a valid persistent id in the body of the DC record:
- String identifier = getOtherIdFromDTO(datasetDTO.getDatasetVersion());
- logger.fine("Imported identifier: "+identifier);
+ String globalIdentifier;
- String globalIdentifier = reassignIdentifierAsGlobalId(identifier, datasetDTO);
- logger.fine("Detected global identifier: "+globalIdentifier);
+ if (oaiIdentifier != null) {
+ logger.fine("Attempting to use " + oaiIdentifier + " as the persistentId of the imported dataset");
+
+ globalIdentifier = reassignIdentifierAsGlobalId(oaiIdentifier, datasetDTO);
+ } else {
+ // Our DC import handles the contents of the dc:identifier field
+ // as an "other id". Unless we are using an externally supplied
+ // global id, we will be using the first such "other id" that we
+ // can parse and recognize as the global id for the imported dataset
+ // (note that this is the default behavior during harvesting),
+ // so we need to reaassign it accordingly:
+ String identifier = getOtherIdFromDTO(datasetDTO.getDatasetVersion());
+ logger.fine("Imported identifier: " + identifier);
+
+ globalIdentifier = reassignIdentifierAsGlobalId(identifier, datasetDTO);
+ logger.fine("Detected global identifier: " + globalIdentifier);
+ }
if (globalIdentifier == null) {
- throw new EJBException("Failed to find a global identifier in the OAI_DC XML record.");
+ String exceptionMsg = oaiIdentifier == null ?
+ "Failed to find a global identifier in the OAI_DC XML record." :
+ "Failed to parse the supplied identifier as a valid Persistent Id";
+ throw new EJBException(exceptionMsg);
}
return datasetDTO;
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
index ee4609a7c56..d0a0629e1ae 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
@@ -208,7 +208,13 @@ public JsonObjectBuilder handleFile(DataverseRequest dataverseRequest, Dataverse
}
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
- public Dataset doImportHarvestedDataset(DataverseRequest dataverseRequest, HarvestingClient harvestingClient, String harvestIdentifier, String metadataFormat, File metadataFile, Date oaiDateStamp, PrintWriter cleanupLog) throws ImportException, IOException {
+ public Dataset doImportHarvestedDataset(DataverseRequest dataverseRequest,
+ HarvestingClient harvestingClient,
+ String harvestIdentifier,
+ String metadataFormat,
+ File metadataFile,
+ Date oaiDateStamp,
+ PrintWriter cleanupLog) throws ImportException, IOException {
if (harvestingClient == null || harvestingClient.getDataverse() == null) {
throw new ImportException("importHarvestedDataset called with a null harvestingClient, or an invalid harvestingClient.");
}
@@ -245,7 +251,10 @@ public Dataset doImportHarvestedDataset(DataverseRequest dataverseRequest, Harve
logger.fine("importing DC "+metadataFile.getAbsolutePath());
try {
String xmlToParse = new String(Files.readAllBytes(metadataFile.toPath()));
- dsDTO = importGenericService.processOAIDCxml(xmlToParse);
+ String suggestedIdentifier = harvestingClient.isUseOaiIdentifiersAsPids()
+ ? harvestIdentifier
+ : null;
+ dsDTO = importGenericService.processOAIDCxml(xmlToParse, suggestedIdentifier);
} catch (IOException | XMLStreamException e) {
throw new ImportException("Failed to process Dublin Core XML record: "+ e.getClass() + " (" + e.getMessage() + ")");
}
diff --git a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
index 0667f5594ce..ec26729b685 100644
--- a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
+++ b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
@@ -214,6 +214,7 @@ public void setArchiveDescription(String archiveDescription) {
this.archiveDescription = archiveDescription;
}
+ @Column(columnDefinition="TEXT")
private String harvestingSet;
public String getHarvestingSet() {
@@ -252,8 +253,26 @@ public void setAllowHarvestingMissingCVV(boolean allowHarvestingMissingCVV) {
this.allowHarvestingMissingCVV = allowHarvestingMissingCVV;
}
- // TODO: do we need "orphanRemoval=true"? -- L.A. 4.4
- // TODO: should it be @OrderBy("startTime")? -- L.A. 4.4
+ private Boolean useListRecords;
+
+ public Boolean isUseListRecords() {
+ return useListRecords;
+ }
+
+ public void setUseListrecords(boolean useListRecords) {
+ this.useListRecords = useListRecords;
+ }
+
+ private Boolean useOaiIdAsPid;
+
+ public Boolean isUseOaiIdentifiersAsPids() {
+ return useOaiIdAsPid;
+ }
+
+ public void setUseOaiIdentifiersAsPids(boolean useOaiIdAsPid) {
+ this.useOaiIdAsPid = useOaiIdAsPid;
+ }
+
@OneToMany(mappedBy="harvestingClient", cascade={CascadeType.REMOVE, CascadeType.MERGE, CascadeType.PERSIST})
@OrderBy("id")
private List harvestHistory;
diff --git a/src/main/resources/db/migration/V6.4.0.1.sql b/src/main/resources/db/migration/V6.4.0.1.sql
index 0bcd87dd736..438c52a192e 100644
--- a/src/main/resources/db/migration/V6.4.0.1.sql
+++ b/src/main/resources/db/migration/V6.4.0.1.sql
@@ -1,4 +1,4 @@
-- Adding a case-insensitive index related to #11003
--
-CREATE UNIQUE INDEX IF NOT EXISTS INDEX_DVOBJECT_authority_protocol_upper_identifier ON dvobject (authority, protocol, UPPER(identifier));
\ No newline at end of file
+CREATE UNIQUE INDEX IF NOT EXISTS INDEX_DVOBJECT_authority_protocol_upper_identifier ON dvobject (authority, protocol, UPPER(identifier));
From 2656ccdcc0c7f59eebfcf52e82c011c829b7dda7 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Tue, 29 Oct 2024 10:27:09 -0400
Subject: [PATCH 146/226] Adding the new client options to the json printer and
parser #10909
---
.../java/edu/harvard/iq/dataverse/util/json/JsonParser.java | 2 ++
.../java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java | 2 ++
2 files changed, 4 insertions(+)
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 3f60317655a..8bb8fd93dd1 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
@@ -1052,6 +1052,8 @@ public String parseHarvestingClient(JsonObject obj, HarvestingClient harvestingC
harvestingClient.setHarvestingSet(obj.getString("set",null));
harvestingClient.setCustomHttpHeaders(obj.getString("customHeaders", null));
harvestingClient.setAllowHarvestingMissingCVV(obj.getBoolean("allowHarvestingMissingCVV", false));
+ harvestingClient.setUseListrecords(obj.getBoolean("useListRecords", false));
+ harvestingClient.setUseOaiIdentifiersAsPids(obj.getBoolean("useOaiIdentifiersAsPids", false));
return dataverseAlias;
}
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 f884d313d64..6666a7f0e7d 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
@@ -1013,6 +1013,8 @@ public static JsonObjectBuilder json(HarvestingClient harvestingClient) {
add("status", harvestingClient.isHarvestingNow() ? "inProgress" : "inActive").
add("customHeaders", harvestingClient.getCustomHttpHeaders()).
add("allowHarvestingMissingCVV", harvestingClient.getAllowHarvestingMissingCVV()).
+ add("useListRecords", harvestingClient.isUseListRecords()).
+ add("useOaiIdentifiersAsPids", harvestingClient.isUseOaiIdentifiersAsPids()).
add("lastHarvest", harvestingClient.getLastHarvestTime() == null ? null : harvestingClient.getLastHarvestTime().toString()).
add("lastResult", harvestingClient.getLastResult()).
add("lastSuccessful", harvestingClient.getLastSuccessfulHarvestTime() == null ? null : harvestingClient.getLastSuccessfulHarvestTime().toString()).
From 5c043cdb642bc9fa17cc0620292b11004813ed56 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Fri, 1 Nov 2024 10:26:39 -0400
Subject: [PATCH 147/226] we DO want to include the persistent id in the search
cards for all harvested datasets. #10909. (that whole block of extra checks
on the harvest "style" may be redundant by now - I'll think about it)
---
src/main/java/edu/harvard/iq/dataverse/DataCitation.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataCitation.java b/src/main/java/edu/harvard/iq/dataverse/DataCitation.java
index 3977023fc4b..02fb59751fb 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataCitation.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataCitation.java
@@ -792,6 +792,7 @@ private GlobalId getPIDFrom(DatasetVersion dsv, DvObject dv) {
if (!dsv.getDataset().isHarvested()
|| HarvestingClient.HARVEST_STYLE_VDC.equals(dsv.getDataset().getHarvestedFrom().getHarvestStyle())
|| HarvestingClient.HARVEST_STYLE_ICPSR.equals(dsv.getDataset().getHarvestedFrom().getHarvestStyle())
+ || HarvestingClient.HARVEST_STYLE_DEFAULT.equals(dsv.getDataset().getHarvestedFrom().getHarvestStyle())
|| HarvestingClient.HARVEST_STYLE_DATAVERSE
.equals(dsv.getDataset().getHarvestedFrom().getHarvestStyle())) {
if(!isDirect()) {
From b7efee0cfbd45104c5432b69a2732def5889b868 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Fri, 22 Nov 2024 19:50:21 -0500
Subject: [PATCH 148/226] a flyway script for the "use the oai id as the pid"
harvesting client flag.
---
src/main/resources/db/migration/V6.4.0.3.sql | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 src/main/resources/db/migration/V6.4.0.3.sql
diff --git a/src/main/resources/db/migration/V6.4.0.3.sql b/src/main/resources/db/migration/V6.4.0.3.sql
new file mode 100644
index 00000000000..307d8ed206c
--- /dev/null
+++ b/src/main/resources/db/migration/V6.4.0.3.sql
@@ -0,0 +1,2 @@
+-- Add this boolean flag to accommodate a new harvesting client feature
+ALTER TABLE harvestingclient ADD COLUMN IF NOT EXISTS useOaiIdAsPid BOOLEAN DEFAULT FALSE;
From eca03896f3d0a1e36505ea958e7dc77c118d62c5 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Fri, 22 Nov 2024 19:53:25 -0500
Subject: [PATCH 149/226] removed the part of the cherry-picked commit that I'm
not going to need in this branch.
---
.../dataverse/harvest/client/HarvestingClient.java | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
index ec26729b685..de9cc7c0db6 100644
--- a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
+++ b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
@@ -253,19 +253,9 @@ public void setAllowHarvestingMissingCVV(boolean allowHarvestingMissingCVV) {
this.allowHarvestingMissingCVV = allowHarvestingMissingCVV;
}
- private Boolean useListRecords;
+ private boolean useOaiIdAsPid;
- public Boolean isUseListRecords() {
- return useListRecords;
- }
-
- public void setUseListrecords(boolean useListRecords) {
- this.useListRecords = useListRecords;
- }
-
- private Boolean useOaiIdAsPid;
-
- public Boolean isUseOaiIdentifiersAsPids() {
+ public boolean isUseOaiIdentifiersAsPids() {
return useOaiIdAsPid;
}
From 29114175c316dda01e0e240d63951cb89a4f9fdd Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Fri, 22 Nov 2024 19:55:40 -0500
Subject: [PATCH 150/226] removed pieces of another cherry-picked commit not
needed in this branch.
---
src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java | 1 -
.../java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java | 1 -
2 files changed, 2 deletions(-)
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 8bb8fd93dd1..232b7431a24 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
@@ -1052,7 +1052,6 @@ public String parseHarvestingClient(JsonObject obj, HarvestingClient harvestingC
harvestingClient.setHarvestingSet(obj.getString("set",null));
harvestingClient.setCustomHttpHeaders(obj.getString("customHeaders", null));
harvestingClient.setAllowHarvestingMissingCVV(obj.getBoolean("allowHarvestingMissingCVV", false));
- harvestingClient.setUseListrecords(obj.getBoolean("useListRecords", false));
harvestingClient.setUseOaiIdentifiersAsPids(obj.getBoolean("useOaiIdentifiersAsPids", false));
return dataverseAlias;
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 6666a7f0e7d..91af13c79a3 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
@@ -1013,7 +1013,6 @@ public static JsonObjectBuilder json(HarvestingClient harvestingClient) {
add("status", harvestingClient.isHarvestingNow() ? "inProgress" : "inActive").
add("customHeaders", harvestingClient.getCustomHttpHeaders()).
add("allowHarvestingMissingCVV", harvestingClient.getAllowHarvestingMissingCVV()).
- add("useListRecords", harvestingClient.isUseListRecords()).
add("useOaiIdentifiersAsPids", harvestingClient.isUseOaiIdentifiersAsPids()).
add("lastHarvest", harvestingClient.getLastHarvestTime() == null ? null : harvestingClient.getLastHarvestTime().toString()).
add("lastResult", harvestingClient.getLastResult()).
From 0967b7a8363381d8e6f5c52a230215f87cf4f671 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Fri, 22 Nov 2024 20:20:35 -0500
Subject: [PATCH 151/226] A "hybrid" implementation of the support for using
OAI identifiers for the pid of the imported datasets - merging 2 different
approaches implemented in the PRs
---
.../api/imports/ImportGenericServiceBean.java | 26 ++++++++++++++++---
.../api/imports/ImportServiceBean.java | 7 ++---
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
index bf8d068a69c..7bce0947a0e 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
@@ -156,10 +156,10 @@ public DatasetDTO processXML( XMLStreamReader xmlr, ForeignMetadataFormatMapping
// Note that arbitrary formatting tags are supported for the outer xml
// wrapper. -- L.A. 4.5
public DatasetDTO processOAIDCxml(String DcXmlToParse) throws XMLStreamException {
- return processOAIDCxml(DcXmlToParse, null);
+ return processOAIDCxml(DcXmlToParse, null, false);
}
- public DatasetDTO processOAIDCxml(String DcXmlToParse, String oaiIdentifier) throws XMLStreamException {
+ public DatasetDTO processOAIDCxml(String DcXmlToParse, String oaiIdentifier, boolean preferSuppliedIdentifier) throws XMLStreamException {
// look up DC metadata mapping:
ForeignMetadataFormatMapping dublinCoreMapping = findFormatMappingByName(DCTERMS);
@@ -208,7 +208,7 @@ public DatasetDTO processOAIDCxml(String DcXmlToParse, String oaiIdentifier) thr
// can parse and recognize as the global id for the imported dataset
// (note that this is the default behavior during harvesting),
// so we need to reaassign it accordingly:
- String identifier = getOtherIdFromDTO(datasetDTO.getDatasetVersion());
+ String identifier = selectIdentifier(datasetDTO.getDatasetVersion(), oaiIdentifier, preferSuppliedIdentifier);
logger.fine("Imported identifier: " + identifier);
globalIdentifier = reassignIdentifierAsGlobalId(identifier, datasetDTO);
@@ -367,8 +367,16 @@ private FieldDTO makeDTO(DatasetFieldType dataverseFieldType, FieldDTO value, St
return value;
}
- private String getOtherIdFromDTO(DatasetVersionDTO datasetVersionDTO) {
+ private String selectIdentifier(DatasetVersionDTO datasetVersionDTO, String suppliedIdentifier, boolean preferSuppliedIdentifier) {
List otherIds = new ArrayList<>();
+
+ if (suppliedIdentifier != null && preferSuppliedIdentifier) {
+ // This supplied identifier (in practice, his is likely the OAI-PMH
+ // identifier from the section) will be our first
+ // choice candidate for the pid of the imported dataset:
+ otherIds.add(suppliedIdentifier);
+ }
+
for (Map.Entry entry : datasetVersionDTO.getMetadataBlocks().entrySet()) {
String key = entry.getKey();
MetadataBlockDTO value = entry.getValue();
@@ -386,6 +394,16 @@ private String getOtherIdFromDTO(DatasetVersionDTO datasetVersionDTO) {
}
}
}
+
+ if (suppliedIdentifier != null && !preferSuppliedIdentifier) {
+ // Unless specifically instructed to prefer this extra identifier
+ // (in practice, this is likely the OAI-PMH identifier from the
+ // section), we will try to use it as the *last*
+ // possible candidate for the pid, so, adding it to the end of the
+ // list:
+ otherIds.add(suppliedIdentifier);
+ }
+
if (!otherIds.isEmpty()) {
// We prefer doi or hdl identifiers like "doi:10.7910/DVN/1HE30F"
for (String otherId : otherIds) {
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
index d0a0629e1ae..7dc2aed799e 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportServiceBean.java
@@ -250,11 +250,8 @@ public Dataset doImportHarvestedDataset(DataverseRequest dataverseRequest,
} else if ("dc".equalsIgnoreCase(metadataFormat) || "oai_dc".equals(metadataFormat)) {
logger.fine("importing DC "+metadataFile.getAbsolutePath());
try {
- String xmlToParse = new String(Files.readAllBytes(metadataFile.toPath()));
- String suggestedIdentifier = harvestingClient.isUseOaiIdentifiersAsPids()
- ? harvestIdentifier
- : null;
- dsDTO = importGenericService.processOAIDCxml(xmlToParse, suggestedIdentifier);
+ String xmlToParse = new String(Files.readAllBytes(metadataFile.toPath()));
+ dsDTO = importGenericService.processOAIDCxml(xmlToParse, harvestIdentifier, harvestingClient.isUseOaiIdentifiersAsPids());
} catch (IOException | XMLStreamException e) {
throw new ImportException("Failed to process Dublin Core XML record: "+ e.getClass() + " (" + e.getMessage() + ")");
}
From 00943e1e2a6ce9825dbc29d898431664cad07498 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Sun, 24 Nov 2024 20:35:27 -0500
Subject: [PATCH 152/226] guide entry
---
doc/sphinx-guides/source/api/native-api.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 99a8a9f7cf4..1f36691be0d 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -5246,6 +5246,7 @@ Shows a Harvesting Client with a defined nickname::
"dataverseAlias": "fooData",
"nickName": "myClient",
"set": "fooSet",
+ "useOaiIdentifiersAsPids": false
"schedule": "none",
"status": "inActive",
"lastHarvest": "Thu Oct 13 14:48:57 EDT 2022",
@@ -5280,6 +5281,7 @@ The following optional fields are supported:
- style: Defaults to "default" - a generic OAI archive. (Make sure to use "dataverse" when configuring harvesting from another Dataverse installation).
- customHeaders: This can be used to configure this client with a specific HTTP header that will be added to every OAI request. This is to accommodate a use case where the remote server requires this header to supply some form of a token in order to offer some content not available to other clients. See the example below. Multiple headers can be supplied separated by `\\n` - actual "backslash" and "n" characters, not a single "new line" character.
- allowHarvestingMissingCVV: Flag to allow datasets to be harvested with Controlled Vocabulary Values that existed in the originating Dataverse Project but are not in the harvesting Dataverse Project. (Default is false). Currently only settable using API.
+- useOaiIdentifiersAsPids: Defaults to false; if set to true, Harvester will attempt to use the identifier from the OAI-PMH record header as the **first choice** for the persistent id of the harvested dataset. When set to false, Dataverse will still attempt to use this identifier, but only if none of the `` entries in the OAI_DC record contain a valid persistent id (this is new as of v6.5).
Generally, the API will accept the output of the GET version of the API for an existing client as valid input, but some fields will be ignored. For example, as of writing this there is no way to configure a harvesting schedule via this API.
From cc7fb45d43f8b842d079d0a688fc2487bd0f56f8 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Sun, 24 Nov 2024 20:54:32 -0500
Subject: [PATCH 153/226] release note.
---
doc/release-notes/11049-oai-identifiers-as-pids.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 doc/release-notes/11049-oai-identifiers-as-pids.md
diff --git a/doc/release-notes/11049-oai-identifiers-as-pids.md b/doc/release-notes/11049-oai-identifiers-as-pids.md
new file mode 100644
index 00000000000..2f857bf2198
--- /dev/null
+++ b/doc/release-notes/11049-oai-identifiers-as-pids.md
@@ -0,0 +1,5 @@
+## When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
+
+This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid dois or handles as the OAI-PMH record header identifiers.
+
+It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides for more information.
\ No newline at end of file
From d6fc24022d4cd0cd6759064b7dd01e6885ad7c12 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Sun, 24 Nov 2024 21:12:58 -0500
Subject: [PATCH 154/226] json files for the new tests (from PR #11010 by
@stevenferey)
---
.../json/importGenericWithOtherId.json | 307 ++++++++++++++++++
.../json/importGenericWithoutOtherId.json | 258 +++++++++++++++
2 files changed, 565 insertions(+)
create mode 100644 src/test/resources/json/importGenericWithOtherId.json
create mode 100644 src/test/resources/json/importGenericWithoutOtherId.json
diff --git a/src/test/resources/json/importGenericWithOtherId.json b/src/test/resources/json/importGenericWithOtherId.json
new file mode 100644
index 00000000000..af9241393e9
--- /dev/null
+++ b/src/test/resources/json/importGenericWithOtherId.json
@@ -0,0 +1,307 @@
+{
+ "UNF": "UNF",
+ "createTime": "2014-11-12 12:17:55 -05",
+ "distributionDate": "Distribution Date",
+ "id": 2,
+ "lastUpdateTime": "2014-11-12 12:20:32 -05",
+ "metadataBlocks": {
+ "astrophysics": {
+ "displayName": "Astronomy and Astrophysics Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "controlledVocabulary",
+ "typeName": "astroType",
+ "value": [
+ "Image",
+ "Mosaic",
+ "EventList"
+ ]
+ }
+ ]
+ },
+ "citation": {
+ "displayName": "Citation Metadata",
+ "fields": [
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "title",
+ "value": "My Dataset"
+ },
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "author",
+ "value": [
+ {
+ "authorAffiliation": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorAffiliation",
+ "value": "Top"
+ },
+ "authorIdentifier": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorIdentifier",
+ "value": "ellenid"
+ },
+ "authorIdentifierScheme": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "authorIdentifierScheme",
+ "value": "ORCID"
+ },
+ "authorName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorName",
+ "value": "Privileged, Pete"
+ }
+ },
+ {
+ "authorAffiliation": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorAffiliation",
+ "value": "Bottom"
+ },
+ "authorIdentifier": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorIdentifier",
+ "value": "audreyId"
+ },
+ "authorIdentifierScheme": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "authorIdentifierScheme",
+ "value": "DAISY"
+ },
+ "authorName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorName",
+ "value": "Awesome, Audrey"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": true,
+ "typeClass": "primitive",
+ "typeName": "datasetContact",
+ "value": [
+ "pete@malinator.com"
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "dsDescription",
+ "value": "Here is my description"
+ },
+ {
+ "multiple": true,
+ "typeClass": "controlledVocabulary",
+ "typeName": "subject",
+ "value": [
+ "Arts and Humanities",
+ "Astronomy and Astrophysics",
+ "Business and Management"
+ ]
+ },
+ {
+ "multiple": true,
+ "typeClass": "primitive",
+ "typeName": "keyword",
+ "value": [
+ "keyword1",
+ "keyword2"
+ ]
+ },
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "otherId",
+ "value": [
+ {
+ "otherIdAgency": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdAgency",
+ "value": "my agency"
+ },
+ "otherIdValue": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdValue",
+ "value": "otherId"
+ }
+ },
+ {
+ "otherIdAgency": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdAgency",
+ "value": "another agency"
+ },
+ "otherIdValue": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdValue",
+ "value": "otherId2"
+ }
+ },
+ {
+ "otherIdAgency": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdAgency",
+ "value": "another agency"
+ },
+ "otherIdValue": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "otherIdValue",
+ "value": "doi:10.7910/DVN/TJCLKP"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "depositor",
+ "value": "Ellen K"
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "dateOfDeposit",
+ "value": "2014-11-12"
+ }
+ ]
+ },
+ "geospatial": {
+ "displayName": "Geospatial Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "geographicCoverage",
+ "value": [
+ {
+ "city": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "city",
+ "value": "Arlington"
+ },
+ "country": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "country",
+ "value": "United States"
+ },
+ "state": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "state",
+ "value": "MA"
+ }
+ },
+ {
+ "city": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "city",
+ "value": "beachcity"
+ },
+ "country": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "country",
+ "value": "Aruba"
+ },
+ "state": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "state",
+ "value": "beach"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "compound",
+ "typeName": "geographicBoundingBox",
+ "value":
+ {
+ "eastLongitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "eastLongitude",
+ "value": "23"
+ },
+ "northLatitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "northLatitude",
+ "value": "786"
+ },
+ "southLatitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "southLatitude",
+ "value": "34"
+ },
+ "westLongitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "westLongitude",
+ "value": "45"
+ }
+ }
+
+ }
+ ]
+ },
+ "socialscience": {
+ "displayName": "Social Science and Humanities Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "software",
+ "value": [
+ {
+ "softwareName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "softwareName",
+ "value": "softwareName"
+ },
+ "softwareVersion": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "softwareVersion",
+ "value": "software version"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "unitOfAnalysis",
+ "value": "unit of analysis"
+ }
+ ]
+ }
+ },
+ "productionDate": "Production Date",
+ "versionState": "DRAFT"
+ }
diff --git a/src/test/resources/json/importGenericWithoutOtherId.json b/src/test/resources/json/importGenericWithoutOtherId.json
new file mode 100644
index 00000000000..ceb2263c2cf
--- /dev/null
+++ b/src/test/resources/json/importGenericWithoutOtherId.json
@@ -0,0 +1,258 @@
+{
+ "UNF": "UNF",
+ "createTime": "2014-11-12 12:17:55 -05",
+ "distributionDate": "Distribution Date",
+ "id": 2,
+ "lastUpdateTime": "2014-11-12 12:20:32 -05",
+ "metadataBlocks": {
+ "astrophysics": {
+ "displayName": "Astronomy and Astrophysics Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "controlledVocabulary",
+ "typeName": "astroType",
+ "value": [
+ "Image",
+ "Mosaic",
+ "EventList"
+ ]
+ }
+ ]
+ },
+ "citation": {
+ "displayName": "Citation Metadata",
+ "fields": [
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "title",
+ "value": "My Dataset"
+ },
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "author",
+ "value": [
+ {
+ "authorAffiliation": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorAffiliation",
+ "value": "Top"
+ },
+ "authorIdentifier": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorIdentifier",
+ "value": "ellenid"
+ },
+ "authorIdentifierScheme": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "authorIdentifierScheme",
+ "value": "ORCID"
+ },
+ "authorName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorName",
+ "value": "Privileged, Pete"
+ }
+ },
+ {
+ "authorAffiliation": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorAffiliation",
+ "value": "Bottom"
+ },
+ "authorIdentifier": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorIdentifier",
+ "value": "audreyId"
+ },
+ "authorIdentifierScheme": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "authorIdentifierScheme",
+ "value": "DAISY"
+ },
+ "authorName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "authorName",
+ "value": "Awesome, Audrey"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": true,
+ "typeClass": "primitive",
+ "typeName": "datasetContact",
+ "value": [
+ "pete@malinator.com"
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "dsDescription",
+ "value": "Here is my description"
+ },
+ {
+ "multiple": true,
+ "typeClass": "controlledVocabulary",
+ "typeName": "subject",
+ "value": [
+ "Arts and Humanities",
+ "Astronomy and Astrophysics",
+ "Business and Management"
+ ]
+ },
+ {
+ "multiple": true,
+ "typeClass": "primitive",
+ "typeName": "keyword",
+ "value": [
+ "keyword1",
+ "keyword2"
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "depositor",
+ "value": "Ellen K"
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "dateOfDeposit",
+ "value": "2014-11-12"
+ }
+ ]
+ },
+ "geospatial": {
+ "displayName": "Geospatial Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "geographicCoverage",
+ "value": [
+ {
+ "city": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "city",
+ "value": "Arlington"
+ },
+ "country": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "country",
+ "value": "United States"
+ },
+ "state": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "state",
+ "value": "MA"
+ }
+ },
+ {
+ "city": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "city",
+ "value": "beachcity"
+ },
+ "country": {
+ "multiple": false,
+ "typeClass": "controlledVocabulary",
+ "typeName": "country",
+ "value": "Aruba"
+ },
+ "state": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "state",
+ "value": "beach"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "compound",
+ "typeName": "geographicBoundingBox",
+ "value":
+ {
+ "eastLongitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "eastLongitude",
+ "value": "23"
+ },
+ "northLatitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "northLatitude",
+ "value": "786"
+ },
+ "southLatitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "southLatitude",
+ "value": "34"
+ },
+ "westLongitude": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "westLongitude",
+ "value": "45"
+ }
+ }
+
+ }
+ ]
+ },
+ "socialscience": {
+ "displayName": "Social Science and Humanities Metadata",
+ "fields": [
+ {
+ "multiple": true,
+ "typeClass": "compound",
+ "typeName": "software",
+ "value": [
+ {
+ "softwareName": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "softwareName",
+ "value": "softwareName"
+ },
+ "softwareVersion": {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "softwareVersion",
+ "value": "software version"
+ }
+ }
+ ]
+ },
+ {
+ "multiple": false,
+ "typeClass": "primitive",
+ "typeName": "unitOfAnalysis",
+ "value": "unit of analysis"
+ }
+ ]
+ }
+ },
+ "productionDate": "Production Date",
+ "versionState": "DRAFT"
+ }
From 86b226008e3ba53b0a0aefb0fd0fe9b15087c3f3 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Sun, 24 Nov 2024 21:38:03 -0500
Subject: [PATCH 155/226] tests for selecting persistent ids in the
GenericImportService (from PR #11010 by @stevenferey)
---
.../api/imports/ImportGenericServiceBean.java | 4 ++
.../imports/ImportGenericServiceBeanTest.java | 53 ++++++++++++++++++-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
index 7bce0947a0e..aa5b25e3967 100644
--- a/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBean.java
@@ -367,6 +367,10 @@ private FieldDTO makeDTO(DatasetFieldType dataverseFieldType, FieldDTO value, St
return value;
}
+ public String selectIdentifier(DatasetVersionDTO datasetVersionDTO, String suppliedIdentifier) {
+ return selectIdentifier(datasetVersionDTO, suppliedIdentifier, false);
+ }
+
private String selectIdentifier(DatasetVersionDTO datasetVersionDTO, String suppliedIdentifier, boolean preferSuppliedIdentifier) {
List otherIds = new ArrayList<>();
diff --git a/src/test/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBeanTest.java b/src/test/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBeanTest.java
index 44739f3f62a..acf5d970358 100644
--- a/src/test/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBeanTest.java
+++ b/src/test/java/edu/harvard/iq/dataverse/api/imports/ImportGenericServiceBeanTest.java
@@ -1,6 +1,13 @@
package edu.harvard.iq.dataverse.api.imports;
import edu.harvard.iq.dataverse.api.dto.DatasetDTO;
+import edu.harvard.iq.dataverse.api.dto.DatasetVersionDTO;
+
+import org.apache.commons.io.FileUtils;
+import com.google.gson.Gson;
+import java.io.File;
+import java.io.IOException;
+
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
@@ -8,6 +15,8 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
+import java.nio.charset.StandardCharsets;
+
@ExtendWith(MockitoExtension.class)
public class ImportGenericServiceBeanTest {
@@ -15,7 +24,47 @@ public class ImportGenericServiceBeanTest {
private ImportGenericServiceBean importGenericService;
@Test
- public void testReassignIdentifierAsGlobalId() {
+ void testIdentifierHarvestableWithOtherID() throws IOException {
+ // "otherIdValue" containing the value : doi:10.7910/DVN/TJCLKP
+ File file = new File("src/test/resources/json/importGenericWithOtherId.json");
+ String text = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
+ DatasetVersionDTO dto = new Gson().fromJson(text, DatasetVersionDTO.class);
+
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "https://doi.org/10.7910/DVN/TJCLKP"));
+ // junk or null
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "junk"));
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, null));
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "http://www.example.com"));
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "https://dataverse.org"));
+ }
+
+ @Test
+ void testIdentifierHarvestableWithoutOtherID() throws IOException {
+ // Does not contain data of type "otherIdValue"
+ File file = new File("src/test/resources/json/importGenericWithoutOtherId.json");
+ String text = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
+ DatasetVersionDTO dto = new Gson().fromJson(text, DatasetVersionDTO.class);
+
+ // non-URL
+ assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "doi:10.7910/DVN/TJCLKP"));
+ assertEquals("hdl:10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "hdl:10.7910/DVN/TJCLKP"));
+ // HTTPS
+ assertEquals("https://doi.org/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "https://doi.org/10.7910/DVN/TJCLKP"));
+ assertEquals("https://dx.doi.org/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "https://dx.doi.org/10.7910/DVN/TJCLKP"));
+ assertEquals("https://hdl.handle.net/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "https://hdl.handle.net/10.7910/DVN/TJCLKP"));
+ // HTTP (no S)
+ assertEquals("http://doi.org/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "http://doi.org/10.7910/DVN/TJCLKP"));
+ assertEquals("http://dx.doi.org/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "http://dx.doi.org/10.7910/DVN/TJCLKP"));
+ assertEquals("http://hdl.handle.net/10.7910/DVN/TJCLKP", importGenericService.selectIdentifier(dto, "http://hdl.handle.net/10.7910/DVN/TJCLKP"));
+ // junk or null
+ assertNull(importGenericService.selectIdentifier(dto, "junk"));
+ assertNull(importGenericService.selectIdentifier(dto, null));
+ assertNull(importGenericService.selectIdentifier(dto, "http://www.example.com"));
+ assertNull(importGenericService.selectIdentifier(dto, "https://dataverse.org"));
+ }
+
+ @Test
+ void testReassignIdentifierAsGlobalId() {
// non-URL
assertEquals("doi:10.7910/DVN/TJCLKP", importGenericService.reassignIdentifierAsGlobalId("doi:10.7910/DVN/TJCLKP", new DatasetDTO()));
assertEquals("hdl:10.7910/DVN/TJCLKP", importGenericService.reassignIdentifierAsGlobalId("hdl:10.7910/DVN/TJCLKP", new DatasetDTO()));
@@ -29,6 +78,8 @@ public void testReassignIdentifierAsGlobalId() {
assertEquals("hdl:10.7910/DVN/TJCLKP", importGenericService.reassignIdentifierAsGlobalId("http://hdl.handle.net/10.7910/DVN/TJCLKP", new DatasetDTO()));
// junk
assertNull(importGenericService.reassignIdentifierAsGlobalId("junk", new DatasetDTO()));
+ assertNull(importGenericService.reassignIdentifierAsGlobalId("http://www.example.com", new DatasetDTO()));
+ assertNull(importGenericService.reassignIdentifierAsGlobalId("https://dataverse.org", new DatasetDTO()));
}
}
From 115c88eb37d6288d9af1d9a8a2abacd230407700 Mon Sep 17 00:00:00 2001
From: landreev
Date: Mon, 25 Nov 2024 11:07:47 -0500
Subject: [PATCH 156/226] Update
doc/release-notes/11049-oai-identifiers-as-pids.md
Co-authored-by: Philip Durbin
---
doc/release-notes/11049-oai-identifiers-as-pids.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/11049-oai-identifiers-as-pids.md b/doc/release-notes/11049-oai-identifiers-as-pids.md
index 2f857bf2198..8b53a461a70 100644
--- a/doc/release-notes/11049-oai-identifiers-as-pids.md
+++ b/doc/release-notes/11049-oai-identifiers-as-pids.md
@@ -2,4 +2,4 @@
This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid dois or handles as the OAI-PMH record header identifiers.
-It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides for more information.
\ No newline at end of file
+It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides, #11049 and #10982 for more information.
\ No newline at end of file
From a295cc4a34b4836b087fd662e932838ddb278a87 Mon Sep 17 00:00:00 2001
From: landreev
Date: Mon, 25 Nov 2024 11:08:07 -0500
Subject: [PATCH 157/226] Update doc/sphinx-guides/source/api/native-api.rst
Co-authored-by: Philip Durbin
---
doc/sphinx-guides/source/api/native-api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index 1f36691be0d..641e443e54a 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -5281,7 +5281,7 @@ The following optional fields are supported:
- style: Defaults to "default" - a generic OAI archive. (Make sure to use "dataverse" when configuring harvesting from another Dataverse installation).
- customHeaders: This can be used to configure this client with a specific HTTP header that will be added to every OAI request. This is to accommodate a use case where the remote server requires this header to supply some form of a token in order to offer some content not available to other clients. See the example below. Multiple headers can be supplied separated by `\\n` - actual "backslash" and "n" characters, not a single "new line" character.
- allowHarvestingMissingCVV: Flag to allow datasets to be harvested with Controlled Vocabulary Values that existed in the originating Dataverse Project but are not in the harvesting Dataverse Project. (Default is false). Currently only settable using API.
-- useOaiIdentifiersAsPids: Defaults to false; if set to true, Harvester will attempt to use the identifier from the OAI-PMH record header as the **first choice** for the persistent id of the harvested dataset. When set to false, Dataverse will still attempt to use this identifier, but only if none of the `` entries in the OAI_DC record contain a valid persistent id (this is new as of v6.5).
+- useOaiIdentifiersAsPids: Defaults to false; if set to true, the harvester will attempt to use the identifier from the OAI-PMH record header as the **first choice** for the persistent id of the harvested dataset. When set to false, Dataverse will still attempt to use this identifier, but only if none of the `` entries in the OAI_DC record contain a valid persistent id (this is new as of v6.5).
Generally, the API will accept the output of the GET version of the API for an existing client as valid input, but some fields will be ignored. For example, as of writing this there is no way to configure a harvesting schedule via this API.
From 3c4628786f18c235707afc6a282969da11ed4c9d Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 11:22:01 -0500
Subject: [PATCH 158/226] reverted the flyway script back to its original state
(a newline was added when resolving a conflict with a cherry-picked commit,
which of course changes the checksum)
---
src/main/resources/db/migration/V6.4.0.1.sql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/db/migration/V6.4.0.1.sql b/src/main/resources/db/migration/V6.4.0.1.sql
index 438c52a192e..0bcd87dd736 100644
--- a/src/main/resources/db/migration/V6.4.0.1.sql
+++ b/src/main/resources/db/migration/V6.4.0.1.sql
@@ -1,4 +1,4 @@
-- Adding a case-insensitive index related to #11003
--
-CREATE UNIQUE INDEX IF NOT EXISTS INDEX_DVOBJECT_authority_protocol_upper_identifier ON dvobject (authority, protocol, UPPER(identifier));
+CREATE UNIQUE INDEX IF NOT EXISTS INDEX_DVOBJECT_authority_protocol_upper_identifier ON dvobject (authority, protocol, UPPER(identifier));
\ No newline at end of file
From 8a361be347e639aeedc68b6f9bc93c18e2f6eaaf Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 11:26:37 -0500
Subject: [PATCH 159/226] another cherry-picked commit not needed in this
branch.
---
.../harvard/iq/dataverse/harvest/client/HarvestingClient.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
index de9cc7c0db6..7280b6af129 100644
--- a/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
+++ b/src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvestingClient.java
@@ -214,7 +214,6 @@ public void setArchiveDescription(String archiveDescription) {
this.archiveDescription = archiveDescription;
}
- @Column(columnDefinition="TEXT")
private String harvestingSet;
public String getHarvestingSet() {
From f0e19168ebedf708e3e0e0df1876b57ca378af88 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Mon, 25 Nov 2024 15:33:28 -0500
Subject: [PATCH 160/226] #11044 refresh facet array
---
.../iq/dataverse/DataverseFacetServiceBean.java | 14 ++++++++++----
.../impl/AbstractWriteDataverseCommand.java | 3 ++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
index 5c77989f6d6..67dc183ba66 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
@@ -4,6 +4,8 @@
import java.util.List;
import jakarta.ejb.EJB;
import jakarta.ejb.Stateless;
+import jakarta.ejb.TransactionAttribute;
+import jakarta.ejb.TransactionAttributeType;
import jakarta.inject.Named;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
@@ -42,23 +44,27 @@ public void delete(DataverseFacet dataverseFacet) {
cache.invalidate();
}
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void deleteFacetsFor( Dataverse d ) {
em.createNamedQuery("DataverseFacet.removeByOwnerId")
.setParameter("ownerId", d.getId())
.executeUpdate();
cache.invalidate(d.getId());
-
+
}
- public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Dataverse ownerDv) {
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Dataverse ownerDv) {
DataverseFacet dataverseFacet = new DataverseFacet();
dataverseFacet.setDisplayOrder(displayOrder);
dataverseFacet.setDatasetFieldType(fieldType);
dataverseFacet.setDataverse(ownerDv);
-
- ownerDv.getDataverseFacets().add(dataverseFacet);
+
em.persist(dataverseFacet);
+ ownerDv.getDataverseFacets().add(dataverseFacet);
+ em.merge(ownerDv);
+ cache.invalidate(ownerDv.getId());
return dataverseFacet;
}
diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
index 40c2abf5d21..ede07ba5ab7 100644
--- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
+++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
@@ -56,7 +56,8 @@ public Dataverse execute(CommandContext ctxt) throws CommandException {
if (facets != null) {
ctxt.facets().deleteFacetsFor(dataverse);
-
+ dataverse.setDataverseFacets(new ArrayList<>());
+
if (!facets.isEmpty()) {
dataverse.setFacetRoot(true);
}
From e8093c62089460f8cadd6c8b9fb9e6da1530c60f Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 17:30:30 -0500
Subject: [PATCH 161/226] Per review feedback, made it impossible to supply the
file sizes via the /addFiles API (i.e., we don't want to trust the users of
the direct s3 upload api when it comes to file sizes). #10977
---
.../datasetutility/AddReplaceFileHelper.java | 48 ++++++++++++-------
.../dataverse/globus/GlobusServiceBean.java | 2 +-
2 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java b/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java
index 3943e3ad7d8..6b98848021c 100644
--- a/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java
+++ b/src/main/java/edu/harvard/iq/dataverse/datasetutility/AddReplaceFileHelper.java
@@ -136,10 +136,7 @@ public class AddReplaceFileHelper{
private String newFileName; // step 30
private String newFileContentType; // step 30
private String newStorageIdentifier; // step 30
- private String newCheckSum; // step 30
- private ChecksumType newCheckSumType; //step 30
- private Long suppliedFileSize = null;
-
+
// -- Optional
private DataFile fileToReplace; // step 25
@@ -147,6 +144,7 @@ public class AddReplaceFileHelper{
private DatasetVersion clone;
List initialFileList;
List finalFileList;
+ private boolean trustSuppliedFileSizes;
// -----------------------------------
// Ingested files
@@ -611,18 +609,9 @@ private boolean runAddReplacePhase1(Dataset owner,
return false;
}
- if (optionalFileParams != null) {
- if (optionalFileParams.hasCheckSum()) {
- newCheckSum = optionalFileParams.getCheckSum();
- newCheckSumType = optionalFileParams.getCheckSumType();
- }
- if (optionalFileParams.hasFileSize()) {
- suppliedFileSize = optionalFileParams.getFileSize();
- }
- }
msgt("step_030_createNewFilesViaIngest");
- if (!this.step_030_createNewFilesViaIngest()){
+ if (!this.step_030_createNewFilesViaIngest(optionalFileParams)){
return false;
}
@@ -1195,7 +1184,7 @@ private boolean step_007_auto_isReplacementInLatestVersion(DataFile existingFile
}
- private boolean step_030_createNewFilesViaIngest(){
+ private boolean step_030_createNewFilesViaIngest(OptionalFileParams optionalFileParams){
if (this.hasError()){
return false;
@@ -1207,6 +1196,22 @@ private boolean step_030_createNewFilesViaIngest(){
//Don't repeatedly update the clone (losing changes) in multifile case
clone = workingVersion.cloneDatasetVersion();
}
+
+ Long suppliedFileSize = null;
+ String newCheckSum = null;
+ ChecksumType newCheckSumType = null;
+
+
+ if (optionalFileParams != null) {
+ if (optionalFileParams.hasCheckSum()) {
+ newCheckSum = optionalFileParams.getCheckSum();
+ newCheckSumType = optionalFileParams.getCheckSumType();
+ }
+ if (trustSuppliedFileSizes && optionalFileParams.hasFileSize()) {
+ suppliedFileSize = optionalFileParams.getFileSize();
+ }
+ }
+
try {
UploadSessionQuotaLimit quota = null;
if (systemConfig.isStorageQuotasEnforced()) {
@@ -2028,9 +2033,15 @@ public void setDuplicateFileWarning(String duplicateFileWarning) {
* @param jsonData - an array of jsonData entries (one per file) using the single add file jsonData format
* @param dataset
* @param authUser
+ * @param trustSuppliedSizes - whether to accept the fileSize values passed
+ * in jsonData (we don't want to trust the users of the S3 direct
+ * upload API with that information - we will verify the status of
+ * the files in the S3 bucket and confirm the sizes in the process.
+ * we do want GlobusService to be able to pass the file sizes, since
+ * they are obtained and verified via a Globus API lookup).
* @return
*/
- public Response addFiles(String jsonData, Dataset dataset, User authUser) {
+ public Response addFiles(String jsonData, Dataset dataset, User authUser, boolean trustSuppliedFileSizes) {
msgt("(addFilesToDataset) jsonData: " + jsonData.toString());
JsonArrayBuilder jarr = Json.createArrayBuilder();
@@ -2039,6 +2050,7 @@ public Response addFiles(String jsonData, Dataset dataset, User authUser) {
int totalNumberofFiles = 0;
int successNumberofFiles = 0;
+ this.trustSuppliedFileSizes = trustSuppliedFileSizes;
// -----------------------------------------------------------
// Read jsonData and Parse files information from jsondata :
// -----------------------------------------------------------
@@ -2171,6 +2183,10 @@ public Response addFiles(String jsonData, Dataset dataset, User authUser) {
.add("data", Json.createObjectBuilder().add("Files", jarr).add("Result", result)).build() ).build();
}
+ public Response addFiles(String jsonData, Dataset dataset, User authUser) {
+ return addFiles(jsonData, dataset, authUser, false);
+ }
+
/**
* Replace multiple files with prepositioned replacements as listed in the
* jsonData. Works with direct upload, Globus, and other out-of-band methods.
diff --git a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
index 5c9a2f1d946..58992805dc8 100644
--- a/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/globus/GlobusServiceBean.java
@@ -1093,7 +1093,7 @@ private void processUploadedFiles(JsonArray filesJsonArray, Dataset dataset, Aut
// The old code had 2 sec. of sleep, so ...
Thread.sleep(2000);
- Response addFilesResponse = addFileHelper.addFiles(newjsonData, dataset, authUser);
+ Response addFilesResponse = addFileHelper.addFiles(newjsonData, dataset, authUser, true);
if (addFilesResponse == null) {
logger.info("null response from addFiles call");
From 3cd9a82d381f543cd3cb9b3a5560cb44bee1bbee Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 17:39:46 -0500
Subject: [PATCH 162/226] We do support 0-size files! #10977
---
.../java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
index fad02c76c78..52b7d4f1861 100644
--- a/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
@@ -350,7 +350,7 @@ public List saveAndAddFilesToDataset(DatasetVersion version,
// to S3 that go through the jsf dataset page. Or the Globus
// uploads, where the file sizes are looked up in bulk on
// the completion of the remote upload task.
- if (dataFile.getFilesize() > 0) {
+ if (dataFile.getFilesize() >= 0) {
confirmedFileSize = dataFile.getFilesize();
} else {
dataAccess.open(DataAccessOption.READ_ACCESS);
From 644a52491665d4e0f43a655f6b9094a2c41848b0 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 18:33:37 -0500
Subject: [PATCH 163/226] added a bunch of globus-related entries that were
missing from the bundle, per #11030 (these are used by the notification page,
apparently??)
---
src/main/java/propertyFiles/Bundle.properties | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties
index 012b389ce32..2b74e24ea29 100644
--- a/src/main/java/propertyFiles/Bundle.properties
+++ b/src/main/java/propertyFiles/Bundle.properties
@@ -307,7 +307,13 @@ notification.typeDescription.WORKFLOW_FAILURE=External workflow run has failed
notification.typeDescription.STATUSUPDATED=Status of dataset has been updated
notification.typeDescription.DATASETCREATED=Dataset was created by user
notification.typeDescription.DATASETMENTIONED=Dataset was referenced in remote system
-
+notification.typeDescription.GLOBUSUPLOADCOMPLETED=Globus upload is completed
+notification.typeDescription.GLOBUSUPLOADCOMPLETEDWITHERRORS=Globus upload completed with errors
+notification.typeDescription.GLOBUSDOWNLOADCOMPLETED=Globus download is completed
+notification.typeDescription.GLOBUSDOWNLOADCOMPLETEDWITHERRORS=Globus download completed with errors
+notification.typeDescription.GLOBUSUPLOADLOCALFAILURE=Globus upload failed, internal error
+notification.typeDescription.GLOBUSUPLOADREMOTEFAILURE=Globus upload failed, remote transfer error
+notification.typeDescription.REQUESTEDFILEACCESS=File access requested
groupAndRoles.manageTips=Here is where you can access and manage all the groups you belong to, and the roles you have been assigned.
user.message.signup.label=Create Account
user.message.signup.tip=Why have a Dataverse account? To create your own dataverse and customize it, add datasets, or request access to restricted files.
From 28e25eae93de311a2eb4e5e4971d5463fafb9193 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Mon, 25 Nov 2024 18:52:35 -0500
Subject: [PATCH 164/226] one more missing notification entry in the bundle
#10977
---
src/main/java/edu/harvard/iq/dataverse/MailServiceBean.java | 2 +-
src/main/java/propertyFiles/Bundle.properties | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/MailServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/MailServiceBean.java
index 2995c0c5f47..c67a0293847 100644
--- a/src/main/java/edu/harvard/iq/dataverse/MailServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/MailServiceBean.java
@@ -283,7 +283,7 @@ public Boolean sendNotificationEmail(UserNotification notification, String comme
if (objectOfNotification != null){
String messageText = getMessageTextBasedOnNotification(notification, objectOfNotification, comment, requestor);
String subjectText = MailUtil.getSubjectTextBasedOnNotification(notification, objectOfNotification);
- if (!(messageText.isEmpty() || subjectText.isEmpty())){
+ if (!(StringUtils.isEmpty(messageText) || StringUtils.isEmpty(subjectText))){
retval = sendSystemEmail(emailAddress, subjectText, messageText, isHtmlContent);
} else {
logger.warning("Skipping " + notification.getType() + " notification, because couldn't get valid message");
diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties
index 2b74e24ea29..02bc19f86cf 100644
--- a/src/main/java/propertyFiles/Bundle.properties
+++ b/src/main/java/propertyFiles/Bundle.properties
@@ -843,7 +843,8 @@ notification.email.datasetWasMentioned=Hello {0}, The {1} has just been
notification.email.datasetWasMentioned.subject={0}: A Dataset Relationship has been reported!
notification.email.globus.uploadCompleted.subject={0}: Files uploaded successfully via Globus and verified
notification.email.globus.downloadCompleted.subject={0}: Files downloaded successfully via Globus
-notification.email.globus.uploadCompletedWithErrors.subject={0}: Uploaded files via Globus with errors
+notification.email.globus.downloadCompletedWithErrors.subject={0}: Globus download task completed, errors encountered
+notification.email.globus.uploadCompletedWithErrors.subject={0}: Globus upload task completed with errors
notification.email.globus.uploadFailedRemotely.subject={0}: Failed to upload files via Globus
notification.email.globus.uploadFailedLocally.subject={0}: Failed to add files uploaded via Globus to dataset
# dataverse.xhtml
From 1325cee6cc7aa707481db68590fa16b65a7ad2ef Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Tue, 26 Nov 2024 09:47:26 -0500
Subject: [PATCH 165/226] This should make the filesize setting logic less
confusing potentially #10977
---
.../java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
index 52b7d4f1861..71c498a4d0b 100644
--- a/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/ingest/IngestServiceBean.java
@@ -372,7 +372,7 @@ public List saveAndAddFilesToDataset(DatasetVersion version,
if (fileSizeLimit == null || confirmedFileSize < fileSizeLimit) {
//set file size
- if (dataFile.getFilesize() < 1) {
+ if (dataFile.getFilesize() < 0) {
logger.fine("Setting file size: " + confirmedFileSize);
dataFile.setFilesize(confirmedFileSize);
}
From 321de7c46b34a53bc9df64b9947fab47f9f126a6 Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Tue, 26 Nov 2024 10:35:59 -0500
Subject: [PATCH 166/226] there's no need to slap the "incomplete metadata"
label on harvested dataset cards #10909
---
src/main/webapp/search-include-fragment.xhtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/webapp/search-include-fragment.xhtml b/src/main/webapp/search-include-fragment.xhtml
index 505fe681363..fcc5aff6f92 100644
--- a/src/main/webapp/search-include-fragment.xhtml
+++ b/src/main/webapp/search-include-fragment.xhtml
@@ -582,7 +582,7 @@
-
+
From 51e1ad7b2c0bd79cf84d58147285831755b01ff1 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 26 Nov 2024 13:09:49 -0500
Subject: [PATCH 167/226] #11044 reset input levels prior to update
---
.../engine/command/impl/AbstractWriteDataverseCommand.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
index ede07ba5ab7..0b3d1da0f6d 100644
--- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
+++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
@@ -73,6 +73,7 @@ public Dataverse execute(CommandContext ctxt) throws CommandException {
dataverse.addInputLevelsMetadataBlocksIfNotPresent(inputLevels);
}
ctxt.fieldTypeInputLevels().deleteFacetsFor(dataverse);
+ dataverse.setDataverseFieldTypeInputLevels(new ArrayList<>());
for (DataverseFieldTypeInputLevel inputLevel : inputLevels) {
inputLevel.setDataverse(dataverse);
ctxt.fieldTypeInputLevels().create(inputLevel);
From 8fd500dc9328f5e21472e0140f4b4a11befc91b4 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 26 Nov 2024 13:35:44 -0500
Subject: [PATCH 168/226] #11044 reset after merge conflict
---
.../engine/command/impl/AbstractWriteDataverseCommand.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
index 91f3a5b823c..2a8bb18a942 100644
--- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
+++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
@@ -93,6 +93,7 @@ private void processInputLevels(CommandContext ctxt) {
dataverse.addInputLevelsMetadataBlocksIfNotPresent(inputLevels);
}
ctxt.fieldTypeInputLevels().deleteFacetsFor(dataverse);
+ dataverse.setDataverseFieldTypeInputLevels(new ArrayList<>());
inputLevels.forEach(inputLevel -> {
inputLevel.setDataverse(dataverse);
ctxt.fieldTypeInputLevels().create(inputLevel);
From 232804619656e2637888c9ac4602bb1003eda69b Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 26 Nov 2024 14:42:19 -0500
Subject: [PATCH 169/226] #11044 code cleanup
---
.../dataverse/DataverseFacetServiceBean.java | 23 ++++++++-----------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
index 67dc183ba66..aa750e96bc9 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
@@ -4,8 +4,6 @@
import java.util.List;
import jakarta.ejb.EJB;
import jakarta.ejb.Stateless;
-import jakarta.ejb.TransactionAttribute;
-import jakarta.ejb.TransactionAttributeType;
import jakarta.inject.Named;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
@@ -44,26 +42,23 @@ public void delete(DataverseFacet dataverseFacet) {
cache.invalidate();
}
- @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
- public void deleteFacetsFor( Dataverse d ) {
- em.createNamedQuery("DataverseFacet.removeByOwnerId")
- .setParameter("ownerId", d.getId())
- .executeUpdate();
+ public void deleteFacetsFor(Dataverse d) {
+ em.createNamedQuery("DataverseFacet.removeByOwnerId")
+ .setParameter("ownerId", d.getId())
+ .executeUpdate();
cache.invalidate(d.getId());
- }
-
- @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
- public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Dataverse ownerDv) {
+ }
+
+ public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Dataverse ownerDv) {
DataverseFacet dataverseFacet = new DataverseFacet();
-
+
dataverseFacet.setDisplayOrder(displayOrder);
dataverseFacet.setDatasetFieldType(fieldType);
dataverseFacet.setDataverse(ownerDv);
-
+
em.persist(dataverseFacet);
ownerDv.getDataverseFacets().add(dataverseFacet);
- em.merge(ownerDv);
cache.invalidate(ownerDv.getId());
return dataverseFacet;
}
From ea97785bc0a49ff762b2a37d97ef3980a4c6ab94 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 26 Nov 2024 14:48:04 -0500
Subject: [PATCH 170/226] #11044 more cleanup
---
.../edu/harvard/iq/dataverse/DataverseFacetServiceBean.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
index aa750e96bc9..804f1fe2943 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
@@ -49,7 +49,7 @@ public void deleteFacetsFor(Dataverse d) {
cache.invalidate(d.getId());
}
-
+
public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Dataverse ownerDv) {
DataverseFacet dataverseFacet = new DataverseFacet();
From 40fe6656749ebfd8f1d87c551b2099f75ee3190b Mon Sep 17 00:00:00 2001
From: Leonid Andreev
Date: Tue, 26 Nov 2024 16:22:43 -0500
Subject: [PATCH 171/226] a typo in search include fragment
---
src/main/webapp/search-include-fragment.xhtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/webapp/search-include-fragment.xhtml b/src/main/webapp/search-include-fragment.xhtml
index fcc5aff6f92..fc224443a8e 100644
--- a/src/main/webapp/search-include-fragment.xhtml
+++ b/src/main/webapp/search-include-fragment.xhtml
@@ -582,7 +582,7 @@
-
+
From e914b625f8a96e2e3faa8804865e16d2bbdcd878 Mon Sep 17 00:00:00 2001
From: Florian Fritze
Date: Wed, 27 Nov 2024 07:50:57 +0100
Subject: [PATCH 172/226] check the bugfix
---
src/main/webapp/metadataFragment.xhtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/webapp/metadataFragment.xhtml b/src/main/webapp/metadataFragment.xhtml
index 0a3ad249061..f8367ce01f8 100755
--- a/src/main/webapp/metadataFragment.xhtml
+++ b/src/main/webapp/metadataFragment.xhtml
@@ -130,7 +130,7 @@
-
+
Date: Wed, 27 Nov 2024 11:22:33 -0500
Subject: [PATCH 173/226] Update appendix.rst
I removed the broken links behind the names of the metadata blocks that are listed in the Supported Metadata section. And I
remove "version" from the "(see .tsv version)" text that follows the name of each of the metadata blocks.
---
doc/sphinx-guides/source/user/appendix.rst | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/sphinx-guides/source/user/appendix.rst b/doc/sphinx-guides/source/user/appendix.rst
index f7843b8bf40..601274a50bd 100755
--- a/doc/sphinx-guides/source/user/appendix.rst
+++ b/doc/sphinx-guides/source/user/appendix.rst
@@ -22,14 +22,14 @@ Supported Metadata
Detailed below are what metadata schemas we support for Citation and Domain Specific Metadata in the Dataverse Project:
-- `Citation Metadata `__ (`see .tsv version `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core's `DCMI Metadata Terms `__ . Language field uses `ISO 639-1 `__ controlled vocabulary.
-- `Geospatial Metadata `__ (`see .tsv version `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core. Country / Nation field uses `ISO 3166-1 `_ controlled vocabulary.
-- `Social Science & Humanities Metadata `__ (`see .tsv version `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, and Dublin Core.
-- `Astronomy and Astrophysics Metadata `__ (`see .tsv version `__): These metadata elements can be mapped/exported to the International Virtual Observatory Alliance’s (IVOA)
+- Citation Metadata (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core's `DCMI Metadata Terms `__ . Language field uses `ISO 639-1 `__ controlled vocabulary.
+- Geospatial Metadata (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core. Country / Nation field uses `ISO 3166-1 `_ controlled vocabulary.
+- Social Science & Humanities Metadata__ (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, and Dublin Core.
+- Astronomy and Astrophysics Metadata (`see .tsv `__): These metadata elements can be mapped/exported to the International Virtual Observatory Alliance’s (IVOA)
`VOResource Schema format `__ and is based on
`Virtual Observatory (VO) Discovery and Provenance Metadata `__.
-- `Life Sciences Metadata `__ (`see .tsv version `__): based on `ISA-Tab Specification `__, along with controlled vocabulary from subsets of the `OBI Ontology `__ and the `NCBI Taxonomy for Organisms `__.
-- `Journal Metadata `__ (`see .tsv version `__): based on the `Journal Archiving and Interchange Tag Set, version 1.2 `__.
+- Life Sciences Metadata (`see .tsv `__): based on `ISA-Tab Specification `__, along with controlled vocabulary from subsets of the `OBI Ontology `__ and the `NCBI Taxonomy for Organisms `__.
+- Journal Metadata (`see .tsv `__): based on the `Journal Archiving and Interchange Tag Set, version 1.2 `__.
Experimental Metadata
~~~~~~~~~~~~~~~~~~~~~
@@ -37,7 +37,7 @@ Experimental Metadata
Unlike supported metadata, experimental metadata is not enabled by default in a new Dataverse installation. Feedback via any `channel `_ is welcome!
- `CodeMeta Software Metadata `__: based on the `CodeMeta Software Metadata Schema, version 2.0 `__ (`see .tsv version `__)
-- `Computational Workflow Metadata `__ (`see .tsv version `__): adapted from `Bioschemas Computational Workflow Profile, version 1.0 `__ and `Codemeta `__.
+- Computational Workflow Metadata (`see .tsv `__): adapted from `Bioschemas Computational Workflow Profile, version 1.0 `__ and `Codemeta `__.
Please note: these custom metadata schemas are not included in the Solr schema for indexing by default, you will need
to add them as necessary for your custom metadata blocks. See "Update the Solr Schema" in :doc:`../admin/metadatacustomization`.
From 3d50ba86d7db1c46ff1f384960af327e94011e4a Mon Sep 17 00:00:00 2001
From: qqmyers
Date: Wed, 27 Nov 2024 17:56:02 -0500
Subject: [PATCH 174/226] typo
---
doc/sphinx-guides/source/user/appendix.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/user/appendix.rst b/doc/sphinx-guides/source/user/appendix.rst
index 601274a50bd..df9b6704209 100755
--- a/doc/sphinx-guides/source/user/appendix.rst
+++ b/doc/sphinx-guides/source/user/appendix.rst
@@ -24,7 +24,7 @@ Detailed below are what metadata schemas we support for Citation and Domain Spec
- Citation Metadata (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core's `DCMI Metadata Terms `__ . Language field uses `ISO 639-1 `__ controlled vocabulary.
- Geospatial Metadata (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, `DataCite 4.0 `__, and Dublin Core. Country / Nation field uses `ISO 3166-1 `_ controlled vocabulary.
-- Social Science & Humanities Metadata__ (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, and Dublin Core.
+- Social Science & Humanities Metadata (`see .tsv `__): compliant with `DDI Lite `_, `DDI 2.5 Codebook `__, and Dublin Core.
- Astronomy and Astrophysics Metadata (`see .tsv `__): These metadata elements can be mapped/exported to the International Virtual Observatory Alliance’s (IVOA)
`VOResource Schema format `__ and is based on
`Virtual Observatory (VO) Discovery and Provenance Metadata `__.
From a192c177da18469c411bf42cfa064fd719a38d4c Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Mon, 2 Dec 2024 15:35:36 -0500
Subject: [PATCH 175/226] fix release note
---
doc/release-notes/220-harvard-edu-audit-files.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/release-notes/220-harvard-edu-audit-files.md b/doc/release-notes/220-harvard-edu-audit-files.md
index 002c8e85063..fc857e3a02b 100644
--- a/doc/release-notes/220-harvard-edu-audit-files.md
+++ b/doc/release-notes/220-harvard-edu-audit-files.md
@@ -9,8 +9,8 @@ The JSON response includes:
- List of DataFiles where the FileMetadata is missing.
- Other failures found when trying to process the Datasets
-curl "http://localhost:8080/api/admin/datafiles/auditFiles
-curl "http://localhost:8080/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
-curl "http://localhost:8080/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/RVNT9Q,doi:10.5072/FK2/RVNT9Q
+curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles"
+curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
+curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/RVNT9Q,doi:10.5072/FK2/RVNT9Q"
For more information, see [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220)
From e06e1d244f89df7ffa392712a2cbca3f5040dcdc Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Mon, 2 Dec 2024 15:38:27 -0500
Subject: [PATCH 176/226] fix api doc
---
doc/sphinx-guides/source/api/native-api.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index bfcbbb96f93..cedc71c27dc 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -6207,17 +6207,17 @@ Produce an audit report of missing files and FileMetadata for Datasets.
Scans the Datasets in the database and verifies that the stored files exist. If the files are missing or if the FileMetadata is missing, this information is returned in a JSON response.
The call will return a status code of 200 if the report was generated successfully. Issues found will be documented in the report and will not return a failure status code unless the report could not be generated::
- curl "$SERVER_URL/api/admin/datafiles/auditFiles"
+ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/datafiles/auditFiles"
Optional Parameters are available for filtering the Datasets scanned.
For auditing the Datasets in a paged manner (firstId and lastId)::
- curl "$SERVER_URL/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
+ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
Auditing specific Datasets (comma separated list)::
- curl "$SERVER_URL/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/JXYBJS,doi:10.7910/DVN/MPU019
+ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/JXYBJS,doi:10.7910/DVN/MPU019
Sample JSON Audit Response::
From 8c79f6710a7f20f2fcc5e8e8c12a10263c44fafc Mon Sep 17 00:00:00 2001
From: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
Date: Mon, 2 Dec 2024 15:38:59 -0500
Subject: [PATCH 177/226] fix api doc
---
doc/sphinx-guides/source/api/native-api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst
index cedc71c27dc..a24716f715b 100644
--- a/doc/sphinx-guides/source/api/native-api.rst
+++ b/doc/sphinx-guides/source/api/native-api.rst
@@ -6217,7 +6217,7 @@ For auditing the Datasets in a paged manner (firstId and lastId)::
Auditing specific Datasets (comma separated list)::
- curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/JXYBJS,doi:10.7910/DVN/MPU019
+ curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/JXYBJS,doi:10.7910/DVN/MPU019"
Sample JSON Audit Response::
From ca95ad8d0b260060c7e7ed435767bd134cbf3907 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 3 Dec 2024 15:24:04 -0500
Subject: [PATCH 178/226] #11044 fix failing tests
---
.../edu/harvard/iq/dataverse/DataverseFacetServiceBean.java | 4 ++--
.../engine/command/impl/AbstractWriteDataverseCommand.java | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
index 804f1fe2943..56f522fa816 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataverseFacetServiceBean.java
@@ -56,9 +56,9 @@ public DataverseFacet create(int displayOrder, DatasetFieldType fieldType, Datav
dataverseFacet.setDisplayOrder(displayOrder);
dataverseFacet.setDatasetFieldType(fieldType);
dataverseFacet.setDataverse(ownerDv);
-
- em.persist(dataverseFacet);
ownerDv.getDataverseFacets().add(dataverseFacet);
+ em.persist(dataverseFacet);
+
cache.invalidate(ownerDv.getId());
return dataverseFacet;
}
diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
index 2a8bb18a942..91f3a5b823c 100644
--- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
+++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseCommand.java
@@ -93,7 +93,6 @@ private void processInputLevels(CommandContext ctxt) {
dataverse.addInputLevelsMetadataBlocksIfNotPresent(inputLevels);
}
ctxt.fieldTypeInputLevels().deleteFacetsFor(dataverse);
- dataverse.setDataverseFieldTypeInputLevels(new ArrayList<>());
inputLevels.forEach(inputLevel -> {
inputLevel.setDataverse(dataverse);
ctxt.fieldTypeInputLevels().create(inputLevel);
From 04e9ebaeee6aed9b91606ec2b358f2466f133eb0 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 4 Dec 2024 11:56:22 -0500
Subject: [PATCH 179/226] comment out /dev/lang to prevent verbose logging
#11043
---
.../source/container/running/demo.rst | 18 ++++++++++++------
docker-compose-dev.yml | 2 +-
docker/compose/demo/compose.yml | 2 +-
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/doc/sphinx-guides/source/container/running/demo.rst b/doc/sphinx-guides/source/container/running/demo.rst
index 2e404e7a09a..fe094bb3449 100644
--- a/doc/sphinx-guides/source/container/running/demo.rst
+++ b/doc/sphinx-guides/source/container/running/demo.rst
@@ -140,19 +140,25 @@ One you make this change it should be visible in the copyright in the bottom lef
Multiple Languages
++++++++++++++++++
-Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages such as English and French.
+Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages. (You need to create your own "languages.zip" file, for example.) Here will give you guidance specific to this demo tutorial. We'll be setting up a toggle between English and French.
-To set up the toggle between English and French, we'll use a slight variation on the command in the instructions above, adding the unblock key we created above:
+First, edit the ``compose.yml`` file and uncomment the following line:
-``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'``
+.. code-block:: text
+
+ #-Ddataverse.lang.directory=/dv/lang
-Similarly, when loading the "languages.zip" file, we'll add the unblock key:
+Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This should place files ending in ".properties" into the ``/dv/lang`` directory configured above.
+
+Please note that we are using a slight variation on the command in the instructions above, adding the unblock key we created above:
``curl "http://localhost:8080/api/admin/datasetfield/loadpropertyfiles?unblock-key=unblockme" -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"``
-Stop and start the Dataverse container in order for the language toggle to work.
+Next, set up the UI toggle between English and French, again using the unblock key:
-Note that ``dataverse.lang.directory=/dv/lang`` has already been configured for you in the ``compose.yml`` file. The step where you loaded "languages.zip" should have populated the ``/dv/lang`` directory with files ending in ".properties".
+``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'``
+
+Stop and start the Dataverse container in order for the language toggle to work.
Next Steps
----------
diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml
index 384b70b7a7b..c8515f43136 100644
--- a/docker-compose-dev.yml
+++ b/docker-compose-dev.yml
@@ -57,7 +57,7 @@ services:
-Ddataverse.pid.fake.label=FakeDOIProvider
-Ddataverse.pid.fake.authority=10.5072
-Ddataverse.pid.fake.shoulder=FK2/
- -Ddataverse.lang.directory=/dv/lang
+ #-Ddataverse.lang.directory=/dv/lang
ports:
- "8080:8080" # HTTP (Dataverse Application)
- "4949:4848" # HTTPS (Payara Admin Console)
diff --git a/docker/compose/demo/compose.yml b/docker/compose/demo/compose.yml
index f03d81f5957..60ed130612e 100644
--- a/docker/compose/demo/compose.yml
+++ b/docker/compose/demo/compose.yml
@@ -26,7 +26,7 @@ services:
-Ddataverse.pid.fake.label=FakeDOIProvider
-Ddataverse.pid.fake.authority=10.5072
-Ddataverse.pid.fake.shoulder=FK2/
- -Ddataverse.lang.directory=/dv/lang
+ #-Ddataverse.lang.directory=/dv/lang
ports:
- "8080:8080" # HTTP (Dataverse Application)
- "4848:4848" # HTTP (Payara Admin Console)
From d9214a32396e490d918e7e18c9eb7cf696e2a1f1 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 4 Dec 2024 14:27:28 -0500
Subject: [PATCH 180/226] reword #11043
---
doc/sphinx-guides/source/container/running/demo.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/container/running/demo.rst b/doc/sphinx-guides/source/container/running/demo.rst
index fe094bb3449..b1945070714 100644
--- a/doc/sphinx-guides/source/container/running/demo.rst
+++ b/doc/sphinx-guides/source/container/running/demo.rst
@@ -148,7 +148,7 @@ First, edit the ``compose.yml`` file and uncomment the following line:
#-Ddataverse.lang.directory=/dv/lang
-Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This should place files ending in ".properties" into the ``/dv/lang`` directory configured above.
+Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This will place files ending in ".properties" into the ``/dv/lang`` directory configured above.
Please note that we are using a slight variation on the command in the instructions above, adding the unblock key we created above:
From b87fdf732e4837ea137804eea4fe6af7da707515 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Mon, 2 Dec 2024 13:44:39 -0500
Subject: [PATCH 181/226] #10952 create doc/outline
---
doc/release-notes/6.5-release-notes.md | 192 +++++++++++++++++++++++++
1 file changed, 192 insertions(+)
create mode 100644 doc/release-notes/6.5-release-notes.md
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
new file mode 100644
index 00000000000..ccc8a161ae5
--- /dev/null
+++ b/doc/release-notes/6.5-release-notes.md
@@ -0,0 +1,192 @@
+# Dataverse 6.5
+
+Please note: To read these instructions in full, please go to https://github.com/IQSS/dataverse/releases/tag/v6.5 rather than the list of releases, which will cut them off.
+
+This release brings new features, enhancements, and bug fixes to Dataverse. Thank you to all of the community members who contributed code, suggestions, bug reports, and other assistance across the project.
+
+## Release Highlights
+
+New features in Dataverse 6.5:
+
+- and more! Please see below.
+
+
+## Features Added
+
+
+
+
+## Bugs Fixed
+
+
+## API Updates
+
+
+
+## Settings Added
+
+
+
+## Backward Incompatible Changes
+
+
+
+## Complete List of Changes
+
+For the complete list of code changes in this release, see the [6.5 milestone](https://github.com/IQSS/dataverse/issues?q=milestone%3A6.5+is%3Aclosed) in GitHub.
+
+## Getting Help
+
+For help with upgrading, installing, or general questions please post to the [Dataverse Community Google Group](https://groups.google.com/g/dataverse-community) or email support@dataverse.org.
+
+
+## Installation
+
+If this is a new installation, please follow our [Installation Guide](https://guides.dataverse.org/en/latest/installation/). Please don't be shy about [asking for help](https://guides.dataverse.org/en/latest/installation/intro.html#getting-help) if you need it!
+
+Once you are in production, we would be delighted to update our [map of Dataverse installations](https://dataverse.org/installations) around the world to include yours! Please [create an issue](https://github.com/IQSS/dataverse-installations/issues) or email us at support@dataverse.org to join the club!
+
+You are also very welcome to join the [Global Dataverse Community Consortium](https://www.gdcc.io/) (GDCC).
+
+
+## Upgrade Instructions
+
+Upgrading requires a maintenance window and downtime. Please plan accordingly, create backups of your database, etc.
+
+These instructions assume that you've already upgraded through all the 5.x releases and are now running Dataverse 6.4.
+
+0\. These instructions assume that you are upgrading from the immediate previous version. If you are running an earlier version, the only supported way to upgrade is to progress through the upgrades to all the releases in between before attempting the upgrade to this version.
+
+If you are running Payara as a non-root user (and you should be!), **remember not to execute the commands below as root**. Use `sudo` to change to that user first. For example, `sudo -i -u dataverse` if `dataverse` is your dedicated application user.
+
+In the following commands, we assume that Payara 6 is installed in `/usr/local/payara6`. If not, adjust as needed.
+
+```shell
+export PAYARA=/usr/local/payara6`
+```
+
+(or `setenv PAYARA /usr/local/payara6` if you are using a `csh`-like shell)
+
+1\. Undeploy the previous version
+
+```shell
+$PAYARA/bin/asadmin undeploy dataverse-6.4
+```
+
+2\. Stop and start Payara
+
+```shell
+service payara stop
+sudo service payara start
+```
+
+3\. Deploy this version
+
+```shell
+$PAYARA/bin/asadmin deploy dataverse-6.5.war
+```
+
+Note: if you have any trouble deploying, stop Payara, remove the following directories, start Payara, and try to deploy again.
+
+```shell
+service payara stop
+rm -rf $PAYARA/glassfish/domains/domain1/generated
+rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
+rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
+```
+
+4\. For installations with internationalization:
+
+Please remember to update translations via [Dataverse language packs](https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs).
+
+5\. Restart Payara
+
+```shell
+service payara stop
+service payara start
+```
+
+6\. Update metadata blocks
+
+These changes reflect incremental improvements made to the handling of core metadata fields.
+
+```shell
+wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/scripts/api/data/metadatablocks/citation.tsv
+
+curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file citation.tsv
+```
+
+7\. Update Solr schema.xml file. Start with the standard v6.4 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 7a).
+
+Stop Solr (usually `service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.4/installation/prerequisites.html#solr-init-script)).
+
+```shell
+service solr stop
+```
+
+Replace schema.xml
+
+```shell
+wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/conf/solr/schema.xml
+cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
+```
+
+Start Solr (but if you use any custom metadata blocks, perform the next step, 7a first).
+
+```shell
+service solr start
+```
+
+7a\. For installations with custom or experimental metadata blocks:
+
+Before starting Solr, update the schema to include all the extra metadata fields that your installation uses. We do this by collecting the output of the Dataverse schema API and feeding it to the `update-fields.sh` script that we supply, as in the example below (modify the command lines as needed to reflect the names of the directories, if different):
+
+```shell
+ wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/conf/solr/update-fields.sh
+ chmod +x update-fields.sh
+ curl "http://localhost:8080/api/admin/index/solr/schema" | ./update-fields.sh /usr/local/solr/solr-9.4.1/server/solr/collection1/conf/schema.xml
+```
+
+Now start Solr.
+
+8\. Reindex Solr
+
+Below is the simplest way to reindex Solr:
+
+```shell
+curl http://localhost:8080/api/admin/index
+```
+
+The API above rebuilds the existing index "in place". If you want to be absolutely sure that your index is up-to-date and consistent, you may consider wiping it clean and reindexing everything from scratch (see [the guides](https://guides.dataverse.org/en/latest/admin/solr-search-index.html)). Just note that, depending on the size of your database, a full reindex may take a while and the users will be seeing incomplete search results during that window.
+
+9\. Run reExportAll to update dataset metadata exports
+
+This step is necessary because of changes described above for the `Datacite` and `oai_dc` export formats.
+
+Below is the simple way to reexport all dataset metadata. For more advanced usage, please see [the guides](http://guides.dataverse.org/en/6.4/admin/metadataexport.html#batch-exports-through-the-api).
+
+```shell
+curl http://localhost:8080/api/admin/metadata/reExportAll
+```
+
+10\. Pushing updated metadata to DataCite
+
+(If you don't use DataCite, you can skip this.)
+
+Above you updated the citation metadata block and Solr with the new "relationType" field. With these two changes, the "Relation Type" fields will be available and creation/publication of datasets will result in the expanded XML being sent to DataCite. You've also already run "reExportAll" to update the `Datacite` metadata export format.
+
+Entries at DataCite for published datasets can be updated by a superuser using an API call (newly [documented](https://guides.dataverse.org/en/6.4/admin/dataverses-datasets.html#update-metadata-for-all-published-datasets-at-the-pid-provider)):
+
+`curl -X POST -H 'X-Dataverse-key:' http://localhost:8080/api/datasets/modifyRegistrationPIDMetadataAll`
+
+This will loop through all published datasets (and released files with PIDs). As long as the loop completes, the call will return a 200/OK response. Any PIDs for which the update fails can be found using the following command:
+
+`grep 'Failure for id' server.log`
+
+Failures may occur if PIDs were never registered, or if they were never made findable. Any such cases can be fixed manually in DataCite Fabrica or using the [Reserve a PID](https://guides.dataverse.org/en/6.4/api/native-api.html#reserve-a-pid) API call and the newly documented `/api/datasets//modifyRegistration` call respectively. See https://guides.dataverse.org/en/6.4/admin/dataverses-datasets.html#send-dataset-metadata-to-pid-provider. Please reach out with any questions.
+
+PIDs can also be updated by a superuser on a per-dataset basis using
+
+`curl -X POST -H 'X-Dataverse-key:' http://localhost:8080/api/datasets//modifyRegistrationMetadata`
+
+### Additional Upgrade Steps
From eae7478e6d0e8cdf55d16e9a9abfe5e23645eb78 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Tue, 3 Dec 2024 15:34:01 -0500
Subject: [PATCH 182/226] start adding features, bug fixes, etc to notes #10952
---
.../11018-update-dataverse-endpoint-update.md | 8 ----
.../11049-oai-identifiers-as-pids.md | 5 --
.../220-harvard-edu-audit-files.md | 16 -------
doc/release-notes/6.5-release-notes.md | 47 +++++++++++++++++++
.../7239-mydata-results-by-username.md | 3 --
doc/release-notes/8184-rename-private-url.md | 11 -----
.../8941-adding-fileCount-in-solr.md | 15 ------
...s-labels-not-translated-in-result-block.md | 7 ---
...50-5-improve-list-linked-dataverses-API.md | 5 --
doc/release-notes/expose-export-formats.md | 2 -
10 files changed, 47 insertions(+), 72 deletions(-)
delete mode 100644 doc/release-notes/11018-update-dataverse-endpoint-update.md
delete mode 100644 doc/release-notes/11049-oai-identifiers-as-pids.md
delete mode 100644 doc/release-notes/220-harvard-edu-audit-files.md
delete mode 100644 doc/release-notes/7239-mydata-results-by-username.md
delete mode 100644 doc/release-notes/8184-rename-private-url.md
delete mode 100644 doc/release-notes/8941-adding-fileCount-in-solr.md
delete mode 100644 doc/release-notes/9408-fix-facets-labels-not-translated-in-result-block.md
delete mode 100644 doc/release-notes/9650-5-improve-list-linked-dataverses-API.md
delete mode 100644 doc/release-notes/expose-export-formats.md
diff --git a/doc/release-notes/11018-update-dataverse-endpoint-update.md b/doc/release-notes/11018-update-dataverse-endpoint-update.md
deleted file mode 100644
index c2d9cf64af3..00000000000
--- a/doc/release-notes/11018-update-dataverse-endpoint-update.md
+++ /dev/null
@@ -1,8 +0,0 @@
-The updateDataverse API endpoint has been updated to support an "inherit from parent" configuration for metadata blocks, facets, and input levels.
-
-When it comes to omitting any of these fields in the request JSON:
-
-- Omitting ``facetIds`` or ``metadataBlockNames`` causes the Dataverse collection to inherit the corresponding configuration from its parent.
-- Omitting ``inputLevels`` removes any existing custom input levels in the Dataverse collection.
-
-Previously, not setting these fields meant keeping the existing ones in the Dataverse.
diff --git a/doc/release-notes/11049-oai-identifiers-as-pids.md b/doc/release-notes/11049-oai-identifiers-as-pids.md
deleted file mode 100644
index 8b53a461a70..00000000000
--- a/doc/release-notes/11049-oai-identifiers-as-pids.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
-
-This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid dois or handles as the OAI-PMH record header identifiers.
-
-It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides, #11049 and #10982 for more information.
\ No newline at end of file
diff --git a/doc/release-notes/220-harvard-edu-audit-files.md b/doc/release-notes/220-harvard-edu-audit-files.md
deleted file mode 100644
index fc857e3a02b..00000000000
--- a/doc/release-notes/220-harvard-edu-audit-files.md
+++ /dev/null
@@ -1,16 +0,0 @@
-### New API to Audit Datafiles across the database
-
-This is a superuser only API endpoint to audit Datasets with DataFiles where the physical files are missing or the file metadata is missing.
-The Datasets scanned can be limited by optional firstId and lastId query parameters, or a given CSV list of Dataset Identifiers.
-Once the audit report is generated, a superuser can either delete the missing file(s) from the Dataset or contact the author to re-upload the missing file(s).
-
-The JSON response includes:
-- List of files in each DataFile where the file exists in the database but the physical file is not in the file store.
-- List of DataFiles where the FileMetadata is missing.
-- Other failures found when trying to process the Datasets
-
-curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles"
-curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?firstId=0&lastId=1000"
-curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/RVNT9Q,doi:10.5072/FK2/RVNT9Q"
-
-For more information, see [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index ccc8a161ae5..7a0d4f81da8 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -13,15 +13,57 @@ New features in Dataverse 6.5:
## Features Added
+### Private URL Renamed to Preview URL
+With this release the name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
+Also, additional information about the creation of Preview URLs has been added to the popup accessed via edit menu of the Dataset Page.
+
+Any Private URLs created in previous versions of Dataverse will continue to work.
+
+The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://dataverse-guide--10961.org.readthedocs.build/en/10961/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
+
+See also #8184, #8185, #10950, and #10961.
+
+### Harvested Dataset PID from Record Header
+
+When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
+
+This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid DOIs or handles as the OAI-PMH record header identifiers.
+
+It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides, #11049 and #10982 for more information.
## Bugs Fixed
+### My Data Filter by Username Feature Fixed
+
+The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
+
+### Facets Filter Labels Now Translated Above Search Results
+
+On the main page, it's possible to filter results using search facets. If internationalization (i18n) has been activated in the Dataverse installation, allowing pages to be displayed in several languages, the facets are translated in the filter column. However, they weren't being translated above the search results, remaining in the default language, English.
+
+This version of Dataverse fix this, and includes internationalization in the facets visible in the search results section. For more information, see #9408 and #10158.
## API Updates
+### fileCount Added to Search API
+
+A new search field called `fileCount` can be searched to discover the number of files per dataset. See also #8941 and #10598.
+
+### List Dataset Metadata Exporters
+
+A list of available dataset metadata exporters can now be retrieved programmatically via API. See [the docs](https://dataverse-guide--10739.org.readthedocs.build/en/10739/api/native-api.html#get-export-formats) and #10739.
+
+### Audit Data Files
+A superuser-only API endpoint has been added to audit datasets with data files where the physical files are missing or the file metadata is missing. See [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220).
+
+### Update Collection API Inheritance
+
+The update collection (dataverse) API endpoint has been updated to support an "inherit from parent" configuration for metadata blocks, facets, and input levels.
+
+Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync.. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
## Settings Added
@@ -29,6 +71,11 @@ New features in Dataverse 6.5:
## Backward Incompatible Changes
+Generally speaking, see the [API Changelog](https://preview.guides.gdcc.io/en/develop/api/changelog.html) for a list of backward-incompatible changes.
+
+### List Collections Linked to a Dataset
+
+The API endpoint that returns a list of collections that a dataset has been linked to has been improved to provide a more structured JSON response. See [the docs](https://dataverse-guide--9665.org.readthedocs.build/en/9665/admin/dataverses-datasets.html#list-collections-that-are-linked-from-a-dataset), #9650, and #9665.
## Complete List of Changes
diff --git a/doc/release-notes/7239-mydata-results-by-username.md b/doc/release-notes/7239-mydata-results-by-username.md
deleted file mode 100644
index fa1ce56d89e..00000000000
--- a/doc/release-notes/7239-mydata-results-by-username.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Fix My Data filter results by username for Administrators
-
-The filtering for the username on the MyData page was not working. This is only available for superusers. This fixes the "Results for Username" field to return the data for the desired user. See also #7239 and #10980.
diff --git a/doc/release-notes/8184-rename-private-url.md b/doc/release-notes/8184-rename-private-url.md
deleted file mode 100644
index 7acb03fd735..00000000000
--- a/doc/release-notes/8184-rename-private-url.md
+++ /dev/null
@@ -1,11 +0,0 @@
-###Private URL renamed Preview URL
-
-With this release the name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
-
-Also, additional information about the creation of Preview URLs has been added to the popup accessed via edit menu of the Dataset Page.
-
-Any Private URLs created in previous versions of Dataverse will continue to work.
-
-The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://dataverse-guide--10961.org.readthedocs.build/en/10961/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
-
-See also #8184, #8185, #10950, and #10961.
diff --git a/doc/release-notes/8941-adding-fileCount-in-solr.md b/doc/release-notes/8941-adding-fileCount-in-solr.md
deleted file mode 100644
index 164b91e6123..00000000000
--- a/doc/release-notes/8941-adding-fileCount-in-solr.md
+++ /dev/null
@@ -1,15 +0,0 @@
-## Release Highlights
-
-### Adding fileCount as SOLR field
-
-A new search field called `fileCount` can be searched to discover the number of files per dataset. (#10598)
-
-## Upgrade Instructions
-
-1. Update your Solr `schema.xml` to include the new field.
-For details, please see https://guides.dataverse.org/en/latest/admin/metadatacustomization.html#updating-the-solr-schema
-
-2. Reindex Solr.
-Once the schema.xml is updated, Solr must be restarted and a reindex initiated.
-For details, see https://guides.dataverse.org/en/latest/admin/solr-search-index.html but here is the reindex command:
-`curl http://localhost:8080/api/admin/index`
diff --git a/doc/release-notes/9408-fix-facets-labels-not-translated-in-result-block.md b/doc/release-notes/9408-fix-facets-labels-not-translated-in-result-block.md
deleted file mode 100644
index 344859e2dbd..00000000000
--- a/doc/release-notes/9408-fix-facets-labels-not-translated-in-result-block.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## Fix facets filter labels not translated in result block
-
-On the main page, it's possible to filter results using search facets. If internationalization (i18n) has been activated in the Dataverse installation, allowing pages to be displayed in several languages, the facets are translated in the filter column. However, they aren't translated in the search results and remain in the default language, English.
-
-This version of Dataverse fix this, and includes internationalization in the facets visible in the search results section.
-
-For more information, see issue [#9408](https://github.com/IQSS/dataverse/issues/9408) and pull request [#10158](https://github.com/IQSS/dataverse/pull/10158)
diff --git a/doc/release-notes/9650-5-improve-list-linked-dataverses-API.md b/doc/release-notes/9650-5-improve-list-linked-dataverses-API.md
deleted file mode 100644
index 8c79955891b..00000000000
--- a/doc/release-notes/9650-5-improve-list-linked-dataverses-API.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The following API have been added:
-
-/api/datasets/{datasetId}/links
-
-It lists the linked dataverses to a dataset. It can be executed only by administrators.
\ No newline at end of file
diff --git a/doc/release-notes/expose-export-formats.md b/doc/release-notes/expose-export-formats.md
deleted file mode 100644
index a21906d7bbb..00000000000
--- a/doc/release-notes/expose-export-formats.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# New API method for listing the available exporters
-Found at `/api/info/exportFormats`, produces an object with available format names as keys, and as values an object with various info about the exporter. See also #10739.
\ No newline at end of file
From e520a9a746aacd01e0bc3d9f633cdf98cfbe14ac Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Tue, 3 Dec 2024 15:54:18 -0500
Subject: [PATCH 183/226] add more to notes #10952
---
...pearing-in-search-results-for-anon-user.md | 11 ---------
...0969-order-subfields-version-difference.md | 2 --
.../10977-globus-filesize-lookup.md | 6 -----
.../11012-get-dataverse-api-ext.md | 1 -
doc/release-notes/6.5-release-notes.md | 24 ++++++++++++++++++-
5 files changed, 23 insertions(+), 21 deletions(-)
delete mode 100644 doc/release-notes/10947-unpublished-files-appearing-in-search-results-for-anon-user.md
delete mode 100644 doc/release-notes/10969-order-subfields-version-difference.md
delete mode 100644 doc/release-notes/10977-globus-filesize-lookup.md
delete mode 100644 doc/release-notes/11012-get-dataverse-api-ext.md
diff --git a/doc/release-notes/10947-unpublished-files-appearing-in-search-results-for-anon-user.md b/doc/release-notes/10947-unpublished-files-appearing-in-search-results-for-anon-user.md
deleted file mode 100644
index 66ea04b124f..00000000000
--- a/doc/release-notes/10947-unpublished-files-appearing-in-search-results-for-anon-user.md
+++ /dev/null
@@ -1,11 +0,0 @@
-## Unpublished file bug fix
-
-A bug fix was made that gets the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published.
-This fix affects the indexing, meaning these datasets must be re-indexed once Dataverse is updated. This can be manually done by calling the index API for each affected Dataset.
-
-Example:
-```shell
-curl http://localhost:8080/api/admin/index/dataset?persistentId=doi:10.7910/DVN/6X4ZZL
-```
-
-See also #10947 and #10974.
diff --git a/doc/release-notes/10969-order-subfields-version-difference.md b/doc/release-notes/10969-order-subfields-version-difference.md
deleted file mode 100644
index 3f245ebe069..00000000000
--- a/doc/release-notes/10969-order-subfields-version-difference.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Bug Fix:
-In order to facilitate the comparison between the draft version and the published version of a dataset, a sort on subfields has been added (#10969)
\ No newline at end of file
diff --git a/doc/release-notes/10977-globus-filesize-lookup.md b/doc/release-notes/10977-globus-filesize-lookup.md
deleted file mode 100644
index 49fd10d9ffe..00000000000
--- a/doc/release-notes/10977-globus-filesize-lookup.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## A new Globus optimization setting
-
-An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
-
-
-See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides for more information.
\ No newline at end of file
diff --git a/doc/release-notes/11012-get-dataverse-api-ext.md b/doc/release-notes/11012-get-dataverse-api-ext.md
deleted file mode 100644
index 641aa373174..00000000000
--- a/doc/release-notes/11012-get-dataverse-api-ext.md
+++ /dev/null
@@ -1 +0,0 @@
-The JSON payload of the getDataverse endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot.
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 7a0d4f81da8..30bd0f68732 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -25,6 +25,12 @@ The old "privateUrl" API endpoints for the creation and deletion of Preview (for
See also #8184, #8185, #10950, and #10961.
+### GlobusBatchLookupSize
+
+An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
+
+See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides, #10977, and #11040 for more information.
+
### Harvested Dataset PID from Record Header
When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
@@ -39,12 +45,24 @@ It is also possible to optionally configure a harvesting client to use this OAI-
The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
+### Version Differences Details Sorting Added
+
+In order to facilitate the comparison between the draft version and the published version of a dataset, a sort on subfields has been added. See #10969.
+
### Facets Filter Labels Now Translated Above Search Results
On the main page, it's possible to filter results using search facets. If internationalization (i18n) has been activated in the Dataverse installation, allowing pages to be displayed in several languages, the facets are translated in the filter column. However, they weren't being translated above the search results, remaining in the default language, English.
This version of Dataverse fix this, and includes internationalization in the facets visible in the search results section. For more information, see #9408 and #10158.
+### Unpublished File Bug Fix Related to Deaccessioning
+
+A bug fix was made that gets the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published. This fix affects the indexing, meaning these datasets must be re-indexed once Dataverse is updated. See also #10947 and #10974.
+
+### Globus "missing properties" Logging Fixed
+
+In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030 for details.
+
## API Updates
### fileCount Added to Search API
@@ -65,9 +83,13 @@ The update collection (dataverse) API endpoint has been updated to support an "i
Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync.. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
-## Settings Added
+### isMetadataBlockRoot and isFacetRoot
+
+The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
+## Settings Added
+- :GlobusBatchLookupSize
## Backward Incompatible Changes
From 3e69dd1ccfb4f97e0937cf86cb4acfea89429d82 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 4 Dec 2024 14:48:11 -0500
Subject: [PATCH 184/226] more features, etc #10952
---
...17-guestbook-question-size-limit-raised.md | 1 -
.../10914-users-token-api-credentials.md | 3 ---
.../10919-minor-DataCiteXML-bugfix.md | 1 -
doc/release-notes/10939-i18n-docker.md | 5 ----
doc/release-notes/6.5-release-notes.md | 24 +++++++++++++++++++
5 files changed, 24 insertions(+), 10 deletions(-)
delete mode 100644 doc/release-notes/10117-guestbook-question-size-limit-raised.md
delete mode 100644 doc/release-notes/10914-users-token-api-credentials.md
delete mode 100644 doc/release-notes/10919-minor-DataCiteXML-bugfix.md
delete mode 100644 doc/release-notes/10939-i18n-docker.md
diff --git a/doc/release-notes/10117-guestbook-question-size-limit-raised.md b/doc/release-notes/10117-guestbook-question-size-limit-raised.md
deleted file mode 100644
index ab5e84d78fe..00000000000
--- a/doc/release-notes/10117-guestbook-question-size-limit-raised.md
+++ /dev/null
@@ -1 +0,0 @@
-Custom questions in Guestbooks can now be more than 255 characters and the bug causing a silent failure when questions were longer than this limit has been fixed.
\ No newline at end of file
diff --git a/doc/release-notes/10914-users-token-api-credentials.md b/doc/release-notes/10914-users-token-api-credentials.md
deleted file mode 100644
index 888214481f6..00000000000
--- a/doc/release-notes/10914-users-token-api-credentials.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Extended the users/token GET endpoint to support any auth mechanism for retrieving the token information.
-
-Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information.
diff --git a/doc/release-notes/10919-minor-DataCiteXML-bugfix.md b/doc/release-notes/10919-minor-DataCiteXML-bugfix.md
deleted file mode 100644
index 4fa0c1142b1..00000000000
--- a/doc/release-notes/10919-minor-DataCiteXML-bugfix.md
+++ /dev/null
@@ -1 +0,0 @@
-A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.4/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.4/admin/metadataexport.html#batch-exports-through-the-api) or by following steps 9 and 10 in the v6.4 release notes to update and re-export all datasets.
diff --git a/doc/release-notes/10939-i18n-docker.md b/doc/release-notes/10939-i18n-docker.md
deleted file mode 100644
index d9887b684db..00000000000
--- a/doc/release-notes/10939-i18n-docker.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## Multiple Language in Docker
-
-Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
-
-See also #10939
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 30bd0f68732..2d6345941bb 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -13,6 +13,10 @@ New features in Dataverse 6.5:
## Features Added
+### Longer Custom Questions in Guestbooks
+
+Custom questions in Guestbooks can now be more than 255 characters and the bug causing a silent failure when questions were longer than this limit has been fixed. See also #9492, #10117, #10118.
+
### Private URL Renamed to Preview URL
With this release the name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
@@ -25,6 +29,12 @@ The old "privateUrl" API endpoints for the creation and deletion of Preview (for
See also #8184, #8185, #10950, and #10961.
+## Multiple Language in Docker
+
+Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
+
+See also [the docs](https://dataverse-guide--10940.org.readthedocs.build/en/10940/container/running/demo.html#multiple-languages), #10939, and #10940.
+
### GlobusBatchLookupSize
An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
@@ -59,12 +69,20 @@ This version of Dataverse fix this, and includes internationalization in the fac
A bug fix was made that gets the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published. This fix affects the indexing, meaning these datasets must be re-indexed once Dataverse is updated. See also #10947 and #10974.
+### Minor DataCiteXML Fix
+
+A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.5/admin/metadataexport.html#batch-exports-through-the-api) or by steps 9 and 10 in the [v6.4 release notes](https://github.com/IQSS/dataverse/releases/tag/v6.4) to update and re-export all datasets. See also #10919.
+
### Globus "missing properties" Logging Fixed
In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030 for details.
## API Updates
+### Editing Collections
+
+A new endpoint (`PUT /api/dataverses/`) for updating an existing collection (dataverse) has been added. It uses the same JSON structure as the one used for collection creation. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#update-a-dataverse-collection), #10904, and #10925.
+
### fileCount Added to Search API
A new search field called `fileCount` can be searched to discover the number of files per dataset. See also #8941 and #10598.
@@ -87,6 +105,12 @@ Previously, not setting these fields meant using a copy of the settings from the
The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
+### Get API Token Supports Any Auth
+
+The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information.
+
+Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
+
## Settings Added
- :GlobusBatchLookupSize
From 65fbd27290be8c563f39fd63c727f6c43717e97d Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 4 Dec 2024 14:55:20 -0500
Subject: [PATCH 185/226] more content #10952
---
doc/release-notes/10901deaccessioned file edit fix.md | 1 -
doc/release-notes/10904-edit-dataverse-collection-endpoint.md | 1 -
doc/release-notes/6.5-release-notes.md | 4 ++++
3 files changed, 4 insertions(+), 2 deletions(-)
delete mode 100644 doc/release-notes/10901deaccessioned file edit fix.md
delete mode 100644 doc/release-notes/10904-edit-dataverse-collection-endpoint.md
diff --git a/doc/release-notes/10901deaccessioned file edit fix.md b/doc/release-notes/10901deaccessioned file edit fix.md
deleted file mode 100644
index db12b1fc978..00000000000
--- a/doc/release-notes/10901deaccessioned file edit fix.md
+++ /dev/null
@@ -1 +0,0 @@
-When a dataset was deaccessioned and was the only previous version it will cause an error when trying to update the files.
\ No newline at end of file
diff --git a/doc/release-notes/10904-edit-dataverse-collection-endpoint.md b/doc/release-notes/10904-edit-dataverse-collection-endpoint.md
deleted file mode 100644
index b9256941eea..00000000000
--- a/doc/release-notes/10904-edit-dataverse-collection-endpoint.md
+++ /dev/null
@@ -1 +0,0 @@
-Adds a new endpoint (`PUT /api/dataverses/`) for updating an existing Dataverse collection using a JSON file following the same structure as the one used in the API for the creation.
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 2d6345941bb..9500c90f53a 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -51,6 +51,10 @@ It is also possible to optionally configure a harvesting client to use this OAI-
## Bugs Fixed
+### Updating Files Now Possible When Latest and Only Dataset Version is Deaccessioned
+
+When a dataset was deaccessioned and was the only previous version it would cause an error when trying to update the files. This has been fixed. See #9351 and #10901.
+
### My Data Filter by Username Feature Fixed
The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
From aa56e627fcd72edb4e0f93f416ed4aa7a032b64a Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 4 Dec 2024 15:55:04 -0500
Subject: [PATCH 186/226] more content #10952
---
...-add-api-for-comparing-dataset-versions.md | 21 -------------------
doc/release-notes/10889_bump_PG17_FlyWay10.md | 7 -------
doc/release-notes/6.5-release-notes.md | 20 +++++++++++++++++-
3 files changed, 19 insertions(+), 29 deletions(-)
delete mode 100644 doc/release-notes/10888-add-api-for-comparing-dataset-versions.md
delete mode 100644 doc/release-notes/10889_bump_PG17_FlyWay10.md
diff --git a/doc/release-notes/10888-add-api-for-comparing-dataset-versions.md b/doc/release-notes/10888-add-api-for-comparing-dataset-versions.md
deleted file mode 100644
index b82441ee11a..00000000000
--- a/doc/release-notes/10888-add-api-for-comparing-dataset-versions.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The following API have been added:
-
-/api/datasets/{persistentId}/versions/{versionId0}/compare/{versionId1}
-
-This API lists the changes between 2 dataset versions. The Json response shows the changes per field within the Metadata block and the Terms Of Access. Also listed are the files that have been added or removed. Files that have been modified will also display the new file data plus the fields that have been modified.
-When compare includes an unpublished/draft version the api token must be associated with a user having view unpublished privileges
-An error will be returned if VERSION0 was not created before VERSION1
-
-Example of Metadata Block field change:
-```json
-{
- "blockName": "Life Sciences Metadata",
- "changed": [
- {
- "fieldName": "Design Type",
- "oldValue": "",
- "newValue": "Parallel Group Design; Nested Case Control Design"
- }
- ]
-}
-```
diff --git a/doc/release-notes/10889_bump_PG17_FlyWay10.md b/doc/release-notes/10889_bump_PG17_FlyWay10.md
deleted file mode 100644
index 932c06fbc3d..00000000000
--- a/doc/release-notes/10889_bump_PG17_FlyWay10.md
+++ /dev/null
@@ -1,7 +0,0 @@
-This release bumps both the Postgres JDBC driver and Flyway versions. This should better support Postgres version 17, and as of version 10 Flyway no longer requires a paid subscription to support older versions of Postgres.
-
-While we don't encourage the use of older Postgres versions, this flexibility may benefit some of our long-standing installations in their upgrade paths. Postgres 13 remains the version used with automated testing.
-
-As part of this update, the containerized development environment now uses Postgres 17 instead of 16. Developers must delete their data (`rm -rf docker-dev-volumes`) and start with an empty database. They can rerun the quickstart in the dev guide.
-
-The Docker compose file used for [evaluations or demos](https://dataverse-guide--10912.org.readthedocs.build/en/10912/container/running/demo.html) has been upgraded from Postgres 13 to 17.
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 9500c90f53a..16bd925eac8 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -29,7 +29,21 @@ The old "privateUrl" API endpoints for the creation and deletion of Preview (for
See also #8184, #8185, #10950, and #10961.
-## Multiple Language in Docker
+### PostgreSQL and Flyway Updates
+
+This release bumps the version of PostgreSQL and Flyway used in containers as well as the PostgreSQL JDBC driver used all installations, including classic (non-Docker) installations. PostgreSQL and its driver have been bumped to version 17. Flyway has been bumped to version 10.
+
+PostgreSQL 13 remains the version used with automated testing, leading us to continue to [recommend](https://guides.dataverse.org/en/6.5/installation/prerequisites.html#postgresql) that version for classic installations.
+
+As of Flyway 10, supporting older versions of PostgreSQL no longer requires a paid subscription. While we don't encourage the use of older PostgreSQL versions, this flexibility may benefit some of our long-standing installations in their upgrade paths.
+
+As part of this update, the containerized development environment now uses Postgres 17 instead of 16. Developers must delete their data (`rm -rf docker-dev-volumes`) and start with an empty database, as [explained](https://groups.google.com/g/dataverse-dev/c/ffoNj5UXyzU/m/nE5oGY_sAQAJ) on the dev mailing list. They can rerun the quickstart in the dev guide.
+
+The Docker compose file used for [evaluations or demos](https://guides.dataverse.org/en/6.4/container/running/demo.html) has been upgraded from Postgres 13 to 17.
+
+See also #10889 and #10912.
+
+## Multiple Languages in Docker
Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
@@ -95,6 +109,10 @@ A new search field called `fileCount` can be searched to discover the number of
A list of available dataset metadata exporters can now be retrieved programmatically via API. See [the docs](https://dataverse-guide--10739.org.readthedocs.build/en/10739/api/native-api.html#get-export-formats) and #10739.
+### Comparing Dataset Versions
+
+An API has been added to compare dataset versions. See [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#compare-versions-of-a-dataset), #10888, and #10945.
+
### Audit Data Files
A superuser-only API endpoint has been added to audit datasets with data files where the physical files are missing or the file metadata is missing. See [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220).
From 8f8bce84ec9b9705d4250897739f96e8537a64c5 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 13:04:48 -0500
Subject: [PATCH 187/226] more content #10952
---
.../10772-fix-importDDI-otherId.md | 2 --
.../10793-optimisticlockexception handling.md | 2 --
.../10814-Differencing improvement.md | 3 --
...837-exclude-others-ns-harvesting-oai-dc.md | 3 --
...d-expiration-date-to-recreate-token-api.md | 1 -
...date-to-conditions-to-display-image_url.md | 8 -----
doc/release-notes/6.5-release-notes.md | 36 +++++++++++++++++--
7 files changed, 33 insertions(+), 22 deletions(-)
delete mode 100644 doc/release-notes/10772-fix-importDDI-otherId.md
delete mode 100644 doc/release-notes/10793-optimisticlockexception handling.md
delete mode 100644 doc/release-notes/10814-Differencing improvement.md
delete mode 100644 doc/release-notes/10837-exclude-others-ns-harvesting-oai-dc.md
delete mode 100644 doc/release-notes/10857-add-expiration-date-to-recreate-token-api.md
delete mode 100644 doc/release-notes/10886-update-to-conditions-to-display-image_url.md
diff --git a/doc/release-notes/10772-fix-importDDI-otherId.md b/doc/release-notes/10772-fix-importDDI-otherId.md
deleted file mode 100644
index d5a9018b2b2..00000000000
--- a/doc/release-notes/10772-fix-importDDI-otherId.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Bug Fix :
-This PR fixes the `edu.harvard.iq.dataverse.util.json.JsonParseException: incorrect multiple for field otherId` error when DDI harvested data contains multiple ortherId.
\ No newline at end of file
diff --git a/doc/release-notes/10793-optimisticlockexception handling.md b/doc/release-notes/10793-optimisticlockexception handling.md
deleted file mode 100644
index 3312063be8f..00000000000
--- a/doc/release-notes/10793-optimisticlockexception handling.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Improvements have been made in handling the errors when a dataset has been edited in one window and an attempt is made to
-edit/publish it in another.
diff --git a/doc/release-notes/10814-Differencing improvement.md b/doc/release-notes/10814-Differencing improvement.md
deleted file mode 100644
index 49bbdae3e1b..00000000000
--- a/doc/release-notes/10814-Differencing improvement.md
+++ /dev/null
@@ -1,3 +0,0 @@
-### More Scalable Dataset Version Differencing
-
-Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made signficantly more scalable.
diff --git a/doc/release-notes/10837-exclude-others-ns-harvesting-oai-dc.md b/doc/release-notes/10837-exclude-others-ns-harvesting-oai-dc.md
deleted file mode 100644
index c1826bfaed5..00000000000
--- a/doc/release-notes/10837-exclude-others-ns-harvesting-oai-dc.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Some repository extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets is not possible, as an XML parsing error is raised.
-
-The PR [#10837](https://github.com/IQSS/dataverse/pull/10837) allows the harvesting of these datasets by excluding tags with namespaces that are not "dc:", and harvest only metadata with the "dc" namespace.
diff --git a/doc/release-notes/10857-add-expiration-date-to-recreate-token-api.md b/doc/release-notes/10857-add-expiration-date-to-recreate-token-api.md
deleted file mode 100644
index b450867c630..00000000000
--- a/doc/release-notes/10857-add-expiration-date-to-recreate-token-api.md
+++ /dev/null
@@ -1 +0,0 @@
-An optional query parameter called 'returnExpiration' has been added to the 'users/token/recreate' endpoint, which, if set to true, returns the expiration time in the response message.
diff --git a/doc/release-notes/10886-update-to-conditions-to-display-image_url.md b/doc/release-notes/10886-update-to-conditions-to-display-image_url.md
deleted file mode 100644
index 6dfe8eb9f2d..00000000000
--- a/doc/release-notes/10886-update-to-conditions-to-display-image_url.md
+++ /dev/null
@@ -1,8 +0,0 @@
-Search API (/api/search) responses for Datafiles include image_url for the thumbnail if each of the following are true:
-1. The DataFile is not Harvested
-2. A Thumbnail is available for the Datafile
-3. If the Datafile is Restricted then the caller must have Download File Permission for the Datafile
-4. The Datafile is NOT actively embargoed
-5. The Datafile's retention period has NOT expired
-
-See also #10875 and #10886.
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 16bd925eac8..b66ae2f1b21 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -29,6 +29,10 @@ The old "privateUrl" API endpoints for the creation and deletion of Preview (for
See also #8184, #8185, #10950, and #10961.
+### More Scalable Dataset Version Differencing
+
+Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made signficantly more scalable. See #10814 and #10818.
+
### PostgreSQL and Flyway Updates
This release bumps the version of PostgreSQL and Flyway used in containers as well as the PostgreSQL JDBC driver used all installations, including classic (non-Docker) installations. PostgreSQL and its driver have been bumped to version 17. Flyway has been bumped to version 10.
@@ -55,6 +59,12 @@ An optimization has been added for the Globus upload workflow, with a correspond
See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides, #10977, and #11040 for more information.
+### Harvesting "oai_dc" Metadata Prefix When Extended With Specific Namespaces
+
+Some repository extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets was not possible because an XML parsing error was raised.
+
+Harvesting of these datasets has been fixed by excluding tags with namespaces that are not "dc:" and harvest only metadata with the "dc" namespace. See #10837.
+
### Harvested Dataset PID from Record Header
When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
@@ -63,6 +73,10 @@ This will allow harvesting from sources that do not include a persistent id in t
It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides, #11049 and #10982 for more information.
+### Harvested Datasets Can Have Multiple "otherId" Values
+
+When harvesting using the DDI format, datasets can now have multiple "otherId" values. See #10772.
+
## Bugs Fixed
### Updating Files Now Possible When Latest and Only Dataset Version is Deaccessioned
@@ -73,6 +87,10 @@ When a dataset was deaccessioned and was the only previous version it would caus
The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
+### Better Handling of Parallel Edit/Publish Errors
+
+Improvements have been made in handling the errors when a dataset has been edited in one browser window and an attempt is made to edit/publish it in another. (This practice is discouraged.) See #10793 and #10794.
+
### Version Differences Details Sorting Added
In order to facilitate the comparison between the draft version and the published version of a dataset, a sort on subfields has been added. See #10969.
@@ -127,11 +145,23 @@ Previously, not setting these fields meant using a copy of the settings from the
The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
-### Get API Token Supports Any Auth
+### Image URLs from the Search API
+
+As of 6.4 (thanks to #10855) `image_url` is being returned from the Search API. The logic has been updated to only show the image if each of the following are true:
+
+1. The DataFile is not Harvested
+2. A Thumbnail is available for the Datafile
+3. If the Datafile is Restricted then the caller must have Download File Permission for the Datafile
+4. The Datafile is NOT actively embargoed
+5. The Datafile's retention period has NOT expired
+
+See also #10875 and #10886.
+
+## API Tokens
-The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information.
+An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#recreate-a-token), #10857 and #10858.
-Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
+The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information. Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
## Settings Added
From c331d895573af5edcbafb94afeeef8dd9c265456 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 13:19:44 -0500
Subject: [PATCH 188/226] added last of the snippets (for now) #10952
---
doc/release-notes/10379-MetricsBugsFixes.md | 10 ------
.../10661-guestbook-email-bug-fix.md | 4 ---
.../10688_whitespace_trimming.md | 6 ----
.../10697-improve-permission-indexing.md | 7 ----
...C Citation and DOI parsing improvements.md | 3 --
...0742-newest-oldest-sort-order-backwards.md | 3 --
doc/release-notes/6.5-release-notes.md | 35 +++++++++++++++++++
7 files changed, 35 insertions(+), 33 deletions(-)
delete mode 100644 doc/release-notes/10379-MetricsBugsFixes.md
delete mode 100644 doc/release-notes/10661-guestbook-email-bug-fix.md
delete mode 100644 doc/release-notes/10688_whitespace_trimming.md
delete mode 100644 doc/release-notes/10697-improve-permission-indexing.md
delete mode 100644 doc/release-notes/10708 - MDC Citation and DOI parsing improvements.md
delete mode 100644 doc/release-notes/10742-newest-oldest-sort-order-backwards.md
diff --git a/doc/release-notes/10379-MetricsBugsFixes.md b/doc/release-notes/10379-MetricsBugsFixes.md
deleted file mode 100644
index 0ebc6d99f0b..00000000000
--- a/doc/release-notes/10379-MetricsBugsFixes.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-### Metrics API Bug fixes
-
-Two bugs in the Metrics API have been fixed:
-
-- The /datasets and /datasets/byMonth endpoints could report incorrect values if/when they have been called using the dataLocation parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
-
-- Metrics endpoints who's calculation relied on finding the latest published datasetversion were incorrect if/when the minor version number was > 9.
-
-When deploying the new release, the [/api/admin/clearMetricsCache](https://guides.dataverse.org/en/latest/api/native-api.html#metrics) API should be called to remove old cached values that may be incorrect.
\ No newline at end of file
diff --git a/doc/release-notes/10661-guestbook-email-bug-fix.md b/doc/release-notes/10661-guestbook-email-bug-fix.md
deleted file mode 100644
index 05e70c9762a..00000000000
--- a/doc/release-notes/10661-guestbook-email-bug-fix.md
+++ /dev/null
@@ -1,4 +0,0 @@
-
-### Guestbook Email Validation Bug fix
-
-Guestbook UI Form: Email address is now checked for valid email format
diff --git a/doc/release-notes/10688_whitespace_trimming.md b/doc/release-notes/10688_whitespace_trimming.md
deleted file mode 100644
index 52904c00fbf..00000000000
--- a/doc/release-notes/10688_whitespace_trimming.md
+++ /dev/null
@@ -1,6 +0,0 @@
-### Added whitespace trimming to uploaded custom metadata TSV files
-
-When loading custom metadata blocks using the `api/admin/datasetfield/load` API, whitespace can be introduced into field names.
-This change trims whitespace at the beginning and end of all values read into the API before persisting them.
-
-For more information, see #10688.
diff --git a/doc/release-notes/10697-improve-permission-indexing.md b/doc/release-notes/10697-improve-permission-indexing.md
deleted file mode 100644
index b232b1c4d3c..00000000000
--- a/doc/release-notes/10697-improve-permission-indexing.md
+++ /dev/null
@@ -1,7 +0,0 @@
-### Reindexing after a role assignment is less memory intensive
-
-Adding/removing a user from a role on a collection, particularly the root collection, could lead to a significant increase in memory use resulting in Dataverse itself failing with an out-of-memory condition. Such changes now consume much less memory.
-
-If you have experienced out-of-memory failures in Dataverse in the past that could have been caused by this problem, you may wish to run a [reindex in place](https://guides.dataverse.org/en/latest/admin/solr-search-index.html#reindex-in-place) to update any out-of-date information.
-
-For more information, see #10697 and #10698.
diff --git a/doc/release-notes/10708 - MDC Citation and DOI parsing improvements.md b/doc/release-notes/10708 - MDC Citation and DOI parsing improvements.md
deleted file mode 100644
index 86c1bb14d32..00000000000
--- a/doc/release-notes/10708 - MDC Citation and DOI parsing improvements.md
+++ /dev/null
@@ -1,3 +0,0 @@
-MDC Citation retrieval with the PID settings has been fixed.
-PID parsing in Dataverse is now case insensitive, improving interaction with services that may change the case of PIDs.
-Warnings related to managed/excluded PID lists for PID providers have been reduced
diff --git a/doc/release-notes/10742-newest-oldest-sort-order-backwards.md b/doc/release-notes/10742-newest-oldest-sort-order-backwards.md
deleted file mode 100644
index 0afaf45449d..00000000000
--- a/doc/release-notes/10742-newest-oldest-sort-order-backwards.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Minor bug fix to UI to fix the order of the files on the Dataset Files page when ordering by Date
-
-A fix was made to the ui to fix the ordering 'Newest' and 'Oldest' which were reversed
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index b66ae2f1b21..47034806d90 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -33,6 +33,14 @@ See also #8184, #8185, #10950, and #10961.
Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made signficantly more scalable. See #10814 and #10818.
+### Reindexing After a Role Assignment is Less Memory Intensive
+
+Adding or removing a user from a role on a collection, particularly the root collection, could lead to a significant increase in memory use, resulting in Dataverse itself failing with an out-of-memory condition. Such changes now consume much less memory.
+
+If you have experienced out-of-memory failures in Dataverse in the past that could have been caused by this problem, you may wish to run a [reindex in place](https://guides.dataverse.org/en/latest/admin/solr-search-index.html#reindex-in-place) to update any out-of-date information.
+
+For more information, see #10697 and #10698.
+
### PostgreSQL and Flyway Updates
This release bumps the version of PostgreSQL and Flyway used in containers as well as the PostgreSQL JDBC driver used all installations, including classic (non-Docker) installations. PostgreSQL and its driver have been bumped to version 17. Flyway has been bumped to version 10.
@@ -79,6 +87,14 @@ When harvesting using the DDI format, datasets can now have multiple "otherId" v
## Bugs Fixed
+### Sort Order for Files
+
+"Newest" and "Oldest" were reversed when sorting files on the dataset landing page. This has been fixed. See #10742 and #11000.
+
+### Guestbook Email Validation
+
+In the Guestbook UI form, the email address is now checked for validity. See #10661 and #11022.
+
### Updating Files Now Possible When Latest and Only Dataset Version is Deaccessioned
When a dataset was deaccessioned and was the only previous version it would cause an error when trying to update the files. This has been fixed. See #9351 and #10901.
@@ -109,6 +125,10 @@ A bug fix was made that gets the major version of a Dataset when all major versi
A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.5/admin/metadataexport.html#batch-exports-through-the-api) or by steps 9 and 10 in the [v6.4 release notes](https://github.com/IQSS/dataverse/releases/tag/v6.4) to update and re-export all datasets. See also #10919.
+### PIDs and Make Data Count Citation Retrieval
+
+Make Data Count (MDC) citation retrieval with the PID settings has been fixed. PID parsing in Dataverse is now case insensitive, improving interaction with services that may change the case of PIDs. Warnings related to managed/excluded PID lists for PID providers have been reduced. See #10708.
+
### Globus "missing properties" Logging Fixed
In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030 for details.
@@ -145,6 +165,10 @@ Previously, not setting these fields meant using a copy of the settings from the
The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
+### Whitespace Trimming When Loading Metadata Block TSV Files
+
+When loading custom metadata blocks using the `api/admin/datasetfield/load` API, whitespace can be introduced into field names. Whitespace is now trimmed from the beginning and end of all values read into the API before persisting them. See #10688 and #10696.
+
### Image URLs from the Search API
As of 6.4 (thanks to #10855) `image_url` is being returned from the Search API. The logic has been updated to only show the image if each of the following are true:
@@ -157,6 +181,17 @@ As of 6.4 (thanks to #10855) `image_url` is being returned from the Search API.
See also #10875 and #10886.
+### Metrics API Bug Fixes
+
+Two bugs in the Metrics API have been fixed:
+
+- The /datasets and /datasets/byMonth endpoints could report incorrect values if/when they have been called using the dataLocation parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
+
+- Metrics endpoints who's calculation relied on finding the latest published datasetversion were incorrect if/when the minor version number was > 9.
+
+When deploying the new release, the [/api/admin/clearMetricsCache](https://guides.dataverse.org/en/latest/api/native-api.html#metrics) API should be called to remove old cached values that may be incorrect.
+See #10379 and #10865.
+
## API Tokens
An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#recreate-a-token), #10857 and #10858.
From cabf738f0d94495c7156dcc3a48feefd51f72a17 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 15:23:10 -0500
Subject: [PATCH 189/226] fix URLs #10952
---
doc/release-notes/6.5-release-notes.md | 30 +++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 47034806d90..c12da62009a 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -25,7 +25,7 @@ Also, additional information about the creation of Preview URLs has been added t
Any Private URLs created in previous versions of Dataverse will continue to work.
-The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://dataverse-guide--10961.org.readthedocs.build/en/10961/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
+The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
See also #8184, #8185, #10950, and #10961.
@@ -59,7 +59,7 @@ See also #10889 and #10912.
Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
-See also [the docs](https://dataverse-guide--10940.org.readthedocs.build/en/10940/container/running/demo.html#multiple-languages), #10939, and #10940.
+See also [the docs](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
### GlobusBatchLookupSize
@@ -73,11 +73,11 @@ Some repository extend the "oai_dc" metadata prefix with specific namespaces. In
Harvesting of these datasets has been fixed by excluding tags with namespaces that are not "dc:" and harvest only metadata with the "dc" namespace. See #10837.
-### Harvested Dataset PID from Record Header
+### Harvested Dataset PID from Record Header
When harvesting, Dataverse can now use the identifier from the OAI-PMH record header as the persistent id for the harvested dataset.
-This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid DOIs or handles as the OAI-PMH record header identifiers.
+This will allow harvesting from sources that do not include a persistent id in their oai_dc metadata records, but use valid DOIs or handles as the OAI-PMH record header identifiers.
It is also possible to optionally configure a harvesting client to use this OAI-PMH identifier as the **preferred** choice for the persistent id. See the [Harvesting Clients API](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-harvesting-client) section of the Guides, #11049 and #10982 for more information.
@@ -137,7 +137,7 @@ In previous releases, logging would show Globus-related strings were missing fro
### Editing Collections
-A new endpoint (`PUT /api/dataverses/`) for updating an existing collection (dataverse) has been added. It uses the same JSON structure as the one used for collection creation. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#update-a-dataverse-collection), #10904, and #10925.
+A new endpoint (`PUT /api/dataverses/`) for updating an existing collection (dataverse) has been added. It uses the same JSON structure as the one used for collection creation. See also [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#update-a-dataverse-collection), #10904, and #10925.
### fileCount Added to Search API
@@ -145,25 +145,25 @@ A new search field called `fileCount` can be searched to discover the number of
### List Dataset Metadata Exporters
-A list of available dataset metadata exporters can now be retrieved programmatically via API. See [the docs](https://dataverse-guide--10739.org.readthedocs.build/en/10739/api/native-api.html#get-export-formats) and #10739.
+A list of available dataset metadata exporters can now be retrieved programmatically via API. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#get-export-formats) and #10739.
### Comparing Dataset Versions
-An API has been added to compare dataset versions. See [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#compare-versions-of-a-dataset), #10888, and #10945.
+An API has been added to compare dataset versions. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#compare-versions-of-a-dataset), #10888, and #10945.
### Audit Data Files
-A superuser-only API endpoint has been added to audit datasets with data files where the physical files are missing or the file metadata is missing. See [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220).
+A superuser-only API endpoint has been added to audit datasets with data files where the physical files are missing or the file metadata is missing. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220).
### Update Collection API Inheritance
The update collection (dataverse) API endpoint has been updated to support an "inherit from parent" configuration for metadata blocks, facets, and input levels.
-Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync.. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
+Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync.. See also [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
### isMetadataBlockRoot and isFacetRoot
-The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
+The JSON payload of the "get collection" endpoint has been extended to include properties isMetadataBlockRoot and isFacetRoot. See also [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#view-a-dataverse-collection), #11012, and #11013.
### Whitespace Trimming When Loading Metadata Block TSV Files
@@ -185,16 +185,16 @@ See also #10875 and #10886.
Two bugs in the Metrics API have been fixed:
-- The /datasets and /datasets/byMonth endpoints could report incorrect values if/when they have been called using the dataLocation parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
+- The /datasets and /datasets/byMonth endpoints could report incorrect values if/when they have been called using the dataLocation parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
-- Metrics endpoints who's calculation relied on finding the latest published datasetversion were incorrect if/when the minor version number was > 9.
+- Metrics endpoints who's calculation relied on finding the latest published datasetversion were incorrect if/when the minor version number was > 9.
When deploying the new release, the [/api/admin/clearMetricsCache](https://guides.dataverse.org/en/latest/api/native-api.html#metrics) API should be called to remove old cached values that may be incorrect.
See #10379 and #10865.
## API Tokens
-An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://preview.guides.gdcc.io/en/develop/api/native-api.html#recreate-a-token), #10857 and #10858.
+An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#recreate-a-token), #10857 and #10858.
The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information. Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
@@ -204,11 +204,11 @@ The `/api/users/token` endpoint has been extended to support any auth mechanism
## Backward Incompatible Changes
-Generally speaking, see the [API Changelog](https://preview.guides.gdcc.io/en/develop/api/changelog.html) for a list of backward-incompatible changes.
+Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/6.5/api/changelog.html) for a list of backward-incompatible changes.
### List Collections Linked to a Dataset
-The API endpoint that returns a list of collections that a dataset has been linked to has been improved to provide a more structured JSON response. See [the docs](https://dataverse-guide--9665.org.readthedocs.build/en/9665/admin/dataverses-datasets.html#list-collections-that-are-linked-from-a-dataset), #9650, and #9665.
+The API endpoint that returns a list of collections that a dataset has been linked to has been improved to provide a more structured JSON response. See [the docs](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#list-collections-that-are-linked-from-a-dataset), #9650, and #9665.
## Complete List of Changes
From 8d1b4a18dc2a40b29d48b797387cf8d4f1d5d07e Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 15:40:06 -0500
Subject: [PATCH 190/226] add highlights and rework content a bit #10952
---
doc/release-notes/6.5-release-notes.md | 37 +++++++++++++++-----------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index c12da62009a..c2d21062914 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -6,18 +6,19 @@ This release brings new features, enhancements, and bug fixes to Dataverse. Than
## Release Highlights
-New features in Dataverse 6.5:
-
+Highlights in Dataverse 6.5 include:
+
+- new API endpoints, including editing of collections, Search API file counts, listing of exporters, comparing dataset versions, and auditing data files
+- UX improvements, especially Preview URLs
+- increased harvesting flexibility
+- performance gains
+- a security vulnerability addressed
+- many bugs fixes
- and more! Please see below.
-
## Features Added
-### Longer Custom Questions in Guestbooks
-
-Custom questions in Guestbooks can now be more than 255 characters and the bug causing a silent failure when questions were longer than this limit has been fixed. See also #9492, #10117, #10118.
-
-### Private URL Renamed to Preview URL
+### Private URL Renamed to Preview URL and Improved
With this release the name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
@@ -41,6 +42,10 @@ If you have experienced out-of-memory failures in Dataverse in the past that cou
For more information, see #10697 and #10698.
+### Longer Custom Questions in Guestbooks
+
+Custom questions in Guestbooks can now be more than 255 characters and the bug causing a silent failure when questions were longer than this limit has been fixed. See also #9492, #10117, #10118.
+
### PostgreSQL and Flyway Updates
This release bumps the version of PostgreSQL and Flyway used in containers as well as the PostgreSQL JDBC driver used all installations, including classic (non-Docker) installations. PostgreSQL and its driver have been bumped to version 17. Flyway has been bumped to version 10.
@@ -61,12 +66,6 @@ Configuration and documentation has been added to explain how to set up multiple
See also [the docs](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
-### GlobusBatchLookupSize
-
-An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
-
-See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides, #10977, and #11040 for more information.
-
### Harvesting "oai_dc" Metadata Prefix When Extended With Specific Namespaces
Some repository extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets was not possible because an XML parsing error was raised.
@@ -85,6 +84,12 @@ It is also possible to optionally configure a harvesting client to use this OAI-
When harvesting using the DDI format, datasets can now have multiple "otherId" values. See #10772.
+### GlobusBatchLookupSize
+
+An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
+
+See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides, #10977, and #11040 for more information.
+
## Bugs Fixed
### Sort Order for Files
@@ -99,7 +104,7 @@ In the Guestbook UI form, the email address is now checked for validity. See #10
When a dataset was deaccessioned and was the only previous version it would cause an error when trying to update the files. This has been fixed. See #9351 and #10901.
-### My Data Filter by Username Feature Fixed
+### My Data Filter by Username Feature Restored
The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
@@ -121,7 +126,7 @@ This version of Dataverse fix this, and includes internationalization in the fac
A bug fix was made that gets the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published. This fix affects the indexing, meaning these datasets must be re-indexed once Dataverse is updated. See also #10947 and #10974.
-### Minor DataCiteXML Fix
+### Minor DataCiteXML Fix (Useless Null)
A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.5/admin/metadataexport.html#batch-exports-through-the-api) or by steps 9 and 10 in the [v6.4 release notes](https://github.com/IQSS/dataverse/releases/tag/v6.4) to update and re-export all datasets. See also #10919.
From 7503ea36833834890ba9e8edd99f037610e775ba Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 15:48:50 -0500
Subject: [PATCH 191/226] add Relation Type bug (no release note snippet)
#10952 #10926
---
doc/release-notes/6.5-release-notes.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index c2d21062914..3d18d1ae197 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -92,6 +92,10 @@ See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/con
## Bugs Fixed
+### Relation Type (Related Publication) and DataCite
+
+The subfield "Relation Type" was added to the field "Related Publication" in Dataverse 6.4 (#10632) but couldn't be used without workarounds described in an [announcement](https://groups.google.com/g/dataverse-community/c/zlRGJtu3x4g/m/GtVZ26uaBQAJ) about the problem. The bug has been fixed and workarounds and are longer required. See also #10926.
+
### Sort Order for Files
"Newest" and "Oldest" were reversed when sorting files on the dataset landing page. This has been fixed. See #10742 and #11000.
From 77834a24a64ad8e29c377cb836a0d3128a9af846 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 15:50:57 -0500
Subject: [PATCH 192/226] demo docker feature, fix heading #10952
---
doc/release-notes/6.5-release-notes.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 3d18d1ae197..30a2fad5504 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -60,12 +60,6 @@ The Docker compose file used for [evaluations or demos](https://guides.dataverse
See also #10889 and #10912.
-## Multiple Languages in Docker
-
-Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
-
-See also [the docs](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
-
### Harvesting "oai_dc" Metadata Prefix When Extended With Specific Namespaces
Some repository extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets was not possible because an XML parsing error was raised.
@@ -84,6 +78,12 @@ It is also possible to optionally configure a harvesting client to use this OAI-
When harvesting using the DDI format, datasets can now have multiple "otherId" values. See #10772.
+### Multiple Languages in Docker
+
+Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
+
+See also [the docs](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
+
### GlobusBatchLookupSize
An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
From 8ce290902a1d4a3ea2bb54f7f2474b5102f0724a Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 16:02:06 -0500
Subject: [PATCH 193/226] tweaks #10952
---
doc/release-notes/6.5-release-notes.md | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 30a2fad5504..45b53c673b7 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -132,7 +132,7 @@ A bug fix was made that gets the major version of a Dataset when all major versi
### Minor DataCiteXML Fix (Useless Null)
-A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.5/admin/metadataexport.html#batch-exports-through-the-api) or by steps 9 and 10 in the [v6.4 release notes](https://github.com/IQSS/dataverse/releases/tag/v6.4) to update and re-export all datasets. See also #10919.
+A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML sent to DataCite and in the DataCite export when a dataset has a metadata entry for "Software Name" and no entry for "Software Version". The bug fix will update datasets upon publication. Anyone with existing published datasets with this problem can be fixed by [pushing updated metadata to DataCite for affected datasets](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-a-published-dataset-at-the-pid-provider) and [re-exporting the dataset metadata](https://guides.dataverse.org/en/6.5/admin/metadataexport.html#batch-exports-through-the-api). See "Pushing updated metadata to DataCite" in the upgrade instructions below. See also #10919.
### PIDs and Make Data Count Citation Retrieval
@@ -201,7 +201,7 @@ Two bugs in the Metrics API have been fixed:
When deploying the new release, the [/api/admin/clearMetricsCache](https://guides.dataverse.org/en/latest/api/native-api.html#metrics) API should be called to remove old cached values that may be incorrect.
See #10379 and #10865.
-## API Tokens
+### API Tokens
An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#recreate-a-token), #10857 and #10858.
@@ -219,7 +219,6 @@ Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/6.5/
The API endpoint that returns a list of collections that a dataset has been linked to has been improved to provide a more structured JSON response. See [the docs](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#list-collections-that-are-linked-from-a-dataset), #9650, and #9665.
-
## Complete List of Changes
For the complete list of code changes in this release, see the [6.5 milestone](https://github.com/IQSS/dataverse/issues?q=milestone%3A6.5+is%3Aclosed) in GitHub.
@@ -228,7 +227,6 @@ For the complete list of code changes in this release, see the [6.5 milestone](h
For help with upgrading, installing, or general questions please post to the [Dataverse Community Google Group](https://groups.google.com/g/dataverse-community) or email support@dataverse.org.
-
## Installation
If this is a new installation, please follow our [Installation Guide](https://guides.dataverse.org/en/latest/installation/). Please don't be shy about [asking for help](https://guides.dataverse.org/en/latest/installation/intro.html#getting-help) if you need it!
@@ -297,13 +295,7 @@ service payara start
6\. Update metadata blocks
-These changes reflect incremental improvements made to the handling of core metadata fields.
-
-```shell
-wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/scripts/api/data/metadatablocks/citation.tsv
-
-curl http://localhost:8080/api/admin/datasetfield/load -H "Content-type: text/tab-separated-values" -X POST --upload-file citation.tsv
-```
+No changes required for this release.
7\. Update Solr schema.xml file. Start with the standard v6.4 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 7a).
@@ -350,8 +342,6 @@ The API above rebuilds the existing index "in place". If you want to be absolute
9\. Run reExportAll to update dataset metadata exports
-This step is necessary because of changes described above for the `Datacite` and `oai_dc` export formats.
-
Below is the simple way to reexport all dataset metadata. For more advanced usage, please see [the guides](http://guides.dataverse.org/en/6.4/admin/metadataexport.html#batch-exports-through-the-api).
```shell
@@ -360,11 +350,9 @@ curl http://localhost:8080/api/admin/metadata/reExportAll
10\. Pushing updated metadata to DataCite
-(If you don't use DataCite, you can skip this.)
+(If you don't use DataCite, you can skip this. Also, if you aren't affected by the "useless null" bug described above, you can skip this.)
-Above you updated the citation metadata block and Solr with the new "relationType" field. With these two changes, the "Relation Type" fields will be available and creation/publication of datasets will result in the expanded XML being sent to DataCite. You've also already run "reExportAll" to update the `Datacite` metadata export format.
-
-Entries at DataCite for published datasets can be updated by a superuser using an API call (newly [documented](https://guides.dataverse.org/en/6.4/admin/dataverses-datasets.html#update-metadata-for-all-published-datasets-at-the-pid-provider)):
+Entries at DataCite for published datasets can be updated by a superuser using an API call (newly [documented](https://guides.dataverse.org/en/6.5/admin/dataverses-datasets.html#update-metadata-for-all-published-datasets-at-the-pid-provider)):
`curl -X POST -H 'X-Dataverse-key:' http://localhost:8080/api/datasets/modifyRegistrationPIDMetadataAll`
@@ -377,5 +365,3 @@ Failures may occur if PIDs were never registered, or if they were never made fin
PIDs can also be updated by a superuser on a per-dataset basis using
`curl -X POST -H 'X-Dataverse-key:' http://localhost:8080/api/datasets//modifyRegistrationMetadata`
-
-### Additional Upgrade Steps
From 7885fa26db09a06d3c4e49e59a266d2b8ed3ec9b Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 16:13:42 -0500
Subject: [PATCH 194/226] typo
Co-authored-by: Omer Fahim
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 45b53c673b7..60d26b58c70 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -13,7 +13,7 @@ Highlights in Dataverse 6.5 include:
- increased harvesting flexibility
- performance gains
- a security vulnerability addressed
-- many bugs fixes
+- many bug fixes
- and more! Please see below.
## Features Added
From 48d77d33ab6dada93495e445d7ac1d197759b06f Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Thu, 5 Dec 2024 16:14:01 -0500
Subject: [PATCH 195/226] spelling
Co-authored-by: Omer Fahim
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 60d26b58c70..4d900b12485 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -32,7 +32,7 @@ See also #8184, #8185, #10950, and #10961.
### More Scalable Dataset Version Differencing
-Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made signficantly more scalable. See #10814 and #10818.
+Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made significantly more scalable. See #10814 and #10818.
### Reindexing After a Role Assignment is Less Memory Intensive
From 5e21b80dcc9c140da8afed4de8ac50ac8f878fab Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 12:35:53 -0500
Subject: [PATCH 196/226] remove trailing `
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 4d900b12485..7488013b1dd 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -249,7 +249,7 @@ If you are running Payara as a non-root user (and you should be!), **remember no
In the following commands, we assume that Payara 6 is installed in `/usr/local/payara6`. If not, adjust as needed.
```shell
-export PAYARA=/usr/local/payara6`
+export PAYARA=/usr/local/payara6
```
(or `setenv PAYARA /usr/local/payara6` if you are using a `csh`-like shell)
From 6cf718e24819040c030391c99dcec12597393494 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 12:55:25 -0500
Subject: [PATCH 197/226] tweak deploy step, remove mdb update and schema.xml
steps (not needed) #10952
---
doc/release-notes/6.5-release-notes.md | 61 +++++++-------------------
1 file changed, 15 insertions(+), 46 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 7488013b1dd..3d05f9e9edb 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -254,20 +254,26 @@ export PAYARA=/usr/local/payara6
(or `setenv PAYARA /usr/local/payara6` if you are using a `csh`-like shell)
-1\. Undeploy the previous version
+1\. List deployed applications
+
+```shell
+$PAYARA/bin/asadmin list-applications
+```
+
+2\. Undeploy the previous version (should match "list-applications" above)
```shell
$PAYARA/bin/asadmin undeploy dataverse-6.4
```
-2\. Stop and start Payara
+3\. Stop and start Payara
```shell
-service payara stop
+sudo service payara stop
sudo service payara start
```
-3\. Deploy this version
+4\. Deploy this version
```shell
$PAYARA/bin/asadmin deploy dataverse-6.5.war
@@ -282,55 +288,18 @@ rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
```
-4\. For installations with internationalization:
+5\. For installations with internationalization:
Please remember to update translations via [Dataverse language packs](https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs).
-5\. Restart Payara
+6\. Restart Payara
```shell
service payara stop
service payara start
```
-6\. Update metadata blocks
-
-No changes required for this release.
-
-7\. Update Solr schema.xml file. Start with the standard v6.4 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 7a).
-
-Stop Solr (usually `service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.4/installation/prerequisites.html#solr-init-script)).
-
-```shell
-service solr stop
-```
-
-Replace schema.xml
-
-```shell
-wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/conf/solr/schema.xml
-cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
-```
-
-Start Solr (but if you use any custom metadata blocks, perform the next step, 7a first).
-
-```shell
-service solr start
-```
-
-7a\. For installations with custom or experimental metadata blocks:
-
-Before starting Solr, update the schema to include all the extra metadata fields that your installation uses. We do this by collecting the output of the Dataverse schema API and feeding it to the `update-fields.sh` script that we supply, as in the example below (modify the command lines as needed to reflect the names of the directories, if different):
-
-```shell
- wget https://raw.githubusercontent.com/IQSS/dataverse/v6.4/conf/solr/update-fields.sh
- chmod +x update-fields.sh
- curl "http://localhost:8080/api/admin/index/solr/schema" | ./update-fields.sh /usr/local/solr/solr-9.4.1/server/solr/collection1/conf/schema.xml
-```
-
-Now start Solr.
-
-8\. Reindex Solr
+7\. Reindex Solr
Below is the simplest way to reindex Solr:
@@ -340,7 +309,7 @@ curl http://localhost:8080/api/admin/index
The API above rebuilds the existing index "in place". If you want to be absolutely sure that your index is up-to-date and consistent, you may consider wiping it clean and reindexing everything from scratch (see [the guides](https://guides.dataverse.org/en/latest/admin/solr-search-index.html)). Just note that, depending on the size of your database, a full reindex may take a while and the users will be seeing incomplete search results during that window.
-9\. Run reExportAll to update dataset metadata exports
+8\. Run reExportAll to update dataset metadata exports
Below is the simple way to reexport all dataset metadata. For more advanced usage, please see [the guides](http://guides.dataverse.org/en/6.4/admin/metadataexport.html#batch-exports-through-the-api).
@@ -348,7 +317,7 @@ Below is the simple way to reexport all dataset metadata. For more advanced usag
curl http://localhost:8080/api/admin/metadata/reExportAll
```
-10\. Pushing updated metadata to DataCite
+9\. Pushing updated metadata to DataCite
(If you don't use DataCite, you can skip this. Also, if you aren't affected by the "useless null" bug described above, you can skip this.)
From a66c0857e4b1f016666faa71811406600e348d20 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 12:56:42 -0500
Subject: [PATCH 198/226] more sudo #10952
---
doc/release-notes/6.5-release-notes.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 3d05f9e9edb..e21fd0ce0fd 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -295,8 +295,8 @@ Please remember to update translations via [Dataverse language packs](https://gi
6\. Restart Payara
```shell
-service payara stop
-service payara start
+sudo service payara stop
+sudo service payara start
```
7\. Reindex Solr
From 0a82885f1825824122883b2bcd25d397a938d3da Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 13:13:24 -0500
Subject: [PATCH 199/226] whoops, we do need to update schema.xml #10952
---
doc/release-notes/6.5-release-notes.md | 51 +++++++++++++++++++++++---
1 file changed, 46 insertions(+), 5 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index e21fd0ce0fd..e58a6fcce4b 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -150,7 +150,7 @@ A new endpoint (`PUT /api/dataverses/`) for updating an existing col
### fileCount Added to Search API
-A new search field called `fileCount` can be searched to discover the number of files per dataset. See also #8941 and #10598.
+A new search field called `fileCount` can be searched to discover the number of files per dataset. The upgrade instructions below explain how to update your Solr `schema.xml` file to add the new field. See also #8941 and #10598.
### List Dataset Metadata Exporters
@@ -282,7 +282,7 @@ $PAYARA/bin/asadmin deploy dataverse-6.5.war
Note: if you have any trouble deploying, stop Payara, remove the following directories, start Payara, and try to deploy again.
```shell
-service payara stop
+sudo service payara stop
rm -rf $PAYARA/glassfish/domains/domain1/generated
rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
@@ -298,8 +298,49 @@ Please remember to update translations via [Dataverse language packs](https://gi
sudo service payara stop
sudo service payara start
```
+7\. Update Solr schema.xml file. Start with the standard v6.5 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 7a).
+
+Stop Solr (usually `sudo service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.5/installation/prerequisites.html#solr-init-script)).
+
+```shell
+sudo service solr stop
+```
+
+Replace schema.xml
+
+```shell
+wget https://raw.githubusercontent.com/IQSS/dataverse/v6.5/conf/solr/schema.xml
+cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
+```
+
+Start Solr (but if you use any custom metadata blocks, perform the next step, 7a first).
+
+```shell
+sudo service solr start
+```
+
+7a\. For installations with custom or experimental metadata blocks:
+
+Before starting Solr, update the `schema.xml` file to include all the extra metadata fields that your installation uses.
+
+We do this by collecting the output of Dataverse's Solr schema API endpoint (`/api/admin/index/solr/schema`) and piping it to the `update-fields.sh` script which updates the `schema.xml` file supplied as an argument.
+
+The example below assumes the default installation location of Solr, but you can modify the commands as needed.
+
+```shell
+wget https://raw.githubusercontent.com/IQSS/dataverse/v6.5/conf/solr/update-fields.sh
+chmod +x update-fields.sh
+curl "http://localhost:8080/api/admin/index/solr/schema" | sudo ./update-fields.sh /usr/local/solr/solr-9.4.1/server/solr/collection1/conf/schema.xml
+```
+
+Now start Solr.
+
+
+```shell
+sudo service solr start
+```
-7\. Reindex Solr
+8\. Reindex Solr
Below is the simplest way to reindex Solr:
@@ -309,7 +350,7 @@ curl http://localhost:8080/api/admin/index
The API above rebuilds the existing index "in place". If you want to be absolutely sure that your index is up-to-date and consistent, you may consider wiping it clean and reindexing everything from scratch (see [the guides](https://guides.dataverse.org/en/latest/admin/solr-search-index.html)). Just note that, depending on the size of your database, a full reindex may take a while and the users will be seeing incomplete search results during that window.
-8\. Run reExportAll to update dataset metadata exports
+9\. Run reExportAll to update dataset metadata exports
Below is the simple way to reexport all dataset metadata. For more advanced usage, please see [the guides](http://guides.dataverse.org/en/6.4/admin/metadataexport.html#batch-exports-through-the-api).
@@ -317,7 +358,7 @@ Below is the simple way to reexport all dataset metadata. For more advanced usag
curl http://localhost:8080/api/admin/metadata/reExportAll
```
-9\. Pushing updated metadata to DataCite
+10\. Pushing updated metadata to DataCite
(If you don't use DataCite, you can skip this. Also, if you aren't affected by the "useless null" bug described above, you can skip this.)
From 83c22b212543e37e675c25c782b242518bb0a584 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 13:17:04 -0500
Subject: [PATCH 200/226] yet more sudo and call out non-root user #10952
---
doc/release-notes/6.5-release-notes.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index e58a6fcce4b..b288794b9e6 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -300,6 +300,8 @@ sudo service payara start
```
7\. Update Solr schema.xml file. Start with the standard v6.5 schema.xml, then, if your installation uses any custom or experimental metadata blocks, update it to include the extra fields (step 7a).
+Run the commands below as a non-root user.
+
Stop Solr (usually `sudo service solr stop`, depending on Solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/6.5/installation/prerequisites.html#solr-init-script)).
```shell
@@ -310,7 +312,7 @@ Replace schema.xml
```shell
wget https://raw.githubusercontent.com/IQSS/dataverse/v6.5/conf/solr/schema.xml
-cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
+sudo cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
```
Start Solr (but if you use any custom metadata blocks, perform the next step, 7a first).
From c1df8c5108dc73dc28b03b8e1fafd7e3eefaa39e Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 14:10:49 -0500
Subject: [PATCH 201/226] tweaks #10952
---
doc/release-notes/6.5-release-notes.md | 44 ++++++++++++--------------
1 file changed, 20 insertions(+), 24 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index b288794b9e6..62ff9ba6e93 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -1,18 +1,18 @@
# Dataverse 6.5
-Please note: To read these instructions in full, please go to https://github.com/IQSS/dataverse/releases/tag/v6.5 rather than the list of releases, which will cut them off.
+Please note: To read these instructions in full, please go to https://github.com/IQSS/dataverse/releases/tag/v6.5 rather than the [list of releases](https://github.com/IQSS/dataverse/releases), which will cut them off.
-This release brings new features, enhancements, and bug fixes to Dataverse. Thank you to all of the community members who contributed code, suggestions, bug reports, and other assistance across the project.
+This release brings new features, enhancements, and bug fixes to Dataverse. Thank you to all of the community members who contributed code, suggestions, bug reports, and other assistance across the project!
## Release Highlights
-Highlights in Dataverse 6.5 include:
+Highlights for Dataverse 6.5 include:
- new API endpoints, including editing of collections, Search API file counts, listing of exporters, comparing dataset versions, and auditing data files
- UX improvements, especially Preview URLs
- increased harvesting flexibility
- performance gains
-- a security vulnerability addressed
+- a [security vulnerability](https://github.com/IQSS/dataverse-security/issues/98) addressed
- many bug fixes
- and more! Please see below.
@@ -20,7 +20,7 @@ Highlights in Dataverse 6.5 include:
### Private URL Renamed to Preview URL and Improved
-With this release the name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
+The name of the URL that may be used by dataset administrators to share a draft version of a dataset has been changed from Private URL to Preview URL.
Also, additional information about the creation of Preview URLs has been added to the popup accessed via edit menu of the Dataset Page.
@@ -30,17 +30,17 @@ The old "privateUrl" API endpoints for the creation and deletion of Preview (for
See also #8184, #8185, #10950, and #10961.
-### More Scalable Dataset Version Differencing
+### Showing Differences Between Dataset Versions is More Scalable
-Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made significantly more scalable. See #10814 and #10818.
+Showing differences between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table, has been made significantly more scalable. See #10814 and #10818.
-### Reindexing After a Role Assignment is Less Memory Intensive
+### Version Differences Details Sorting Added
-Adding or removing a user from a role on a collection, particularly the root collection, could lead to a significant increase in memory use, resulting in Dataverse itself failing with an out-of-memory condition. Such changes now consume much less memory.
+In order to facilitate the comparison between the draft version and the published version of a dataset, a sort on subfields has been added. See #10969.
-If you have experienced out-of-memory failures in Dataverse in the past that could have been caused by this problem, you may wish to run a [reindex in place](https://guides.dataverse.org/en/latest/admin/solr-search-index.html#reindex-in-place) to update any out-of-date information.
+### Reindexing After a Role Assignment is Less Memory Intensive
-For more information, see #10697 and #10698.
+Adding or removing a user from a role on a collection, particularly the root collection, could lead to a significant increase in memory use, resulting in Dataverse itself failing with an out-of-memory condition. Such changes now consume much less memory. A Solr reindexing step is included in the upgrade instructions below. See also #10697 and #10698.
### Longer Custom Questions in Guestbooks
@@ -54,7 +54,7 @@ PostgreSQL 13 remains the version used with automated testing, leading us to con
As of Flyway 10, supporting older versions of PostgreSQL no longer requires a paid subscription. While we don't encourage the use of older PostgreSQL versions, this flexibility may benefit some of our long-standing installations in their upgrade paths.
-As part of this update, the containerized development environment now uses Postgres 17 instead of 16. Developers must delete their data (`rm -rf docker-dev-volumes`) and start with an empty database, as [explained](https://groups.google.com/g/dataverse-dev/c/ffoNj5UXyzU/m/nE5oGY_sAQAJ) on the dev mailing list. They can rerun the quickstart in the dev guide.
+As part of this update, the containerized development environment now uses Postgres 17 instead of 16. Developers must delete their data (`rm -rf docker-dev-volumes`) and start with an empty database (rerun the [quickstart](https://guides.dataverse.org/en/6.5/developers/dev-environment.html#quickstart) in the dev guide), as [explained](https://groups.google.com/g/dataverse-dev/c/ffoNj5UXyzU/m/nE5oGY_sAQAJ) on the dev mailing list.
The Docker compose file used for [evaluations or demos](https://guides.dataverse.org/en/6.4/container/running/demo.html) has been upgraded from Postgres 13 to 17.
@@ -62,9 +62,9 @@ See also #10889 and #10912.
### Harvesting "oai_dc" Metadata Prefix When Extended With Specific Namespaces
-Some repository extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets was not possible because an XML parsing error was raised.
+Some data repositories extend the "oai_dc" metadata prefix with specific namespaces. In this case, harvesting of these datasets into Dataverse was not possible because an XML parsing error was raised.
-Harvesting of these datasets has been fixed by excluding tags with namespaces that are not "dc:" and harvest only metadata with the "dc" namespace. See #10837.
+Harvesting of these datasets has been fixed by excluding tags with namespaces that are not "dc:". That is, only harvesting metadata with the "dc" namespace. See #10837.
### Harvested Dataset PID from Record Header
@@ -80,21 +80,21 @@ When harvesting using the DDI format, datasets can now have multiple "otherId" v
### Multiple Languages in Docker
-Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
+Documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
-See also [the docs](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
+See [the tutorial](https://guides.dataverse.org/en/6.5/container/running/demo.html#multiple-languages), #10939, and #10940.
### GlobusBatchLookupSize
An optimization has been added for the Globus upload workflow, with a corresponding new database setting: `:GlobusBatchLookupSize`
-See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the Guides, #10977, and #11040 for more information.
+See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/config.html#GlobusBatchLookupSize) section of the guides, #10977, and #11040 for more information.
## Bugs Fixed
### Relation Type (Related Publication) and DataCite
-The subfield "Relation Type" was added to the field "Related Publication" in Dataverse 6.4 (#10632) but couldn't be used without workarounds described in an [announcement](https://groups.google.com/g/dataverse-community/c/zlRGJtu3x4g/m/GtVZ26uaBQAJ) about the problem. The bug has been fixed and workarounds and are longer required. See also #10926.
+The subfield "Relation Type" was added to the field "Related Publication" in Dataverse 6.4 (#10632) but couldn't be used without workarounds described in an [announcement](https://groups.google.com/g/dataverse-community/c/zlRGJtu3x4g/m/GtVZ26uaBQAJ) about the problem. The bug has been fixed and workarounds and are longer required. See #10926 and the announcement above.
### Sort Order for Files
@@ -110,15 +110,11 @@ When a dataset was deaccessioned and was the only previous version it would caus
### My Data Filter by Username Feature Restored
-The superuser-only feature of filtering by a username on the My Data page was not working. The "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
+The superuser-only feature of filtering by a username on the My Data page was not working. This "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
### Better Handling of Parallel Edit/Publish Errors
-Improvements have been made in handling the errors when a dataset has been edited in one browser window and an attempt is made to edit/publish it in another. (This practice is discouraged.) See #10793 and #10794.
-
-### Version Differences Details Sorting Added
-
-In order to facilitate the comparison between the draft version and the published version of a dataset, a sort on subfields has been added. See #10969.
+Improvements have been made in handling the errors when a dataset has been edited in one browser window and an attempt is made to edit or publish it in another. (This practice is discouraged, by the way.) See #10793 and #10794.
### Facets Filter Labels Now Translated Above Search Results
From f19794b6e194f9168a49f5dfeca7e8c3187f7222 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 14:53:11 -0500
Subject: [PATCH 202/226] changes made in #9665 belong in 6.5 changelog, not
6.4
---
doc/sphinx-guides/source/api/changelog.rst | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst
index 92cd4fc941b..65700cf19d4 100644
--- a/doc/sphinx-guides/source/api/changelog.rst
+++ b/doc/sphinx-guides/source/api/changelog.rst
@@ -7,12 +7,16 @@ This API changelog is experimental and we would love feedback on its usefulness.
:local:
:depth: 1
+v6.5
+----
+
+- **/api/datasets/{identifier}/links**: The GET endpoint returns a list of Dataverses linked to the given Dataset. The format of the response has changes for v6.4 making it backward incompatible.
+
v6.4
----
- **/api/datasets/$dataset-id/modifyRegistration**: Changed from GET to POST
- **/api/datasets/modifyRegistrationPIDMetadataAll**: Changed from GET to POST
-- **/api/datasets/{identifier}/links**: The GET endpoint returns a list of Dataverses linked to the given Dataset. The format of the response has changes for v6.4 making it backward incompatible.
v6.3
----
From 38cff71317af86e60cb489b7cb5eb57b0103fcf1 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 15:11:38 -0500
Subject: [PATCH 203/226] reword and link to endpoint docs #9665
---
doc/sphinx-guides/source/admin/dataverses-datasets.rst | 2 ++
doc/sphinx-guides/source/api/changelog.rst | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/admin/dataverses-datasets.rst b/doc/sphinx-guides/source/admin/dataverses-datasets.rst
index 7c03a6f80c0..c6d325a9651 100644
--- a/doc/sphinx-guides/source/admin/dataverses-datasets.rst
+++ b/doc/sphinx-guides/source/admin/dataverses-datasets.rst
@@ -122,6 +122,8 @@ Creates a link between a dataset and a Dataverse collection (see the :ref:`datas
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT http://$SERVER/api/datasets/$linked-dataset-id/link/$linking-dataverse-alias
+.. _list-collections-linked-from-dataset:
+
List Collections that are Linked from a Dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst
index 65700cf19d4..8df2b5b67e1 100644
--- a/doc/sphinx-guides/source/api/changelog.rst
+++ b/doc/sphinx-guides/source/api/changelog.rst
@@ -10,7 +10,7 @@ This API changelog is experimental and we would love feedback on its usefulness.
v6.5
----
-- **/api/datasets/{identifier}/links**: The GET endpoint returns a list of Dataverses linked to the given Dataset. The format of the response has changes for v6.4 making it backward incompatible.
+- **/api/datasets/{identifier}/links**: The response from :ref:`list-collections-linked-from-dataset` has been improved to provide a more structured (but backward-incompatible) JSON response.
v6.4
----
From bafb91d85c7a9bacdf86202f8d081180cee5686e Mon Sep 17 00:00:00 2001
From: Jim Myers
Date: Fri, 6 Dec 2024 15:11:52 -0500
Subject: [PATCH 204/226] update query as native
---
.../java/edu/harvard/iq/dataverse/DataFileServiceBean.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java
index 98ac8ff387f..937f5693511 100644
--- a/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/DataFileServiceBean.java
@@ -1407,8 +1407,7 @@ public UploadSessionQuotaLimit getUploadSessionQuotaLimit(DvObjectContainer pare
}
public boolean isInReleasedVersion(Long id) {
- Query query = em.createQuery("SELECT fm.id FROM FileMetadata fm, DvObject dvo WHERE fm.datasetVersion.id=(SELECT dv.id FROM DatasetVersion dv WHERE dv.dataset.id=dvo.owner.id and dv.versionState=edu.harvard.iq.dataverse.DatasetVersion.VersionState.RELEASED ORDER BY dv.versionNumber DESC, dv.minorVersionNumber DESC LIMIT 1) AND dvo.id=fm.dataFile.id AND fm.dataFile.id=:fid");
- query.setParameter("fid", id);
+ Query query = em.createNativeQuery("SELECT fm.id FROM filemetadata fm WHERE fm.datasetversion_id=(SELECT dv.id FROM datasetversion dv, dvobject dvo WHERE dv.dataset_id=dvo.owner_id AND dv.versionState='RELEASED' and dvo.id=" + id + " ORDER BY dv.versionNumber DESC, dv.minorVersionNumber DESC LIMIT 1) AND fm.datafile_id=" + id);
try {
query.getSingleResult();
From deb2d8821bfba71e9836f03a6f7c127e2024f28c Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 15:15:18 -0500
Subject: [PATCH 205/226] many more tweaks #10952
---
doc/release-notes/6.5-release-notes.md | 55 +++++++++++++++-----------
1 file changed, 31 insertions(+), 24 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 62ff9ba6e93..afaa3a6021e 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -110,7 +110,7 @@ When a dataset was deaccessioned and was the only previous version it would caus
### My Data Filter by Username Feature Restored
-The superuser-only feature of filtering by a username on the My Data page was not working. This "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
+The superuser-only feature of filtering by a username on the My Data page was not working. Entering a username in the "Results for Username" field now returns data for the desired user. See also #7239 and #10980.
### Better Handling of Parallel Edit/Publish Errors
@@ -118,13 +118,11 @@ Improvements have been made in handling the errors when a dataset has been edite
### Facets Filter Labels Now Translated Above Search Results
-On the main page, it's possible to filter results using search facets. If internationalization (i18n) has been activated in the Dataverse installation, allowing pages to be displayed in several languages, the facets are translated in the filter column. However, they weren't being translated above the search results, remaining in the default language, English.
-
-This version of Dataverse fix this, and includes internationalization in the facets visible in the search results section. For more information, see #9408 and #10158.
+On the main page, it's possible to filter results using search facets. If internationalization (i18n) has been enabled in the Dataverse installation, allowing pages to be displayed in several languages, the facets were correctly translated in the filter column at the left. However, they were not being translated above the search results, remaining in the default language, English. This has been fixed. See #9408 and #10158.
### Unpublished File Bug Fix Related to Deaccessioning
-A bug fix was made that gets the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published. This fix affects the indexing, meaning these datasets must be re-indexed once Dataverse is updated. See also #10947 and #10974.
+A bug fix was made related to retrieval of the major version of a Dataset when all major versions were deaccessioned. This fixes the incorrect showing of the files as "Unpublished" in the search list even when they are published. In the upgrade instructions below, there is a step to reindex Solr. See also #10947 and #10974.
### Minor DataCiteXML Fix (Useless Null)
@@ -136,7 +134,7 @@ Make Data Count (MDC) citation retrieval with the PID settings has been fixed. P
### Globus "missing properties" Logging Fixed
-In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030 for details.
+In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030.
## API Updates
@@ -146,7 +144,7 @@ A new endpoint (`PUT /api/dataverses/`) for updating an existing col
### fileCount Added to Search API
-A new search field called `fileCount` can be searched to discover the number of files per dataset. The upgrade instructions below explain how to update your Solr `schema.xml` file to add the new field. See also #8941 and #10598.
+A new search field called `fileCount` can be searched to discover the number of files per dataset. The upgrade instructions below explain how to update your Solr `schema.xml` file to add the new field and reindex Solr. See also #8941 and #10598.
### List Dataset Metadata Exporters
@@ -164,7 +162,7 @@ A superuser-only API endpoint has been added to audit datasets with data files w
The update collection (dataverse) API endpoint has been updated to support an "inherit from parent" configuration for metadata blocks, facets, and input levels.
-Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync.. See also [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
+Previously, not setting these fields meant using a copy of the settings from the parent collection, which could get out of sync. See also [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#update-a-dataverse-collection), #11018, and #11026.
### isMetadataBlockRoot and isFacetRoot
@@ -172,17 +170,17 @@ The JSON payload of the "get collection" endpoint has been extended to include p
### Whitespace Trimming When Loading Metadata Block TSV Files
-When loading custom metadata blocks using the `api/admin/datasetfield/load` API, whitespace can be introduced into field names. Whitespace is now trimmed from the beginning and end of all values read into the API before persisting them. See #10688 and #10696.
+When loading custom metadata blocks using the `api/admin/datasetfield/load` API endpoint, whitespace can be introduced into field names. Whitespace is now trimmed from the beginning and end of all values read into the API before persisting them. See #10688 and #10696.
### Image URLs from the Search API
-As of 6.4 (thanks to #10855) `image_url` is being returned from the Search API. The logic has been updated to only show the image if each of the following are true:
+As of 6.4 (#10855) `image_url` is being returned from the Search API. The logic has been updated to only show the image if each of the following are true:
-1. The DataFile is not Harvested
-2. A Thumbnail is available for the Datafile
-3. If the Datafile is Restricted then the caller must have Download File Permission for the Datafile
-4. The Datafile is NOT actively embargoed
-5. The Datafile's retention period has NOT expired
+1. The data file is not harvested
+2. A thumbnail is available for the data file
+3. If the data file is restricted, then the caller must have DownloadFile permission for the data file
+4. The data file is NOT actively embargoed
+5. The data file's retention period has NOT expired
See also #10875 and #10886.
@@ -190,26 +188,27 @@ See also #10875 and #10886.
Two bugs in the Metrics API have been fixed:
-- The /datasets and /datasets/byMonth endpoints could report incorrect values if/when they have been called using the dataLocation parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
+- The /datasets and /datasets/byMonth endpoints could report incorrect values if or when they have been called using the "dataLocation" parameter (which allows getting metrics for local, remote (harvested), or all datasets) as the metrics cache was not storing different values for these cases.
+
+- Metrics endpoints whose calculation relied on finding the latest published dataset version were incorrect if/when the minor version number was > 9.
-- Metrics endpoints who's calculation relied on finding the latest published datasetversion were incorrect if/when the minor version number was > 9.
+The upgrade instructions below include a step for clearing the metrics cache.
-When deploying the new release, the [/api/admin/clearMetricsCache](https://guides.dataverse.org/en/latest/api/native-api.html#metrics) API should be called to remove old cached values that may be incorrect.
-See #10379 and #10865.
+See also #10379 and #10865.
### API Tokens
-An optional query parameter called "returnExpiration" has been added to the "/api/users/token/recreate" endpoint, which, if set to true, returns the expiration time in the response message. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#recreate-a-token), #10857 and #10858.
+An optional query parameter called "returnExpiration" has been added to the `/api/users/token/recreate` endpoint, which, if set to true, returns the expiration time in the response. See [the docs](https://guides.dataverse.org/en/6.5/api/native-api.html#recreate-a-token), #10857 and #10858.
-The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information. Previously, this endpoint only accepted an API token to retrieve its information. Now, it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
+The `/api/users/token` endpoint has been extended to support any auth mechanism for retrieving the token information. Previously this endpoint only accepted an API token to retrieve its information. Now it accepts any authentication mechanism and returns the associated API token information. See #10914 and #10924.
## Settings Added
-- :GlobusBatchLookupSize
+- `:GlobusBatchLookupSize`
## Backward Incompatible Changes
-Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/6.5/api/changelog.html) for a list of backward-incompatible changes.
+Generally speaking, see the [API Changelog](https://guides.dataverse.org/en/latest/api/changelog.html) for a list of backward-incompatible API changes.
### List Collections Linked to a Dataset
@@ -356,7 +355,15 @@ Below is the simple way to reexport all dataset metadata. For more advanced usag
curl http://localhost:8080/api/admin/metadata/reExportAll
```
-10\. Pushing updated metadata to DataCite
+10\. Clear metrics cache
+
+Run the [clearMetricsCache](https://guides.dataverse.org/en/6.5/api/native-api.html#metrics) API endpoint to remove old cached values that may be incorrect.
+
+```shell
+curl -X DELETE http://localhost:8080/api/admin/clearMetricsCache
+```
+
+11\. Pushing updated metadata to DataCite
(If you don't use DataCite, you can skip this. Also, if you aren't affected by the "useless null" bug described above, you can skip this.)
From 7611a212e25e82b68176a422c1f2a5925bde3dad Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 15:21:34 -0500
Subject: [PATCH 206/226] update how we use sudo #10952
---
doc/release-notes/6.5-release-notes.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index afaa3a6021e..fbe37f89baa 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -239,9 +239,9 @@ These instructions assume that you've already upgraded through all the 5.x relea
0\. These instructions assume that you are upgrading from the immediate previous version. If you are running an earlier version, the only supported way to upgrade is to progress through the upgrades to all the releases in between before attempting the upgrade to this version.
-If you are running Payara as a non-root user (and you should be!), **remember not to execute the commands below as root**. Use `sudo` to change to that user first. For example, `sudo -i -u dataverse` if `dataverse` is your dedicated application user.
+If you are running Payara as a non-root user (and you should be!), **remember not to execute the commands below as root**. By default, Payara runs as the `dataverse` user. In the commands below, we use sudo to run the commands as a non-root user.
-In the following commands, we assume that Payara 6 is installed in `/usr/local/payara6`. If not, adjust as needed.
+Also, we assume that Payara 6 is installed in `/usr/local/payara6`. If not, adjust as needed.
```shell
export PAYARA=/usr/local/payara6
From 2d0c584729860a422a80c19808187799c87588e8 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Fri, 6 Dec 2024 15:25:17 -0500
Subject: [PATCH 207/226] typo
---
doc/sphinx-guides/source/api/changelog.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/sphinx-guides/source/api/changelog.rst b/doc/sphinx-guides/source/api/changelog.rst
index 8df2b5b67e1..14958095658 100644
--- a/doc/sphinx-guides/source/api/changelog.rst
+++ b/doc/sphinx-guides/source/api/changelog.rst
@@ -1,7 +1,7 @@
API Changelog (Breaking Changes)
================================
-This API changelog is experimental and we would love feedback on its usefulness. Its primary purpose is to inform API developers of any breaking changes. (We try not ship any backward incompatible changes, but it happens.) To see a list of new APIs and backward-compatible changes to existing API, please see each version's release notes at https://github.com/IQSS/dataverse/releases
+This API changelog is experimental and we would love feedback on its usefulness. Its primary purpose is to inform API developers of any breaking changes. (We try not to ship any backward incompatible changes, but it happens.) To see a list of new APIs and backward-compatible changes to existing API, please see each version's release notes at https://github.com/IQSS/dataverse/releases
.. contents:: |toctitle|
:local:
From d3be336185929c3414fe0f114e5bb2a26efab887 Mon Sep 17 00:00:00 2001
From: Jim Myers
Date: Fri, 6 Dec 2024 18:17:37 -0500
Subject: [PATCH 208/226] cvoc fix, status fix, lower per-file logging
---
.../iq/dataverse/search/IndexServiceBean.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java
index f72973076ec..4efd339ee46 100644
--- a/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java
+++ b/src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java
@@ -1151,9 +1151,7 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, SetFeature Request/Idea: Harvest metadata values that aren't from a list of controlled values #9992
@@ -1301,7 +1299,6 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set
findPermissionsInSolrOnly() throws SearchException {
String dtype = dvObjectService.getDtype(id);
if (dtype == null) {
permissionInSolrOnly.add(docId);
- }
- if (dtype.equals(DType.Dataset.getDType())) {
+ }else if (dtype.equals(DType.Dataset.getDType())) {
List states = datasetService.getVersionStates(id);
if (states != null) {
String latestState = states.get(states.size() - 1);
@@ -2257,7 +2253,7 @@ public List findPermissionsInSolrOnly() throws SearchException {
} else if (dtype.equals(DType.DataFile.getDType())) {
List states = dataFileService.findVersionStates(id);
Set strings = states.stream().map(VersionState::toString).collect(Collectors.toSet());
- logger.fine("States for " + docId + ": " + String.join(", ", strings));
+ logger.finest("States for " + docId + ": " + String.join(", ", strings));
if (docId.endsWith("draft_permission")) {
if (!states.contains(VersionState.DRAFT)) {
permissionInSolrOnly.add(docId);
@@ -2271,7 +2267,7 @@ public List findPermissionsInSolrOnly() throws SearchException {
permissionInSolrOnly.add(docId);
} else {
if (!dataFileService.isInReleasedVersion(id)) {
- logger.fine("Adding doc " + docId + " to list of permissions in Solr only");
+ logger.finest("Adding doc " + docId + " to list of permissions in Solr only");
permissionInSolrOnly.add(docId);
}
}
From dd64ebbc55cac820b2bc7258982f9f8bee981c9b Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Mon, 9 Dec 2024 09:33:03 -0500
Subject: [PATCH 209/226] ever more sudo #10952
---
doc/release-notes/6.5-release-notes.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index fbe37f89baa..25caa64b145 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -278,9 +278,9 @@ Note: if you have any trouble deploying, stop Payara, remove the following direc
```shell
sudo service payara stop
-rm -rf $PAYARA/glassfish/domains/domain1/generated
-rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
-rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
+sudo rm -rf $PAYARA/glassfish/domains/domain1/generated
+sudo rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
+sudo rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
```
5\. For installations with internationalization:
From 98d68c95fa0fd303f2343bb45932682d587fd384 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Mon, 9 Dec 2024 10:19:13 -0500
Subject: [PATCH 210/226] explain how to download the war file before deploying
#10952
---
doc/release-notes/6.5-release-notes.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 25caa64b145..ad5d3575dd5 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -268,9 +268,10 @@ sudo service payara stop
sudo service payara start
```
-4\. Deploy this version
+4\. Download and deploy this version
```shell
+wget https://github.com/IQSS/dataverse/releases/download/v6.5/dataverse-6.5.war
$PAYARA/bin/asadmin deploy dataverse-6.5.war
```
From 48246a635753914e9bf1c3fcdb1560f8f15b7b26 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Mon, 9 Dec 2024 10:20:52 -0500
Subject: [PATCH 211/226] note that Solr dir can differ #10952
---
doc/release-notes/6.5-release-notes.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index ad5d3575dd5..019d437ed06 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -306,6 +306,8 @@ sudo service solr stop
Replace schema.xml
+Please note that the path to Solr may differ than the example below.
+
```shell
wget https://raw.githubusercontent.com/IQSS/dataverse/v6.5/conf/solr/schema.xml
sudo cp schema.xml /usr/local/solr/solr-9.4.1/server/solr/collection1/conf
From 9a4252b22052201d355a4173fbb16e57a3704e7c Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 10 Dec 2024 10:55:32 -0500
Subject: [PATCH 212/226] #11076 test session user perms
---
.../dataverse/privateurl/PrivateUrlPage.java | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/main/java/edu/harvard/iq/dataverse/privateurl/PrivateUrlPage.java b/src/main/java/edu/harvard/iq/dataverse/privateurl/PrivateUrlPage.java
index 9af4bb6af9e..17c622be9e2 100644
--- a/src/main/java/edu/harvard/iq/dataverse/privateurl/PrivateUrlPage.java
+++ b/src/main/java/edu/harvard/iq/dataverse/privateurl/PrivateUrlPage.java
@@ -1,6 +1,10 @@
package edu.harvard.iq.dataverse.privateurl;
+import edu.harvard.iq.dataverse.Dataset;
+import edu.harvard.iq.dataverse.DatasetServiceBean;
+import edu.harvard.iq.dataverse.DataverseRequestServiceBean;
import edu.harvard.iq.dataverse.DataverseSession;
+import edu.harvard.iq.dataverse.PermissionsWrapper;
import edu.harvard.iq.dataverse.authorization.users.PrivateUrlUser;
import java.io.Serializable;
import java.util.logging.Logger;
@@ -20,8 +24,14 @@ public class PrivateUrlPage implements Serializable {
@EJB
PrivateUrlServiceBean privateUrlService;
+ @EJB
+ DatasetServiceBean datasetServiceBean;
@Inject
DataverseSession session;
+ @Inject
+ PermissionsWrapper permissionsWrapper;
+ @Inject
+ DataverseRequestServiceBean dvRequestService;
/**
* The unique string used to look up a PrivateUrlUser and the associated
@@ -34,7 +44,16 @@ public String init() {
PrivateUrlRedirectData privateUrlRedirectData = privateUrlService.getPrivateUrlRedirectDataFromToken(token);
String draftDatasetPageToBeRedirectedTo = privateUrlRedirectData.getDraftDatasetPageToBeRedirectedTo() + "&faces-redirect=true";
PrivateUrlUser privateUrlUser = privateUrlRedirectData.getPrivateUrlUser();
- session.setUser(privateUrlUser);
+ boolean sessionUserCanViewUnpublishedDataset = false;
+ if (session.getUser().isAuthenticated()){
+ Long datasetId = privateUrlUser.getDatasetId();
+ Dataset dataset = datasetServiceBean.find(datasetId);
+ sessionUserCanViewUnpublishedDataset = permissionsWrapper.canViewUnpublishedDataset(dvRequestService.getDataverseRequest(), dataset);
+ }
+ if(!sessionUserCanViewUnpublishedDataset){
+ //Only Reset if user cannot view this Draft Version
+ session.setUser(privateUrlUser);
+ }
logger.info("Redirecting PrivateUrlUser '" + privateUrlUser.getIdentifier() + "' to " + draftDatasetPageToBeRedirectedTo);
return draftDatasetPageToBeRedirectedTo;
} catch (Exception ex) {
From ab7c90e607b072af6e962f8fc0ec652a76d44b53 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Tue, 10 Dec 2024 10:59:01 -0500
Subject: [PATCH 213/226] typo
Co-authored-by: Omer Fahim
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 019d437ed06..56521c45d71 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -94,7 +94,7 @@ See the [Database Settings](https://guides.dataverse.org/en/6.5/installation/con
### Relation Type (Related Publication) and DataCite
-The subfield "Relation Type" was added to the field "Related Publication" in Dataverse 6.4 (#10632) but couldn't be used without workarounds described in an [announcement](https://groups.google.com/g/dataverse-community/c/zlRGJtu3x4g/m/GtVZ26uaBQAJ) about the problem. The bug has been fixed and workarounds and are longer required. See #10926 and the announcement above.
+The subfield "Relation Type" was added to the field "Related Publication" in Dataverse 6.4 (#10632) but couldn't be used without workarounds described in an [announcement](https://groups.google.com/g/dataverse-community/c/zlRGJtu3x4g/m/GtVZ26uaBQAJ) about the problem. The bug has been fixed and workarounds are no longer required. See #10926 and the announcement above.
### Sort Order for Files
From 63ff790d4b3c319bb674fba8201eb8e3c8686fc9 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Tue, 10 Dec 2024 11:01:51 -0500
Subject: [PATCH 214/226] typo
Co-authored-by: Omer Fahim
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 56521c45d71..7bb9cbb1e73 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -106,7 +106,7 @@ In the Guestbook UI form, the email address is now checked for validity. See #10
### Updating Files Now Possible When Latest and Only Dataset Version is Deaccessioned
-When a dataset was deaccessioned and was the only previous version it would cause an error when trying to update the files. This has been fixed. See #9351 and #10901.
+When a dataset was deaccessioned, and was the only previous version, it would cause an error when trying to update the files. This has been fixed. See #9351 and #10901.
### My Data Filter by Username Feature Restored
From e733a2b7c54921f2380af4ec14df5b0672184825 Mon Sep 17 00:00:00 2001
From: qqmyers
Date: Tue, 10 Dec 2024 13:35:35 -0500
Subject: [PATCH 215/226] rely on the path based checks rather than looking at
[0] in the array
---
src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
index e3c26284d55..ffb7aa4cc3b 100644
--- a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
+++ b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
@@ -2274,9 +2274,6 @@ public void testDeleteFile() {
// Check file 2 still in v1.0
Response v1 = UtilIT.getDatasetVersion(datasetPid, "1.0", apiToken);
v1.prettyPrint();
- v1.then().assertThat()
- .body("data.files[0].dataFile.filename", equalTo("cc0.png"))
- .statusCode(OK.getStatusCode());
Map v1files1 = with(v1.body().asString()).param("fileToFind", "cc0.png")
.getJsonObject("data.files.find { files -> files.label == fileToFind }");
@@ -2289,9 +2286,6 @@ public void testDeleteFile() {
// Check file 3 still in post v1.0 draft
Response postv1draft2 = UtilIT.getDatasetVersion(datasetPid, DS_VERSION_DRAFT, apiToken);
postv1draft2.prettyPrint();
- postv1draft2.then().assertThat()
- .body("data.files[0].dataFile.filename", equalTo("orcid_16x16.png"))
- .statusCode(OK.getStatusCode());
Map v1files2 = with(postv1draft2.body().asString()).param("fileToFind", "orcid_16x16.png")
.getJsonObject("data.files.find { files -> files.label == fileToFind }");
From 853ced6340c163e4d8deb7ecab53a82092fd7642 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Tue, 10 Dec 2024 14:37:04 -0500
Subject: [PATCH 216/226] #11076 refresh delete popup
---
src/main/webapp/dataset.xhtml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml
index 051dc03ab34..9426884d349 100644
--- a/src/main/webapp/dataset.xhtml
+++ b/src/main/webapp/dataset.xhtml
@@ -1193,7 +1193,7 @@
#{bundle['dataset.privateurl.general.description']}
@@ -1213,7 +1213,7 @@
#{bundle['copyClipboard']}
-
+
@@ -1252,7 +1252,7 @@
#{bundle['copyClipboard']}
-
+
From 452cca4f15805063b769003620762a44cdc8260b Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Tue, 10 Dec 2024 14:49:00 -0500
Subject: [PATCH 217/226] word choice
Co-authored-by: Omer Fahim
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 7bb9cbb1e73..a2cac8ed800 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -306,7 +306,7 @@ sudo service solr stop
Replace schema.xml
-Please note that the path to Solr may differ than the example below.
+Please note that the path to Solr may differ from the example below.
```shell
wget https://raw.githubusercontent.com/IQSS/dataverse/v6.5/conf/solr/schema.xml
From 4c803d2cd14236bc98f925cce4ed2a348eb4e3ee Mon Sep 17 00:00:00 2001
From: qqmyers
Date: Wed, 11 Dec 2024 11:13:54 -0500
Subject: [PATCH 218/226] keep status checks
---
src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
index ffb7aa4cc3b..98107eca33a 100644
--- a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
+++ b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
@@ -2274,6 +2274,8 @@ public void testDeleteFile() {
// Check file 2 still in v1.0
Response v1 = UtilIT.getDatasetVersion(datasetPid, "1.0", apiToken);
v1.prettyPrint();
+ v1.then().assertThat()
+ .statusCode(OK.getStatusCode());
Map v1files1 = with(v1.body().asString()).param("fileToFind", "cc0.png")
.getJsonObject("data.files.find { files -> files.label == fileToFind }");
@@ -2286,6 +2288,8 @@ public void testDeleteFile() {
// Check file 3 still in post v1.0 draft
Response postv1draft2 = UtilIT.getDatasetVersion(datasetPid, DS_VERSION_DRAFT, apiToken);
postv1draft2.prettyPrint();
+ postv1draft2.then().assertThat()
+ .statusCode(OK.getStatusCode());
Map v1files2 = with(postv1draft2.body().asString()).param("fileToFind", "orcid_16x16.png")
.getJsonObject("data.files.find { files -> files.label == fileToFind }");
From ce6a99a49f54caaf54bce633dd08869365c87e8c Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Wed, 11 Dec 2024 13:38:31 -0500
Subject: [PATCH 219/226] #10952 add not about breadcrumbs in Anon Preview URL
---
doc/release-notes/6.5-release-notes.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index a2cac8ed800..c866d52e42c 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -24,6 +24,8 @@ The name of the URL that may be used by dataset administrators to share a draft
Also, additional information about the creation of Preview URLs has been added to the popup accessed via edit menu of the Dataset Page.
+Users of the Anonymous Preview URL will no longer be able to see the name of the Dataverse that this dataset is in but will be able to see the name of the repository.
+
Any Private URLs created in previous versions of Dataverse will continue to work.
The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
From 929128bb344df97678c49e3efa31d22c5074e646 Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Wed, 11 Dec 2024 13:40:19 -0500
Subject: [PATCH 220/226] #10952 reword
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index c866d52e42c..17abec2907a 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -24,7 +24,7 @@ The name of the URL that may be used by dataset administrators to share a draft
Also, additional information about the creation of Preview URLs has been added to the popup accessed via edit menu of the Dataset Page.
-Users of the Anonymous Preview URL will no longer be able to see the name of the Dataverse that this dataset is in but will be able to see the name of the repository.
+Users of the Anonymous Preview URL will no longer be able to see the name of the Dataverse that the dataset is in but will be able to see the name of the repository.
Any Private URLs created in previous versions of Dataverse will continue to work.
From a0508d1989c94e87e7fd7ddfaf7853cc69936224 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 11 Dec 2024 13:59:56 -0500
Subject: [PATCH 221/226] add link to #11085
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 17abec2907a..a45efb59556 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -30,7 +30,7 @@ Any Private URLs created in previous versions of Dataverse will continue to work
The old "privateUrl" API endpoints for the creation and deletion of Preview (formerly Private) URLs have been deprecated. They will continue to work but please switch to the "previewUrl" equivalents that have been [documented](https://guides.dataverse.org/en/6.5/api/native-api.html#create-a-preview-url-for-a-dataset) in the API Guide.
-See also #8184, #8185, #10950, and #10961.
+See also #8184, #8185, #10950, #10961, and #11085.
### Showing Differences Between Dataset Versions is More Scalable
From fe13a437c9c990086945c48a21dd32ce7e80ee6f Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 11 Dec 2024 15:13:43 -0500
Subject: [PATCH 222/226] add cvoc overview fix #10952
---
doc/release-notes/6.5-release-notes.md | 4 ++++
doc/release-notes/display_overview_fix.md | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)
delete mode 100644 doc/release-notes/display_overview_fix.md
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index a45efb59556..8cccc7114cf 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -134,6 +134,10 @@ A minor bug fix was made to avoid sending a useless ", null" in the DataCiteXML
Make Data Count (MDC) citation retrieval with the PID settings has been fixed. PID parsing in Dataverse is now case insensitive, improving interaction with services that may change the case of PIDs. Warnings related to managed/excluded PID lists for PID providers have been reduced. See #10708.
+### Quirk in Overview Display When Using External Controlled Variables
+
+This bugfix corrects an issue when there are duplicated entries on the metadata page. It is fixed by correcting an IF-clause in metadataFragment.xhtml. See #11005 and #11034.
+
### Globus "missing properties" Logging Fixed
In previous releases, logging would show Globus-related strings were missing from properties files. This has been fixed. See #11030.
diff --git a/doc/release-notes/display_overview_fix.md b/doc/release-notes/display_overview_fix.md
deleted file mode 100644
index 73a01435caf..00000000000
--- a/doc/release-notes/display_overview_fix.md
+++ /dev/null
@@ -1 +0,0 @@
-This bugfix corrects an issue when there are duplicated entries on the metadata page. It is fixed by correcting an IF-clause in metadataFragment.xhtml.
\ No newline at end of file
From 2de57e13135a8512218a651552e924cce512382a Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 11 Dec 2024 15:16:26 -0500
Subject: [PATCH 223/226] remove "in place" from Solr reindex step #10952
---
doc/release-notes/6.5-release-notes.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/release-notes/6.5-release-notes.md b/doc/release-notes/6.5-release-notes.md
index 8cccc7114cf..2e27f4419bd 100644
--- a/doc/release-notes/6.5-release-notes.md
+++ b/doc/release-notes/6.5-release-notes.md
@@ -354,7 +354,7 @@ Below is the simplest way to reindex Solr:
curl http://localhost:8080/api/admin/index
```
-The API above rebuilds the existing index "in place". If you want to be absolutely sure that your index is up-to-date and consistent, you may consider wiping it clean and reindexing everything from scratch (see [the guides](https://guides.dataverse.org/en/latest/admin/solr-search-index.html)). Just note that, depending on the size of your database, a full reindex may take a while and the users will be seeing incomplete search results during that window.
+The API above rebuilds the existing index. If you want to be absolutely sure that your index is up-to-date and consistent, you may consider wiping it clean and reindexing everything from scratch (see [the guides](https://guides.dataverse.org/en/latest/admin/solr-search-index.html)). Just note that, depending on the size of your database, a full reindex may take a while and the users will be seeing incomplete search results during that window.
9\. Run reExportAll to update dataset metadata exports
From 2c08be4a3550fdd7487969e12dbbf88cbe1712ea Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 11 Dec 2024 16:12:00 -0500
Subject: [PATCH 224/226] bump version to 6.5 #10954
---
doc/sphinx-guides/source/conf.py | 4 ++--
doc/sphinx-guides/source/versions.rst | 3 ++-
modules/dataverse-parent/pom.xml | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/sphinx-guides/source/conf.py b/doc/sphinx-guides/source/conf.py
index 7ee355302d8..fc88de1fcd7 100755
--- a/doc/sphinx-guides/source/conf.py
+++ b/doc/sphinx-guides/source/conf.py
@@ -68,9 +68,9 @@
# built documents.
#
# The short X.Y version.
-version = '6.4'
+version = '6.5'
# The full version, including alpha/beta/rc tags.
-release = '6.4'
+release = '6.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/doc/sphinx-guides/source/versions.rst b/doc/sphinx-guides/source/versions.rst
index 800bdc6e0f9..9d640bd22bd 100755
--- a/doc/sphinx-guides/source/versions.rst
+++ b/doc/sphinx-guides/source/versions.rst
@@ -7,7 +7,8 @@ Dataverse Software Documentation Versions
This list provides a way to refer to the documentation for previous and future versions of the Dataverse Software. In order to learn more about the updates delivered from one version to another, visit the `Releases `__ page in our GitHub repo.
- pre-release `HTML (not final!) `__ and `PDF (experimental!) `__ built from the :doc:`develop ` branch :doc:`(how to contribute!) `
-- 6.4
+- 6.5
+- `6.4 `__
- `6.3 `__
- `6.2 `__
- `6.1 `__
diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml
index 9442b55d622..9612988b3e7 100644
--- a/modules/dataverse-parent/pom.xml
+++ b/modules/dataverse-parent/pom.xml
@@ -131,7 +131,7 @@
- 6.4
+ 6.5
17
UTF-8
From d9c03e0cf93b4cb6a8b1fadd838a3df5737d4bb4 Mon Sep 17 00:00:00 2001
From: Philip Durbin
Date: Wed, 11 Dec 2024 16:14:13 -0500
Subject: [PATCH 225/226] make change for proper tagging of images #10954
---
modules/dataverse-parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml
index 9612988b3e7..d8105535248 100644
--- a/modules/dataverse-parent/pom.xml
+++ b/modules/dataverse-parent/pom.xml
@@ -446,8 +446,8 @@
Once the release has been made (tag created), change this back to "${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}"
(These properties are provided by the build-helper plugin below.)
-->
- ${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}
-
+
+ ${revision}
From ffb593ed86d8e7624dac810df5153c5a5e4c046e Mon Sep 17 00:00:00 2001
From: Stephen Kraffmiller
Date: Thu, 12 Dec 2024 14:32:09 -0500
Subject: [PATCH 226/226] Update pom.xml
---
modules/dataverse-parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/dataverse-parent/pom.xml b/modules/dataverse-parent/pom.xml
index d8105535248..9612988b3e7 100644
--- a/modules/dataverse-parent/pom.xml
+++ b/modules/dataverse-parent/pom.xml
@@ -446,8 +446,8 @@
Once the release has been made (tag created), change this back to "${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}"
(These properties are provided by the build-helper plugin below.)
-->
-
- ${revision}
+ ${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}
+