Revision 52970
Added by Andreas Czerniak over 5 years ago
RestIteratorTest.java | ||
---|---|---|
7 | 7 |
import org.junit.Test; |
8 | 8 |
|
9 | 9 |
/** |
10 |
* @author js |
|
11 |
* |
|
10 |
* |
|
11 |
* @author js, Andreas Czerniak |
|
12 |
* @date 2018-08-06 |
|
12 | 13 |
*/ |
13 | 14 |
public class RestIteratorTest { |
14 | 15 |
|
... | ... | |
19 | 20 |
private String resultTotalXpath = "//hits/total"; |
20 | 21 |
private String entityXpath = "//hits/hits"; |
21 | 22 |
private String resultFormatParam = "format"; |
22 |
private String resultFormatValue = "json";
|
|
23 |
private String resultFormatValue = "Json"; // Change from lowerCase to one UpperCase
|
|
23 | 24 |
private String resultSizeParam = "size"; |
25 |
private String resultSizeValue = "10"; // add new |
|
24 | 26 |
private String query = "q=%28sources%3ASocArXiv+AND+type%3Apreprint%29"; |
25 | 27 |
|
26 | 28 |
|
27 | 29 |
@Ignore |
28 | 30 |
@Test |
29 | 31 |
public void test(){ |
30 |
final RestIterator iterator = new RestIterator(baseUrl, resumptionType, resumptionParam, resumptionXpath, resultTotalXpath, resultFormatParam, resultFormatValue, resultSizeParam, query, entityXpath); |
|
32 |
final RestIterator iterator = new RestIterator(baseUrl, resumptionType, resumptionParam, resumptionXpath, resultTotalXpath, resultFormatParam, resultFormatValue, resultSizeParam, resultSizeValue, query, entityXpath);
|
|
31 | 33 |
int i =20; |
32 | 34 |
while (iterator.hasNext() && i > 0) { |
33 | 35 |
String result = iterator.next(); |
Also available in: Unified diff
Changes in the Rest_Json CollectorPlugin with enhancements for the new OpenDOAR API at JISC under https://v2.sherpa.ac.uk/opendoar/