1
|
package eu.dnetlib.data.collector.plugins.opentrial;
|
2
|
|
3
|
import eu.dnetlib.data.collector.plugin.AbstractCollectorPlugin;
|
4
|
import eu.dnetlib.data.collector.rmi.CollectorServiceException;
|
5
|
import eu.dnetlib.data.collector.rmi.InterfaceDescriptor;
|
6
|
|
7
|
|
8
|
|
9
|
/**
|
10
|
* Created by miriam on 07/03/2017.
|
11
|
*/
|
12
|
public class OpenTrialPlugin extends AbstractCollectorPlugin{
|
13
|
|
14
|
|
15
|
@Override
|
16
|
public Iterable<String> collect(final InterfaceDescriptor interfaceDescriptor, final String fromDate, final String untilDate)
|
17
|
throws CollectorServiceException {
|
18
|
try {
|
19
|
|
20
|
OpenTrialIterator iterator = new OpenTrialIterator(interfaceDescriptor.getBaseUrl(),fromDate,untilDate);
|
21
|
return iterator;
|
22
|
} catch (Exception e) {
|
23
|
throw new CollectorServiceException("OOOPS something bad happen on creating iterator ", e);
|
24
|
}
|
25
|
|
26
|
}
|
27
|
}
|