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

Cleanup

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