Skip to content

Commit

Permalink
add pid
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwinship committed Nov 20, 2024
1 parent 26e8574 commit 2db26b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 6 additions & 10 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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": [
{
Expand All @@ -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"
}
]
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2db26b2

Please sign in to comment.