Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws IOE
url = new URI(JvmSettings.DATACITE_REST_API_URL.lookup(pidProvider.getId()) +
"/events?doi=" +
authorityPlusIdentifier +
"&source=crossref&page[size]=1000").toURL();
"&source=crossref&page[size]=1000&page[cursor]=1").toURL();
} catch (URISyntaxException e) {
//Nominally this means a config error/ bad DATACITE_REST_API_URL for this provider
logger.warning("Unable to create URL for " + persistentId + ", pidProvider " + pidProvider.getId());
Expand All @@ -175,11 +175,14 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws IOE
int status = connection.getResponseCode();
if (status != 200) {
logger.warning("Failed to get citations from " + url.toString());
connection.disconnect();
return error(Status.fromStatusCode(status), "Failed to get citations from " + url.toString());
}
JsonObject report;
try (InputStream inStream = connection.getInputStream()) {
report = JsonUtil.getJsonObject(inStream);
} finally {
connection.disconnect();
}
JsonObject links = report.getJsonObject("links");
JsonArray data = report.getJsonArray("data");
Expand Down