Commit 7cd80dac authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

DOI in export

parent ce7785d9
......@@ -243,7 +243,7 @@ public class GenesysLowlevelRepositoryCustomImpl implements GenesysLowlevelRepos
@Override
public PreparedStatement createPreparedStatement(final Connection con) throws SQLException {
final PreparedStatement stmt = con.prepareStatement(directQuery
.getQuery("a.id, acce.uuid, a.instCode, a.acceNumb, t.genus, t.species, t.taxonName, a.orgCty, a.acqSrc, a.acqDate, a.mlsStat, a.available, a.historic, a.storage, a.sampStat, a.duplSite, acce.createdBy, acce.createdDate, acce.lastModifiedBy, acce.lastModifiedDate"));
.getQuery("a.id, acce.uuid, a.instCode, a.acceNumb, t.genus, t.species, t.taxonName, a.orgCty, a.acqSrc, a.acqDate, a.mlsStat, a.available, a.historic, a.storage, a.sampStat, a.duplSite, acce.createdBy, acce.createdDate, acce.lastModifiedBy, acce.lastModifiedDate, a.doi"));
final ArgumentPreparedStatementSetter apss = new ArgumentPreparedStatementSetter(directQuery.getParameters());
apss.setValues(stmt);
......
......@@ -319,6 +319,11 @@ public class DownloadServiceImpl implements DownloadService {
createCell(row, 40, r);
}
if (StringUtils.isNotBlank(accession.getDoi())) {
final String doi = accession.getDoi();
createCell(row, 41, doi);
}
}
@Override
......
......@@ -1256,7 +1256,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@SuppressWarnings("resource")
final CSVWriter csv = new CSVWriter(new BufferedWriter(new OutputStreamWriter(zos)), ',', '"', '\\', "\n");
csv.writeNext(new String[] { "genesysId", "uuid", "instCode", "acceNumb", "genus", "species", "fullTaxa", "orgCty", "acqSrc", "acqDate", "mlsStat", "available", "historic", "storage",
"sampStat", "duplSite", "createdBy", "createdDate", "lastModifiedBy", "lastModifiedDate" });
"sampStat", "duplSite", "createdBy", "createdDate", "lastModifiedBy", "lastModifiedDate", "doi" });
final ResultSetHelper csvResultsetHelper = new CSVResultSetHelper();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment