use of org.nextprot.api.core.service.dbxref.conv.EnsemblXrefPropertyConverter in project nextprot-api by calipho-sib.
the class DbXrefServiceImpl method getDbXrefEnsemblInfos.
private Map<Long, List<DbXrefProperty>> getDbXrefEnsemblInfos(String uniqueName, List<DbXref> xrefs) {
List<Long> ensemblRefIds = xrefs.stream().filter(xref -> xref.getAccession().startsWith("ENST")).map(DbXref::getDbXrefId).collect(Collectors.toList());
List<DbXref.EnsemblInfos> ensemblXRefInfosList = dbXRefDao.findDbXrefEnsemblInfos(uniqueName, ensemblRefIds);
EnsemblXrefPropertyConverter converter = EnsemblXrefPropertyConverter.getInstance();
Map<Long, List<DbXrefProperty>> map = new HashMap<>();
for (DbXref.EnsemblInfos infos : ensemblXRefInfosList) {
map.put(infos.getTranscriptXrefId(), converter.convert(infos));
}
return map;
}
Aggregations