Commit 07962ec6 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

Added accessionCount to accession overview

parent 146bc457
...@@ -204,8 +204,9 @@ public class AccessionController { ...@@ -204,8 +204,9 @@ public class AccessionController {
} }
Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(Accession.class, filter, 10, terms.toArray(new String[] {})); Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(Accession.class, filter, 10, terms.toArray(new String[] {}));
long accessionCount = accessionService.countAccessions(filter);
return AccessionOverview.from(filterCode, filter, overview); return AccessionOverview.from(filterCode, filter, overview, accessionCount);
} }
/** /**
...@@ -551,13 +552,15 @@ public class AccessionController { ...@@ -551,13 +552,15 @@ public class AccessionController {
public static class AccessionOverview { public static class AccessionOverview {
public String filterCode; public String filterCode;
public AccessionFilter filter; public AccessionFilter filter;
public long accessionCount;
public Map<String, TermResult> overview; public Map<String, TermResult> overview;
private static AccessionOverview from(String filterCode, AccessionFilter filter, Map<String, TermResult> overview) { private static AccessionOverview from(String filterCode, AccessionFilter filter, Map<String, TermResult> overview, long accessionCount) {
AccessionOverview res = new AccessionOverview(); AccessionOverview res = new AccessionOverview();
res.filterCode = filterCode; res.filterCode = filterCode;
res.filter = filter; res.filter = filter;
res.overview = overview; res.overview = overview;
res.accessionCount = accessionCount;
return res; return res;
} }
......
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