Revision 57636
Added by Sandro La Bruzzo over 4 years ago
CrossRefIterator.java | ||
---|---|---|
111 | 111 |
} |
112 | 112 |
|
113 | 113 |
private boolean requestNextBuffer() { |
114 |
String templateUrlWithCursor = "http://api.eventdata.crossref.org/v1/events/scholix?rows=1000&cursor=%s";
|
|
115 |
String templateUrl = "http://api.eventdata.crossref.org/v1/events/scholix?rows=1000";
|
|
114 |
String templateUrlWithCursor = "https://api.eventdata.crossref.org/v1/events/scholix?mailto=sandro.labruzzo@isti.cnr.it&rows=1000&cursor=%s";
|
|
115 |
String templateUrl = "https://api.eventdata.crossref.org/v1/events/scholix?mailto=sandro.labruzzo@isti.cnr.it&rows=1000";
|
|
116 | 116 |
final String s = AbstractPIDResolver.requestURL(nextCursor == null ? templateUrl : String.format(templateUrlWithCursor, nextCursor), 30, 2); |
117 | 117 |
if (s!= null) |
118 | 118 |
{ |
... | ... | |
126 | 126 |
nextCursor = null; |
127 | 127 |
total = message.get("total-results").getAsInt(); |
128 | 128 |
final JsonArray items = message.get("link-packages").getAsJsonArray(); |
129 |
if (items== null || items.size() ==0) { |
|
130 |
return requestNextBuffer(); |
|
131 |
} |
|
132 |
|
|
129 | 133 |
items.forEach(buffer::add); |
130 | 134 |
return nextCursor!=null; |
131 | 135 |
} |
Also available in: Unified diff
Added failedCallback to mdstore plugin invocation