use of org.nextprot.api.core.domain.Overview.History in project nextprot-api by calipho-sib.
the class HistoryDaoTest method testFindHistoryEntry.
@Test
public void testFindHistoryEntry() {
List<History> histories = this.historyDao.findHistoryByEntry("PAM");
assertEquals(1, histories.size());
History history = histories.get(0);
assertEquals("Evidence_at_protein_level", history.getProteinExistenceUniprot().getDescriptionName());
assertEquals("2010-03-01", history.getFormattedNextprotIntegrationDate());
assertEquals("2013-06-15", history.getFormattedNextprotUpdateDate());
assertEquals("2006-10-31", history.getFormattedUniprotIntegrationDate());
assertEquals("2013-04-03", history.getFormattedUniprotUpdateDate());
assertEquals("1", history.getSequenceVersion());
}
use of org.nextprot.api.core.domain.Overview.History in project nextprot-api by calipho-sib.
the class OverviewServiceImpl method findOverviewByEntry.
@Override
@Cacheable("overview")
public Overview findOverviewByEntry(String uniqueName) {
Overview overview = new Overview();
List<History> history = this.historyDao.findHistoryByEntry(uniqueName);
if (history != null && history.size() != 0)
overview.setHistory(history.get(0));
List<EntityName> entityNames = this.entryNameDao.findNames(uniqueName);
entityNames.addAll(entryNameDao.findAlternativeChainNames(uniqueName));
setNamesInOverview(entityNames, overview);
overview.setFamilies(this.familyService.findFamilies(uniqueName));
overview.setIsoformNames(convertIsoNamestoOverviewName(isoformService.findIsoformsByEntryName(uniqueName)));
overview.setProteinExistences(proteinExistenceService.getProteinExistences(uniqueName));
return overview;
}
Aggregations