use of org.nextprot.api.core.domain.release.ReleaseInfoDataSources in project nextprot-api by calipho-sib.
the class ReleaseInfoServiceImpl method findReleaseDatasources.
@Override
@Cacheable("release-data-sources")
public ReleaseInfoDataSources findReleaseDatasources() {
ReleaseInfoDataSources sources = new ReleaseInfoDataSources();
sources.setDatasources(releaseStatsDao.findReleaseInfoDataSources());
return sources;
}
use of org.nextprot.api.core.domain.release.ReleaseInfoDataSources in project nextprot-api by calipho-sib.
the class EntryXMLStreamWriter method writeHeader.
@Override
protected void writeHeader(Map<String, Object> infos) throws IOException {
int entryNum = (int) infos.get(EntryStreamWriter.getEntryCountKey());
ReleaseInfoVersions releaseInfoVersions = (ReleaseInfoVersions) infos.get(EntryStreamWriter.getReleaseInfoKey());
ReleaseInfoDataSources releaseInfoDataSources = (ReleaseInfoDataSources) infos.get(EntryStreamWriter.getReleaseDataSourcesKey());
Template headerTemplate = velocityConfig.getVelocityEngine().getTemplate("export-header.xml.vm");
headerTemplate.merge(new NXVelocityContext(entryNum, releaseInfoVersions), getStream());
Template releaseContentTemplate = velocityConfig.getVelocityEngine().getTemplate("release-contents.xml.vm");
writePrettyXml(releaseContentTemplate, new NXVelocityContext(entryNum, releaseInfoVersions, releaseInfoDataSources), 2);
getStream().write(" </header>\n");
getStream().write(" <entry-list>\n");
}
Aggregations