1
|
package eu.dnetlib.data.collector.plugins.oai;
|
2
|
|
3
|
import org.junit.Before;
|
4
|
import org.junit.Ignore;
|
5
|
import org.junit.Test;
|
6
|
|
7
|
import eu.dnetlib.data.collector.plugins.HttpConnector;
|
8
|
|
9
|
public class OaiIteratorTest {
|
10
|
|
11
|
private static final String BASE_URL = "http://oai.d.efg.research-infrastructures.eu/oai.do";
|
12
|
private static final String FORMAT = "oai_dc";
|
13
|
private static final String SET = "d937bab1-d44c-44aa-bf7d-df5312a3b623";
|
14
|
|
15
|
private OaiIterator oai;
|
16
|
|
17
|
@Before
|
18
|
public void setUp() {
|
19
|
HttpConnector httpConnector = new HttpConnector();
|
20
|
httpConnector.initTrustManager();
|
21
|
oai = new OaiIterator(BASE_URL, FORMAT, SET, null, null, httpConnector);
|
22
|
}
|
23
|
|
24
|
@Test
|
25
|
@Ignore
|
26
|
public void test() {
|
27
|
int count = 0;
|
28
|
while (oai.hasNext()) {
|
29
|
oai.next();
|
30
|
count++;
|
31
|
}
|
32
|
System.out.println("TOTAL: " + count);
|
33
|
}
|
34
|
}
|