Commit c1d772c6 authored by Matija Obreza's avatar Matija Obreza
Browse files

Use directQuery to generate DwCA files from filtered data

parent 67ccd57d
......@@ -21,6 +21,8 @@ import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.FaoInstitute;
import org.springframework.jdbc.core.RowCallbackHandler;
import com.fasterxml.jackson.databind.node.ObjectNode;
public interface GenesysLowlevelRepository {
void updateCountryRefs();
......@@ -38,15 +40,15 @@ public interface GenesysLowlevelRepository {
void refreshMetadataMethods();
void listAccessions(String instCode, RowCallbackHandler rowCallbackHandler);
void listAccessions(ObjectNode filter, RowCallbackHandler rowCallbackHandler);
void listAccessionsGeo(String code, RowCallbackHandler rowCallbackHandler);
void listAccessionsGeo(ObjectNode filter, RowCallbackHandler rowCallbackHandler);
void listAccessionsColl(String code, RowCallbackHandler rowCallbackHandler);
void listAccessionsColl(ObjectNode filter, RowCallbackHandler rowCallbackHandler);
void listMetadataAccessions(long id, RowCallbackHandler rowCallbackHandler);
void listAccessionsAlias(String code, RowCallbackHandler rowCallbackHandler);
void listAccessionsAlias(ObjectNode filter, RowCallbackHandler rowCallbackHandler);
void listAccessionsAccenames(RowCallbackHandler rowCallbackHandler);
......
......@@ -28,8 +28,11 @@ import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.service.impl.DirectMysqlQuery;
import org.genesys2.server.service.impl.DirectMysqlQuery.MethodResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.ArgumentPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.core.RowCallbackHandler;
......@@ -37,6 +40,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.fasterxml.jackson.databind.node.ObjectNode;
@Repository
@Transactional(readOnly = true)
public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository {
......@@ -44,6 +49,9 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
private JdbcTemplate jdbcTemplate;
@Autowired
private MethodRepository methodRepository;
@Autowired
public void setDataSource(final DataSource dataSource) {
this.jdbcTemplate = new JdbcTemplate(dataSource);
......@@ -67,12 +75,11 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
@Transactional(readOnly = false)
public void updateInstituteAccessionCount(long instituteId) {
LOG.info("Updating institute accession count for instituteId=" + instituteId);
// int count = jdbcTemplate
// .update("UPDATE faoinstitute FI inner join (select instituteId, count(*) X from accession where instituteId= ? group by instituteId) A on A.instituteId=FI.id set FI.accessionCount=A.X where FI.id = ?;",
// instituteId, instituteId);
int count = jdbcTemplate
.update("UPDATE faoinstitute SET accessionCount = (select count(*) from accession where instituteId=?) where id = ?;",
instituteId, instituteId);
// int count = jdbcTemplate
// .update("UPDATE faoinstitute FI inner join (select instituteId, count(*) X from accession where instituteId= ? group by instituteId) A on A.instituteId=FI.id set FI.accessionCount=A.X where FI.id = ?;",
// instituteId, instituteId);
int count = jdbcTemplate.update("UPDATE faoinstitute SET accessionCount = (select count(*) from accession where instituteId=?) where id = ?;",
instituteId, instituteId);
LOG.info("Institute accession counts updated: " + count);
}
......@@ -208,13 +215,25 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
}
@Override
public void listAccessions(final String instCode, RowCallbackHandler rowCallbackHandler) {
public void listAccessions(final ObjectNode filter, RowCallbackHandler rowCallbackHandler) {
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accession", "a");
directQuery.outerJoin("taxonomy2", "t", "t.id=a.taxonomyId2");
directQuery.jsonFilter(filter, new MethodResolver() {
@Override
public Method getMethod(long methodId) {
return methodRepository.findOne(methodId);
}
});
jdbcTemplate.query(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement stmt = con
.prepareStatement("select a.id, a.uuid, a.instCode, a.acceNumb, a.genus, t.species, a.orgCty, a.acqSrc, a.acqDate, a.mlsStat, a.available, a.storage, a.sampStat, a.duplSite, a.createdBy, a.createdDate, a.lastModifiedBy, a.lastModifiedDate from accession a left outer join taxonomy t on t.id=a.taxonomyId where a.instCode = ?");
stmt.setString(1, instCode);
PreparedStatement stmt = con.prepareStatement(directQuery
.getQuery("a.id, a.uuid, a.instCode, a.acceNumb, t.genus, t.species, t.taxonName, a.orgCty, a.acqSrc, a.acqDate, a.mlsStat, a.available, a.storage, a.sampStat, a.duplSite, a.createdBy, a.createdDate, a.lastModifiedBy, a.lastModifiedDate"));
ArgumentPreparedStatementSetter apss = new ArgumentPreparedStatementSetter(directQuery.getParameters());
apss.setValues(stmt);
// Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE);
return stmt;
......@@ -223,13 +242,25 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
}
@Override
public void listAccessionsGeo(final String instCode, RowCallbackHandler rowCallbackHandler) {
public void listAccessionsGeo(final ObjectNode filter, RowCallbackHandler rowCallbackHandler) {
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessiongeo", "g");
directQuery.innerJoin("accession", "a", "a.id=g.accessionId");
directQuery.jsonFilter(filter, new MethodResolver() {
@Override
public Method getMethod(long methodId) {
return methodRepository.findOne(methodId);
}
});
jdbcTemplate.query(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement stmt = con
.prepareStatement("select a.id, g.latitude, g.longitude, g.elevation, g.datum, g.uncertainty, g.method, g.version from accessiongeo g inner join accession a on a.id=g.accessionId where a.instCode = ?");
stmt.setString(1, instCode);
PreparedStatement stmt = con.prepareStatement(directQuery
.getQuery("a.id, g.latitude, g.longitude, g.elevation, g.datum, g.uncertainty, g.method, g.version"));
ArgumentPreparedStatementSetter apss = new ArgumentPreparedStatementSetter(directQuery.getParameters());
apss.setValues(stmt);
// Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE);
return stmt;
......@@ -238,13 +269,26 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
}
@Override
public void listAccessionsAlias(final String instCode, RowCallbackHandler rowCallbackHandler) {
public void listAccessionsAlias(final ObjectNode filter, RowCallbackHandler rowCallbackHandler) {
//from n inner join accession a on a.id=n.accessionId
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessionalias", "n");
directQuery.innerJoin("accession", "a", "a.id=n.accessionId");
directQuery.jsonFilter(filter, new MethodResolver() {
@Override
public Method getMethod(long methodId) {
return methodRepository.findOne(methodId);
}
});
jdbcTemplate.query(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement stmt = con
.prepareStatement("select a.id, n.instCode, n.name, n.aliasType, n.lang, n.version from accessionalias n inner join accession a on a.id=n.accessionId where a.instCode = ?");
stmt.setString(1, instCode);
.prepareStatement(directQuery.getQuery("a.id, n.instCode, n.name, n.aliasType, n.lang, n.version"));
ArgumentPreparedStatementSetter apss = new ArgumentPreparedStatementSetter(directQuery.getParameters());
apss.setValues(stmt);
// Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE);
return stmt;
......@@ -268,13 +312,26 @@ public class GenesysLowlevelRepositoryImpl implements GenesysLowlevelRepository
}
@Override
public void listAccessionsColl(final String instCode, RowCallbackHandler rowCallbackHandler) {
public void listAccessionsColl(final ObjectNode filter, RowCallbackHandler rowCallbackHandler) {
//from accessioncollect coll inner join accession a on a.id=coll.accessionId
final DirectMysqlQuery directQuery = new DirectMysqlQuery("accessioncollect", "coll");
directQuery.innerJoin("accession", "a", "a.id=coll.accessionId");
directQuery.jsonFilter(filter, new MethodResolver() {
@Override
public Method getMethod(long methodId) {
return methodRepository.findOne(methodId);
}
});
jdbcTemplate.query(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement stmt = con
.prepareStatement("select a.id, coll.collMissId, coll.collNumb, coll.collDate, coll.collSrc, coll.collSite, coll.collCode, coll.collName, coll.collInstAddress, coll.version from accessioncollect coll inner join accession a on a.id=coll.accessionId where a.instCode = ?");
stmt.setString(1, instCode);
.prepareStatement(directQuery.getQuery("a.id, coll.collMissId, coll.collNumb, coll.collDate, coll.collSrc, coll.collSite, coll.collCode, coll.collName, coll.collInstAddress, coll.version"));
ArgumentPreparedStatementSetter apss = new ArgumentPreparedStatementSetter(directQuery.getParameters());
apss.setValues(stmt);
// Set mysql JConnector to stream results
stmt.setFetchSize(Integer.MIN_VALUE);
return stmt;
......
......@@ -145,6 +145,8 @@ public interface GenesysService {
void writeAccessions(FaoInstitute faoInstitute, OutputStream outputStream) throws IOException;
void writeAccessions(String jsonFilter, OutputStream outputStream) throws IOException;
void saveAliases(List<AccessionAlias> aliases);
void removeAliases(List<AccessionAlias> aliases);
......
......@@ -50,6 +50,24 @@ public class DirectMysqlQuery {
return this;
}
public DirectMysqlQuery outerJoin(String table, String alias, String onExpr) {
if (tables.contains(table)) {
LOG.warn("Table already joined: " + table);
return this;
}
if (LOG.isDebugEnabled()) {
LOG.debug("Leftouter-joining " + table + " " + alias + " on " + onExpr);
}
sb.append(" left outer join ").append(table).append(StringUtils.SPACE);
tables.add(table);
if (StringUtils.isNotBlank(alias)) {
sb.append(alias).append(StringUtils.SPACE);
}
sb.append("on ").append(onExpr).append(StringUtils.SPACE);
return this;
}
public DirectMysqlQuery jsonFilter(ObjectNode jsonTree, MethodResolver methodResolver) {
return join(jsonTree).filter(jsonTree, methodResolver);
}
......@@ -95,7 +113,9 @@ public class DirectMysqlQuery {
for (Iterator<String> it = jsonTree.fieldNames(); it.hasNext();) {
String fieldName = it.next();
if (fieldName.startsWith("gm:")) {
LOG.info("Filtering on C&E data, method=" + fieldName);
if (LOG.isDebugEnabled()) {
LOG.debug("Filtering on C&E data, method=" + fieldName);
}
// Handle Genesys Method!
long methodId = Long.parseLong(fieldName.substring(3));
// Need to validate method
......@@ -110,15 +130,19 @@ public class DirectMysqlQuery {
}
}
LOG.info("Parameter count: " + params.size());
LOG.info("Count query:\n" + sb.toString());
if (LOG.isDebugEnabled()) {
LOG.debug("Parameter count: " + params.size());
LOG.debug("Count query:\n" + sb.toString());
}
return this;
}
public void filterTile(int zoom, int xtile, int ytile) {
if (zoom >= 0) {
LOG.debug("ZOOM=" + zoom);
if (LOG.isDebugEnabled()) {
LOG.debug("ZOOM=" + zoom);
}
final double lonW = CoordUtil.tileToLon(zoom, xtile);
final double lonE = CoordUtil.tileToLon(zoom, xtile + 1);
final double diffLon = lonE - lonW;
......@@ -144,9 +168,13 @@ public class DirectMysqlQuery {
}
private void createQuery(StringBuffer sb, String dbName, JsonNode fieldQuery, List<Object> params) {
LOG.debug("Handling " + dbName);
if (LOG.isDebugEnabled()) {
LOG.debug("Handling " + dbName);
}
if (fieldQuery != null) {
LOG.debug("Adding " + fieldQuery + " sz=" + fieldQuery.size() + " t=" + fieldQuery.getNodeType());
if (LOG.isDebugEnabled()) {
LOG.debug("Adding " + fieldQuery + " sz=" + fieldQuery.size() + " t=" + fieldQuery.getNodeType());
}
if (sb.length() == 0)
sb.append(" where ");
else
......@@ -191,13 +219,19 @@ public class DirectMysqlQuery {
int counter = 0;
while (elements.hasNext()) {
JsonNode filterValue = elements.next();
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
}
if (filterValue.isObject()) {
LOG.debug("Adding " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding " + filterValue);
}
JsonNode range = filterValue.findValue("range");
if (range != null && range.isArray()) {
LOG.debug("Adding array: " + range);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding array: " + range);
}
if (counter > 0) {
sb.append(" or ");
}
......@@ -211,7 +245,9 @@ public class DirectMysqlQuery {
JsonNode min = filterValue.findValue("min");
if (min != null && min.isNumber()) {
LOG.debug("Adding min number: " + min);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding min number: " + min);
}
if (counter > 0) {
sb.append(" or ");
}
......@@ -224,7 +260,9 @@ public class DirectMysqlQuery {
JsonNode max = filterValue.findValue("max");
if (max != null && max.isNumber()) {
LOG.debug("Adding max number: " + max);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding max number: " + max);
}
if (counter > 0) {
sb.append(" or ");
}
......@@ -237,7 +275,9 @@ public class DirectMysqlQuery {
JsonNode like = filterValue.findValue("like");
if (like != null && like.isTextual()) {
LOG.debug("Adding LIKE : " + like);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding LIKE : " + like);
}
if (counter > 0) {
sb.append(" or ");
}
......@@ -258,9 +298,13 @@ public class DirectMysqlQuery {
int counter = 0;
while (elements.hasNext()) {
JsonNode filterValue = elements.next();
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
}
if (filterValue.isNull()) {
LOG.debug("Adding " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding " + filterValue);
}
counter++;
}
}
......@@ -277,9 +321,13 @@ public class DirectMysqlQuery {
int counter = 0;
while (elements.hasNext()) {
JsonNode filterValue = elements.next();
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Inspecting " + dbName + " ... " + filterValue);
}
if (filterValue.isNumber() || filterValue.isTextual() || filterValue.isBoolean()) {
LOG.debug("Adding " + filterValue);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding " + filterValue);
}
counter++;
addParam(params, filterValue);
}
......@@ -311,7 +359,9 @@ public class DirectMysqlQuery {
}
public String getCountQuery(String countWhat) {
LOG.info("select count(" + countWhat + ") " + sb.toString() + " " + whereBuffer.toString());
if (LOG.isDebugEnabled()) {
LOG.debug("select count(" + countWhat + ") " + sb.toString() + " " + whereBuffer.toString());
}
return "select count(" + countWhat + ") " + sb.toString() + " " + whereBuffer.toString();
}
......@@ -331,7 +381,9 @@ public class DirectMysqlQuery {
if (pageable.getSort() != null) {
sortBuffer.append("\n order by ");
for (Order o : pageable.getSort()) {
LOG.debug("Order: " + o);
if (LOG.isDebugEnabled()) {
LOG.debug("Order: " + o);
}
// ClassMetadata md =
// sessionFactory.getClassMetadata(Accession.class);
// md.
......@@ -344,20 +396,26 @@ public class DirectMysqlQuery {
}
}
sortBuffer.append(" limit ");
LOG.debug("Pageable=" + pageable.getOffset() + " " + pageable.getPageNumber());
if (LOG.isDebugEnabled()) {
LOG.debug("Pageable=" + pageable.getOffset() + " " + pageable.getPageNumber());
}
sortBuffer.append(pageable.getOffset());
sortBuffer.append(", ");
sortBuffer.append(pageable.getPageSize());
LOG.info("Filter query:\n" + sb.toString());
LOG.info("Parameter count: " + params.size());
LOG.info("Params: " + ArrayUtils.toString(params.toArray()));
if (LOG.isDebugEnabled()) {
LOG.debug("Filter query:\n" + sb.toString());
LOG.debug("Parameter count: " + params.size());
LOG.debug("Params: " + ArrayUtils.toString(params.toArray()));
}
return this;
}
public String getQuery(String what) {
LOG.info("select " + what + " " + sb.toString() + " " + whereBuffer.toString() + " " + sortBuffer.toString());
if (LOG.isDebugEnabled()) {
LOG.debug("select " + what + " " + sb.toString() + " " + whereBuffer.toString() + " " + sortBuffer.toString());
}
return "select " + what + " " + sb.toString() + " " + whereBuffer.toString() + " " + sortBuffer.toString();
}
......@@ -373,4 +431,5 @@ public class DirectMysqlQuery {
public static interface MethodResolver {
Method getMethod(long methodId);
}
}
......@@ -25,6 +25,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
......@@ -105,6 +106,9 @@ import au.com.bytecode.opencsv.CSVWriter;
import au.com.bytecode.opencsv.ResultSetHelper;
import au.com.bytecode.opencsv.ResultSetHelperService;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
@Service
@Transactional(readOnly = true)
public class GenesysServiceImpl implements GenesysService, TraitService, DatasetService {
......@@ -113,7 +117,6 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
@Autowired
private AccessionRepository accessionRepository;
@Autowired
private AccessionBreedingRepository accessionBreedingRepository;
@Autowired
......@@ -137,37 +140,29 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
@Autowired
private CropTaxonomyRepository cropTaxonomyRepository;
@Autowired
private ParameterCategoryRepository parameterCategoryRepository;
@Autowired
private ParameterRepository parameterRepository;
@Autowired
private MethodRepository methodRepository;
@Autowired
private OrganizationRepository organizationRepository;
@Autowired
private FaoInstituteRepository instituteRepository;
@Autowired
private GenesysLowlevelRepository genesysLowlevelRepository;
@Autowired
private SvalbardRepository svalbardRepository;
@Autowired
private AclService aclService;
@Autowired
private HtmlSanitizer htmlSanitizer;
@Autowired
private AccessionAliasRepository accessionAliasRepository;
private final ObjectMapper mapper = new ObjectMapper();
@Override
public long countAll() {
return accessionRepository.count();
......@@ -202,12 +197,12 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
public List<FaoInstitute> findHoldingInstitutes(Set<Long> accessionIds) {
return accessionRepository.findDistinctInstitutesFor(accessionIds);
}
@Override
public Set<Long> listAccessions(FaoInstitute institute, Set<Long> accessionIds) {
return accessionRepository.findByInstituteAndIds(institute, accessionIds);
}
@Override
public Page<Accession> listAccessions(Collection<Long> accessionIds, Pageable pageable) {
if (accessionIds == null || accessionIds.size() == 0) {
......@@ -224,7 +219,8 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
// Including null's
result.add(accn);
if (accn == null) {
// FaoInstitute inst = instituteRepository.findByCode(aid3.getHoldingInstitute());
// FaoInstitute inst =
// instituteRepository.findByCode(aid3.getHoldingInstitute());
if (LOG.isDebugEnabled())
// Only log full miss
LOG.debug("No accession " + aid3);
......@@ -590,7 +586,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
return 0;
return accessionRepository.countAvailable(accessionIds);
}
@Override
public Set<Long> filterAvailable(Set<Long> accessionIds) {
if (accessionIds == null || accessionIds.size() == 0)
......@@ -845,18 +841,33 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
}
@Override
// TODO FIXME Need proper term URLs
public void writeAccessions(final FaoInstitute faoInstitute, OutputStream outputStream) throws IOException {
writeAccessions("{\"instCode\":[\"" + faoInstitute.getCode() + "\"]}", outputStream);
}
@Override
// TODO FIXME Need proper term URLs
public void writeAccessions(String jsonFilter, OutputStream outputStream) throws IOException {
// UTF8 is used for encoding entry names
ZipOutputStream zos = new ZipOutputStream(outputStream);
zos.setComment("Genesys Accessions instCode=" + faoInstitute.getCode());
zos.setComment("Genesys Accessions filter=" + jsonFilter);
ObjectNode filter = (ObjectNode) mapper.readTree(jsonFilter);
// Filter information
ZipEntry readmeEntry = new ZipEntry("README.txt");
readmeEntry.setComment("Extra iformation");
readmeEntry.setTime(System.currentTimeMillis());
zos.putNextEntry(readmeEntry);
writeREADME(filter, zos);
zos.closeEntry();
// Accessions
ZipEntry coreEntry = new ZipEntry("core.csv");
coreEntry.setComment("Accession information");
coreEntry.setTime(System.currentTimeMillis());
zos.putNextEntry(coreEntry);
writeAccessionsCore(faoInstitute, zos);
writeAccessionsCore(filter, zos);
zos.closeEntry();
// AccessionGeo
......@@ -864,7 +875,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
entry.setComment("Accession Names");
entry.setTime(System.currentTimeMillis());
zos.putNextEntry(entry);
writeAccessionsNames(faoInstitute, zos);
writeAccessionsNames(filter, zos);
zos.closeEntry();
// AccessionGeo
......@@ -872,7 +883,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
entry.setComment("GIS information");
entry.setTime(System.currentTimeMillis());
zos.putNextEntry(entry);
writeAccessionsGeo(faoInstitute, zos);
writeAccessionsGeo(filter, zos);
zos.closeEntry();
// AccessionCollect
......@@ -880,7 +891,7 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
entry.setComment("Collecting information");
entry.setTime(System.currentTimeMillis());
zos.putNextEntry(entry);
writeAccessionsColl(faoInstitute, zos);
writeAccessionsColl(filter, zos);
zos.closeEntry();
ZipEntry metaEntry = new ZipEntry("meta.xml");
......@@ -961,16 +972,36 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
zos.finish();
}