|
|
|
@ -116,6 +116,8 @@ public class OAIClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.trace("Calling {} ",target.getUri());
|
|
|
|
|
|
|
|
|
|
Response resp=target.request("application/xml").get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -127,11 +129,13 @@ public class OAIClient {
|
|
|
|
|
//No errors, thus reset attempt counter
|
|
|
|
|
currentAttempt=1;
|
|
|
|
|
|
|
|
|
|
toReturn.addAll(msg.getResponseRecords().getRecords());
|
|
|
|
|
if(msg.getResponseRecords().getRecords()!=null)
|
|
|
|
|
toReturn.addAll(msg.getResponseRecords().getRecords());
|
|
|
|
|
else log.info("NB {} didn't returned any record",msg.getRequest().getPath());
|
|
|
|
|
log.debug("Parsed "+toReturn.size()+" records so far.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Token t=msg.getResponseRecords().getResumptionToken();
|
|
|
|
|
|
|
|
|
|
Token t=msg.getResponseRecords().getResumptionToken();
|
|
|
|
|
log.debug("Obtained token : "+t);
|
|
|
|
|
|
|
|
|
|
if(t!=null && t.getId()!=null && !t.getId().isEmpty()) {
|
|
|
|
@ -144,7 +148,7 @@ public class OAIClient {
|
|
|
|
|
isComplete=true;
|
|
|
|
|
}
|
|
|
|
|
}catch(Throwable t) {
|
|
|
|
|
log.warn("Unexpected ERROR "+t.getMessage());
|
|
|
|
|
log.warn("Unexpected ERROR ",t);
|
|
|
|
|
log.debug("Current attempt number = "+currentAttempt," max attempt Number = "+MAX_ATTEMPTS+", attempts delay factor = ");
|
|
|
|
|
isComplete=currentAttempt>MAX_ATTEMPTS;
|
|
|
|
|
try {
|
|
|
|
|