Commit 3ad1436f authored by Matija Obreza's avatar Matija Obreza

PDCI download: include INSTCODE, ACCENUMB, GENUS

- Updated template
parent 8be56d09
......@@ -52,7 +52,6 @@ import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionAlias;
import org.genesys2.server.model.genesys.AccessionCollect;
import org.genesys2.server.model.genesys.AccessionGeo;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.genesys.AccessionRef;
import org.genesys2.server.model.genesys.AccessionRemark;
import org.genesys2.server.model.genesys.PDCI;
......@@ -217,7 +216,7 @@ public class DownloadServiceImpl implements DownloadService {
final PDCI pdci = accession.getAccessionId().getPdci();
if (pdci != null) {
Row row = sheet.createRow(++i);
writePDCIRow(row, pdci);
writePDCIRow(row, accession, pdci);
if (i % 1000 == 0) {
LOG.info("Writing PDCI row={}", i);
......@@ -674,19 +673,23 @@ public class DownloadServiceImpl implements DownloadService {
}
}
private void writePDCIRow(Row row, PDCI pdci) {
private void writePDCIRow(Row row, Accession accession, PDCI pdci) {
// Process and write result
AccessionId accession = pdci.getAccession();
int cell=0;
updateCell(row, cell++, accession.getInstCode());
updateCell(row, cell++, accession.getAccessionNumber());
updateCell(row, cell++, accession.getGenus());
if (accession.getUuid() != null) {
updateCell(row, 0, accession.getUuid().toString());
updateCell(row, cell++, accession.getUuid().toString());
}
updateCell(row, 1, pdci.getScore());
int col = 2;
updateCell(row, cell++, pdci.getScore());
for (String indicator : pdci.getIndependentItems()) {
updateCell(row, col++, getPDCIScore(pdci, indicator));
updateCell(row, cell++, getPDCIScore(pdci, indicator));
}
for (String indicator : pdci.getDependentItems()) {
updateCell(row, col++, getPDCIScore(pdci, indicator));
updateCell(row, cell++, getPDCIScore(pdci, indicator));
}
}
......
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