use of org.nextprot.api.core.domain.release.ReleaseInfoStats in project nextprot-api by calipho-sib.
the class ReleaseInfoServiceImpl method findReleaseStats.
@Override
@Cacheable("release-stats")
public ReleaseInfoStats findReleaseStats() {
ReleaseInfoStats rs = new ReleaseInfoStats();
List<ReleaseStatsTag> stats = releaseStatsDao.findTagStatistics();
for (ReleaseStatsTag statsTag : stats) {
if ("PROTEIN_LEVEL_MASTER".equals(statsTag.getTag())) {
statsTag.setCount(masterIdentifierService.findEntryAccessionsByProteinExistence(ProteinExistence.PROTEIN_LEVEL).size());
} else if ("TRANSCRIPT_LEVEL_MASTER".equals(statsTag.getTag())) {
statsTag.setCount(masterIdentifierService.findEntryAccessionsByProteinExistence(ProteinExistence.TRANSCRIPT_LEVEL).size());
} else if ("HOMOLOGY_MASTER".equals(statsTag.getTag())) {
statsTag.setCount(masterIdentifierService.findEntryAccessionsByProteinExistence(ProteinExistence.HOMOLOGY).size());
} else if ("PREDICTED_MASTER".equals(statsTag.getTag())) {
statsTag.setCount(masterIdentifierService.findEntryAccessionsByProteinExistence(ProteinExistence.PREDICTED).size());
} else if ("UNCERTAIN_MASTER".equals(statsTag.getTag())) {
statsTag.setCount(masterIdentifierService.findEntryAccessionsByProteinExistence(ProteinExistence.UNCERTAIN).size());
}
}
rs.setTagStatistics(stats);
return rs;
}
Aggregations