Search in sources :

Example 1 with EntryStreamWriter

use of org.nextprot.api.web.service.impl.writer.EntryStreamWriter in project nextprot-api by calipho-sib.

the class StreamEntryServiceImpl method streamEntry.

@Override
public void streamEntry(String accession, NextprotMediaType format, OutputStream os, String description) throws IOException {
    EntryStreamWriter writer = newAutoCloseableWriter(format, "entry", os);
    writer.write(Collections.singletonList(accession), createInfos(description));
}
Also used : EntryStreamWriter(org.nextprot.api.web.service.impl.writer.EntryStreamWriter)

Example 2 with EntryStreamWriter

use of org.nextprot.api.web.service.impl.writer.EntryStreamWriter in project nextprot-api by calipho-sib.

the class StreamEntryServiceImpl method streamEntries.

@Override
public void streamEntries(Collection<String> accessions, NextprotMediaType format, String viewName, OutputStream os, String description) throws IOException {
    EntryStreamWriter writer = newAutoCloseableWriter(format, viewName, os);
    writer.write(accessions, createInfos(description));
}
Also used : EntryStreamWriter(org.nextprot.api.web.service.impl.writer.EntryStreamWriter)

Aggregations

EntryStreamWriter (org.nextprot.api.web.service.impl.writer.EntryStreamWriter)2