Project

General

Profile

« Previous | Next » 

Revision 41783

View differences:

MultipleMdStoreIterator.java
8 8

  
9 9
import org.apache.commons.logging.Log;
10 10
import org.apache.commons.logging.LogFactory;
11
import org.mockito.internal.util.collections.Iterables;
11 12
import org.springframework.beans.factory.annotation.Autowired;
12 13

  
13
import com.google.common.base.Function;
14
import com.google.common.collect.Iterables;
15

  
16
import eu.dnetlib.data.mdstore.MDStoreService;
17
import eu.dnetlib.data.mdstore.MDStoreServiceException;
18 14
import eu.dnetlib.enabling.locators.UniqueServiceLocator;
19
import eu.dnetlib.enabling.resultset.client.ResultSetClientFactory;
15
import eu.dnetlib.rmi.data.MDStoreService;
16
import eu.dnetlib.rmi.data.MDStoreServiceException;
20 17

  
21 18
// TODO: Auto-generated Javadoc
22 19
/**
......
58 55

  
59 56
				log.debug(String.format("current mdId '%s'", mdId));
60 57
				try {
61
					W3CEndpointReference epr = serviceLocator.getService(MDStoreService.class, mdId).deliverMDRecords(mdId, "", "", "");
58
					final W3CEndpointReference epr = serviceLocator.getService(MDStoreService.class, mdId).deliverMDRecords(mdId, "", "", "");
62 59
					return resultSetClientFactory.getClient(epr);
63
				} catch (MDStoreServiceException e) {
60
				} catch (final MDStoreServiceException e) {
64 61
					log.error(e);
65 62
					throw new RuntimeException(String.format("unable to iterate over %s", mdId), e);
66 63
				}
......
75 72
	 */
76 73
	@Override
77 74
	public boolean hasNext() {
78
		if (currentIterator == null) return false;
75
		if (this.currentIterator == null) { return false; }
79 76

  
80
		return currentIterator.hasNext();
77
		return this.currentIterator.hasNext();
81 78
	}
82 79

  
83 80
	/*
......
87 84
	 */
88 85
	@Override
89 86
	public String next() {
90
		return currentIterator.next();
87
		return this.currentIterator.next();
91 88
	}
92 89

  
93 90
	/*

Also available in: Unified diff