Revision 53183
Added by Andreas Czerniak over 5 years ago
modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/rest/RestIterator.java | ||
---|---|---|
69 | 69 |
private String querySize; |
70 | 70 |
private Queue<String> recordQueue = new PriorityBlockingQueue<String>(); |
71 | 71 |
private int discoverResultSize = 0; |
72 |
private int pagination = 1; |
|
72 | 73 |
|
73 | 74 |
public RestIterator( |
74 | 75 |
final String baseUrl, |
... | ... | |
238 | 239 |
log.info("discoverResultSize: " + discoverResultSize); |
239 | 240 |
break; |
240 | 241 |
|
241 |
case "page": // pagination, iterate over pages |
|
242 |
// TODO pagination collecting |
|
242 |
case "pagination": // pagination, iterate over pages |
|
243 |
case "page": |
|
244 |
pagination += 1; |
|
245 |
if (nodeList != null) { |
|
246 |
discoverResultSize += nodeList.getLength(); |
|
247 |
} else { |
|
248 |
resultTotal = discoverResultSize; |
|
249 |
pagination = discoverResultSize; |
|
250 |
} |
|
251 |
resumptionInt = pagination; |
|
252 |
resumptionStr = Integer.toString(resumptionInt); |
|
243 | 253 |
break; |
244 | 254 |
|
245 | 255 |
default: // otherwise: abort |
Also available in: Unified diff
enhancement of new resumptionType, Issue Enhancement #3858