Search in sources :

Example 1 with ProteinExistence

use of org.nextprot.api.core.domain.ProteinExistence in project nextprot-api by calipho-sib.

the class ChromosomeReportServiceImpl method setByProteinEvidenceEntryCount.

private void setByProteinEvidenceEntryCount(List<String> chromosomeEntries, ChromosomeReport.Summary summary) {
    Map<ProteinExistence, List<String>> pe2entries = new EnumMap<>(ProteinExistence.class);
    for (String entry : chromosomeEntries) {
        // ProteinExistence pe = overviewService.findOverviewByEntry(entry).getProteinExistence();
        ProteinExistence pe = overviewService.findOverviewByEntry(entry).getProteinExistences().getProteinExistence();
        if (!pe2entries.containsKey(pe)) {
            pe2entries.put(pe, new ArrayList<>());
        }
        pe2entries.get(pe).add(entry);
    }
    pe2entries.forEach((key, value) -> summary.setEntryCount(key, value.size()));
}
Also used : ProteinExistence(org.nextprot.api.core.domain.ProteinExistence)

Aggregations

ProteinExistence (org.nextprot.api.core.domain.ProteinExistence)1