use of org.nextprot.api.core.service.export.EntryProteinExistenceReportWriter in project nextprot-api by calipho-sib.
the class ExportController method exportAllEntryProteinExistencess.
@RequestMapping(value = "/export/entry/all/protein-existences", method = { RequestMethod.GET }, produces = { NextprotMediaType.TSV_MEDIATYPE_VALUE })
public void exportAllEntryProteinExistencess(HttpServletResponse response) {
try {
EntryProteinExistenceReportWriter writer = new EntryProteinExistenceReportTSVWriter(response.getOutputStream());
masterIdentifierService.findUniqueNames().forEach(entryAccession -> writer.write(entryAccession, overviewService.findOverviewByEntry(entryAccession).getProteinExistences()));
writer.close();
} catch (IOException e) {
throw new NextProtException("cannot export all entries in TSV format", e);
}
}
Aggregations