1
|
package eu.dnetlib.dli.collector.plugin;
|
2
|
|
3
|
import org.antlr.stringtemplate.StringTemplate;
|
4
|
import org.apache.commons.io.IOUtils;
|
5
|
import org.junit.Ignore;
|
6
|
import org.junit.Test;
|
7
|
|
8
|
import java.io.IOException;
|
9
|
import java.io.InputStream;
|
10
|
|
11
|
public class CrossRefIteratorTest {
|
12
|
|
13
|
|
14
|
@Test
|
15
|
@Ignore
|
16
|
public void CrossRefIteratorTest() throws IOException {
|
17
|
final InputStream resourceAsStream = getClass().getResourceAsStream("/eu/dnetlib/dli/templates/Scholixv1.st");
|
18
|
|
19
|
|
20
|
final String template = IOUtils.toString(resourceAsStream);
|
21
|
final StringTemplate st = new StringTemplate(template);
|
22
|
|
23
|
CrossRefIterator ci = new CrossRefIterator(st);
|
24
|
int i =0;
|
25
|
while (ci.hasNext()){
|
26
|
ci.next();
|
27
|
|
28
|
i++;
|
29
|
if (i % 100 ==0 ) {
|
30
|
System.out.println("Read "+i);
|
31
|
}
|
32
|
}
|
33
|
}
|
34
|
}
|