use of org.nextprot.api.core.domain.publication.GlobalPublicationStatistics in project nextprot-api by calipho-sib.
the class StatisticsServiceImpl method getGlobalPublicationStatistics.
@Cacheable("global-publication-statistics")
@Override
public GlobalPublicationStatistics getGlobalPublicationStatistics() {
GlobalPublicationStatistics globalPublicationStatistics = new GlobalPublicationStatistics();
publicationService.findAllPublicationIds().forEach(pubId -> {
List<EntryPublication> entryPublications = publicationService.getEntryPublications(pubId);
GlobalPublicationStatistics.PublicationStatistics stats = new PublicationStatisticsAnalyser(pubId, entryPublications).analyse();
globalPublicationStatistics.putPublicationStatisticsById(pubId, stats);
if (stats.isCited()) {
globalPublicationStatistics.incrementNumberOfCitedPublications();
}
if (stats.isComputed()) {
globalPublicationStatistics.incrementNumberOfComputationallyMappedPublications();
}
if (stats.isLargeScale()) {
globalPublicationStatistics.incrementNumberOfLargeScalePublications();
}
if (stats.isCurated()) {
globalPublicationStatistics.incrementNumberOfCuratedPublications();
}
globalPublicationStatistics.incrementTotalNumberOfPublications();
});
return globalPublicationStatistics;
}
Aggregations