Project

General

Profile

« Previous | Next » 

Revision 38995

Added info log on total repository found in the re3data response

View differences:

modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/datasources/Re3DataRepositoriesIterator.java
22 22

  
23 23
	private String baseURL;
24 24
	private XMLStreamReader reader;
25
	private int countedRepos = 0;
25 26

  
26 27
	@Override
27 28
	public boolean hasNext() {
......
38 39
			String repoPath = getNextRepositoryPath();
39 40
			String repoInfo = getRepositoryInfo(repoPath);
40 41
			log.debug(repoPath + "\n" + repoInfo);
42
			countedRepos++;
41 43
			return repoInfo;
42 44
		} catch (CollectorServiceException e) {
43 45
			throw new RuntimeException(e);
......
72 74
				if (elementName.equals("link")) return true;
73 75
			}
74 76
		}
77
		log.info("Seems there are no more repository to iterate on. Total: " + countedRepos);
75 78
		return false;
76 79
	}
77 80

  
......
92 95
		this.baseURL = baseURL;
93 96
	}
94 97

  
98
	public int getCountedRepos() {
99
		return countedRepos;
100
	}
101

  
102
	public void setCountedRepos(final int countedRepos) {
103
		this.countedRepos = countedRepos;
104
	}
105

  
95 106
}

Also available in: Unified diff