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

Cleanup

parent 2fa322e5
...@@ -111,14 +111,14 @@ public class DownloadServiceImpl implements DownloadService { ...@@ -111,14 +111,14 @@ public class DownloadServiceImpl implements DownloadService {
c.setCellStyle(dateStyle); c.setCellStyle(dateStyle);
c.setCellValue(new Date()); c.setCellValue(new Date());
r = legal.createRow(4); r = legal.createRow(4);
r.createCell(0).setCellValue("Server URL"); r.createCell(0).setCellValue("Attribution");
r.createCell(1).setCellValue(baseUrl + "/content/terms"); r.createCell(1).setCellValue(baseUrl + "/content/terms");
((SXSSFSheet) legal).flushRows(); ((SXSSFSheet) legal).flushRows();
final Sheet sheet = wb.getSheet("MCPD"); final Sheet sheet = wb.getSheet("MCPD");
final ArrayList<Long> batch = new ArrayList<Long>(100); final ArrayList<Long> batch = new ArrayList<Long>(100);
final Writer writer=new Writer(); final Writer writer = new Writer();
// Write accession information // Write accession information
genesysLowlevelRepository.listAccessionIds(filters, new Sort("acceNumb"), new RowCallbackHandler() { genesysLowlevelRepository.listAccessionIds(filters, new Sort("acceNumb"), new RowCallbackHandler() {
...@@ -322,11 +322,13 @@ public class DownloadServiceImpl implements DownloadService { ...@@ -322,11 +322,13 @@ public class DownloadServiceImpl implements DownloadService {
return otherNames + ";" + name; return otherNames + ";" + name;
} }
private String toMcpdArray(List<Integer> stoRage) { public static String toMcpdArray(List<Integer> integers) {
if (stoRage == null || stoRage.size() == 0) if (integers == null || integers.size() == 0)
return null; return null;
String s = ""; String s = "";
for (Integer i : stoRage) { for (Integer i : integers) {
if (i == null)
continue;
if (s.length() > 0) if (s.length() > 0)
s += ";"; s += ";";
s += i; s += i;
......
...@@ -468,8 +468,14 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -468,8 +468,14 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
for (AccessionAlias aa : accessionAliasRepository.findAllFor(accessionIds)) { for (AccessionAlias aa : accessionAliasRepository.findAllFor(accessionIds)) {
AllStuff all = map.get(aa.getAccession().getId()); AllStuff all = map.get(aa.getAccession().getId());
if (all == null) {
System.err.println(aa.getAccession().getId() + " not in the list! " + aa);
} else if (aa == null) {
System.err.println("aa is null");
} else {
all.names.add(aa); all.names.add(aa);
} }
}
for (AccessionRemark ar : accessionRemarkRepository.findAllFor(accessionIds)) { for (AccessionRemark ar : accessionRemarkRepository.findAllFor(accessionIds)) {
AllStuff all = map.get(ar.getAccession().getId()); AllStuff all = map.get(ar.getAccession().getId());
......
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