Commit 582968fe authored by Viacheslav Pavlov's avatar Viacheslav Pavlov Committed by Matija Obreza

Added list accession data with suggestions

- Renamed ...Filter fields to fit model fields
- Added holder.code, taxa.genus, origin.iso3 suggestionKeys
- added json path to ES path decoder
- Changes related to BasicModelFilter#clearFilter introduction
- TermResults values for crop.shortName, sampStat, storage
parent 33fb990e
......@@ -46,13 +46,13 @@ public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
public PartnerFilter owner;
/** The accession reference. */
public AccessionRefFilter accessionRef;
public AccessionRefFilter accessionRefs;
/** Dataset location filter */
public DatasetLocationFilter location;
public DatasetLocationFilter locations;
/** Descriptor filter */
public DescriptorFilter descriptor;
public DescriptorFilter descriptors;
/** The title. */
public StringFilter title;
......@@ -67,7 +67,7 @@ public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
public Set<PublishState> state;
/** The crop. */
public Set<String> crop;
public Set<String> crops;
public Set<String> rights;
......@@ -92,21 +92,21 @@ public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
if (owner != null) {
and.and(owner.buildQuery(dataset.owner));
}
if (accessionRef != null) {
and.and(accessionRef.buildQuery(dataset.accessionRefs));
if (accessionRefs != null) {
and.and(accessionRefs.buildQuery(dataset.accessionRefs));
}
if (descriptor != null) {
and.and(descriptor.buildQuery(dataset.descriptors.any()));
if (descriptors != null) {
and.and(descriptors.buildQuery(dataset.descriptors.any()));
}
if (CollectionUtils.isNotEmpty(language)) {
and.and(dataset.language.in(language));
}
if (crop != null && !crop.isEmpty()) {
and.and(dataset.crops.any().in(crop));
if (crops != null && !crops.isEmpty()) {
and.and(dataset.crops.any().in(crops));
}
if (location != null) {
and.and(location.buildQuery(dataset.locations.any()));
if (locations != null) {
and.and(locations.buildQuery(dataset.locations.any()));
}
if (CollectionUtils.isNotEmpty(rights)) {
......
......@@ -20,17 +20,17 @@ public class DatasetLocationFilter extends UuidModelFilter<DatasetLocationFilter
/**
* The longitude.
*/
public NumberFilter<Double> longitude;
public NumberFilter<Double> decimalLongitude;
/**
* The latitude.
*/
public NumberFilter<Double> latitude;
public NumberFilter<Double> decimalLatitude;
/**
* The elevation.
*/
public Set<String> country;
public Set<String> userCountry;
/**
......@@ -52,14 +52,14 @@ public class DatasetLocationFilter extends UuidModelFilter<DatasetLocationFilter
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(datasetLocation, datasetLocation._super, and);
if (longitude != null) {
and.and(longitude.buildQuery(datasetLocation.decimalLongitude));
if (decimalLongitude != null) {
and.and(decimalLongitude.buildQuery(datasetLocation.decimalLongitude));
}
if (latitude != null) {
and.and(latitude.buildQuery(datasetLocation.decimalLatitude));
if (decimalLatitude != null) {
and.and(decimalLatitude.buildQuery(datasetLocation.decimalLatitude));
}
if (CollectionUtils.isNotEmpty(country)) {
and.and(datasetLocation.userCountry.in(country));
if (CollectionUtils.isNotEmpty(userCountry)) {
and.and(datasetLocation.userCountry.in(userCountry));
}
return and;
......
......@@ -86,7 +86,7 @@ public class DescriptorFilter extends UuidModelFilter<DescriptorFilter, Descript
public NumberFilter<Double> maxValue;
/** Descriptor list filter */
public DescriptorListFilter list;
public DescriptorListFilter descriptorLists;
/** Descriptor is in use: referenced in Dataset or DescriptorList. */
public Boolean used;
......@@ -146,8 +146,8 @@ public class DescriptorFilter extends UuidModelFilter<DescriptorFilter, Descript
if (maxValue != null) {
and.and(maxValue.buildQuery(descriptorPath.maxValue));
}
if (list != null) {
and.and(list.buildQuery(descriptorPath.descriptorLists.any()));
if (descriptorLists != null) {
and.and(descriptorLists.buildQuery(descriptorPath.descriptorLists.any()));
}
if (used != null) {
if (used.booleanValue()==true) {
......
......@@ -189,7 +189,7 @@ public class CropsController extends ApiBaseController {
}
/**
* Get crop taxonomies /crops/{shortName}/taxa
* Get crop taxonomies /crops/{shortName}/taxonomy
* @return
*
* @return
......@@ -197,7 +197,7 @@ public class CropsController extends ApiBaseController {
*/
@RequestMapping(value = "/{shortName}/taxa", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })
public Page<CropTaxonomy> getCropTaxa(@PathVariable("shortName") String shortName) throws AuthorizationException {
LOG.info("Getting crop taxa {}", shortName);
LOG.info("Getting crop taxonomy {}", shortName);
final Crop crop = cropService.getCrop(shortName);
final Page<CropTaxonomy> cropTaxa = cropService.getCropTaxonomies(crop, new PageRequest(0, 50));
return OAuth2Cleanup.clean(cropTaxa);
......
......@@ -23,6 +23,7 @@ import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -30,6 +31,7 @@ import java.util.UUID;
import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.JsonViews;
import org.genesys.catalog.service.ShortFilterService;
......@@ -124,6 +126,7 @@ public class AccessionController {
private final Set<String> terms = Sets.newHashSet("institute.code", "institute.country.code3", "cropName", "crop.shortName", "taxonomy.genus", "taxonomy.species",
"taxonomy.genusSpecies", "countryOfOrigin.code3", "sampStat", "available", "mlsStatus", "donorCode", "sgsv", "storage", "duplSite", "breederCode");
private final Set<String> suggestions = Sets.newHashSet("crop.shortName", "institute.code", "taxonomy.genus", "countryOfOrigin.code3", "historic", "sampStat", "available", "mlsStatus", "sgsv", "storage");
private ObjectMapper objectMapper = new ObjectMapper();
......@@ -185,6 +188,46 @@ public class AccessionController {
return new FilteredPage<>(filterInfo.filterCode, filterInfo.filter, accessionService.list(filterInfo.filter, page.toPageRequest(100, Sort.Direction.ASC, "seqNo")));
}
/**
* List accessions by filterCode or filter
*
* @param page the page
* @param filterCode short filter code
* @param filter the filter
* @return the page
* @throws IOException
*/
@PostMapping(value = "/list-suggestions", produces = { MediaType.APPLICATION_JSON_VALUE })
@JsonView({ JsonViews.Public.class })
public AccessionSuggestionPage listSuggestions(@RequestParam(name = "f", required = false) String filterCode, final Pagination page,
@RequestBody(required = false) AccessionFilter filter) throws IOException, SearchException {
if (filterCode != null) {
filter = shortFilterService.filterByCode(filterCode, AccessionFilter.class);
} else {
filterCode = shortFilterService.getCode(filter);
}
FilterInfo<AccessionFilter> filterInfo = shortFilterService.processFilter(filterCode, filter, AccessionFilter.class);
FilteredPage<Accession> pageRes = new FilteredPage<>(filterInfo.filterCode, filterInfo.filter, accessionService.list(filterInfo.filter, page.toPageRequest(100, Sort.Direction.ASC, "seqNo")));
Map<String, TermResult> suggestionRes = new HashMap<>(suggestions.size());
for (String suggestionKey: suggestions) {
AccessionFilter suggestionFilter = filter.copy(AccessionFilter.class);
try {
suggestionFilter.clearFilter(suggestionKey);
} catch (NoSuchFieldException | IllegalAccessException e) {
LOG.error("Error while clearing filter: ", e.getMessage());
}
TermResult suggestion = elasticsearchService.termStatisticsAuto(Accession.class, suggestionFilter, 100, suggestionKey);
suggestionRes.put(suggestionKey, suggestion);
}
return AccessionSuggestionPage.from(pageRes, suggestionRes);
}
/**
* Get term overview for filters
*
......@@ -363,27 +406,27 @@ public class AccessionController {
// "taxonomy.genus", "taxonomy.genusSpecies", "taxonomy.species",
// "countryOfOrigin.code3", "sampStat", "available", "mlsStatus", "donorCode",
// "sgsv", "storage", "duplSite", "breederCode"
if (filter.taxa != null) {
if (CollectionUtil.isNotEmpty(filter.taxa.species)) {
if (filter.taxonomy != null) {
if (CollectionUtil.isNotEmpty(filter.taxonomy.species)) {
AccessionFilter modifiedFilter = copyFilter(filter);
modifiedFilter.taxa.species.clear();
modifiedFilter.taxonomy.species.clear();
termResults.put("taxonomy.species", elasticsearchService.termStatisticsAuto(Accession.class, modifiedFilter, 10, "taxonomy.species"));
}
if (CollectionUtil.isNotEmpty(filter.taxa.genus)) {
if (CollectionUtil.isNotEmpty(filter.taxonomy.genus)) {
AccessionFilter modifiedFilter = copyFilter(filter);
modifiedFilter.taxa.genus.clear();
modifiedFilter.taxonomy.genus.clear();
termResults.put("taxonomy.genus", elasticsearchService.termStatisticsAuto(Accession.class, modifiedFilter, 10, "taxonomy.genus"));
}
}
if (filter.origin != null) {
if (filter.countryOfOrigin != null) {
AccessionFilter modifiedFilter = copyFilter(filter);
modifiedFilter.origin = null;
modifiedFilter.countryOfOrigin = null;
termResults.put("countryOfOrigin.code3", elasticsearchService.termStatisticsAuto(Accession.class, modifiedFilter, 10, "countryOfOrigin.code3"));
}
if (filter.holder != null) {
if (filter.institute != null) {
AccessionFilter modifiedFilter = copyFilter(filter);
modifiedFilter.holder = null;
modifiedFilter.institute = null;
termResults.putAll(elasticsearchService.termStatisticsAuto(Accession.class, modifiedFilter, 10, "institute.code", "institute.country.code3"));
}
......@@ -567,4 +610,19 @@ public class AccessionController {
}
}
public static class AccessionSuggestionPage {
@JsonUnwrapped
public FilteredPage<Accession> page;
public Map<String, TermResult> suggestions;
private static AccessionSuggestionPage from(FilteredPage<Accession> page, Map<String, TermResult> suggestions) {
AccessionSuggestionPage res = new AccessionSuggestionPage();
res.page = page;
res.suggestions = suggestions;
return res;
}
}
}
......@@ -215,7 +215,7 @@ public class CropsController extends ApiBaseController {
}
/**
* Get crop taxonomies /crops/{shortName}/taxa
* Get crop taxonomies /crops/{shortName}/taxonomy
* @return
*
* @return
......@@ -223,7 +223,7 @@ public class CropsController extends ApiBaseController {
*/
@RequestMapping(value = "/{shortName}/taxa", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })
public Page<CropTaxonomy> getCropTaxa(@PathVariable("shortName") String shortName) throws AuthorizationException {
LOG.info("Getting crop taxa {}", shortName);
LOG.info("Getting crop taxonomy {}", shortName);
final Crop crop = cropService.getCrop(shortName);
final Page<CropTaxonomy> cropTaxa = cropService.getCropTaxonomies(crop, new PageRequest(0, 50));
return OAuth2Cleanup.clean(cropTaxa);
......
......@@ -106,8 +106,8 @@ public class SearchController extends ApiBaseController {
return null;
}
BoolQueryBuilder q = boolQuery();
if (filters.crop != null && !filters.crop.isEmpty()) {
q.must(termsQuery("crop", filters.crop));
if (filters.crops != null && !filters.crops.isEmpty()) {
q.must(termsQuery("crop", filters.crops));
}
q.boost(3.0f);
......
......@@ -38,6 +38,7 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonGetter;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys.blocks.model.IdUUID;
import org.genesys.blocks.model.JsonViews;
......@@ -71,7 +72,7 @@ public abstract class AccessionData extends AuditedVersionedModel implements IdU
@JoinColumn(name = "id")
@JsonUnwrapped
@Field(type=FieldType.Auto)
@QueryInit({ "geo.*", "coll.*", "pdci.*" })
@QueryInit({ "geo.*", "coll.*", "pdci.*", "lists.*" })
private AccessionId accessionId;
@Column(name = "doi")
......@@ -531,4 +532,9 @@ public abstract class AccessionData extends AuditedVersionedModel implements IdU
public boolean getSgsv() {
return this.duplSiteStr != null && this.duplSiteStr.contains("NOR051");
}
@JsonInclude
public Boolean getImages() {
return this.accessionId != null && this.accessionId.getImageCount() > 0;
}
}
......@@ -145,7 +145,7 @@ public class DescriptorControllerRdf extends RdfBaseController {
*
* cco:MusaTrait a skos:Concept; cco:category cco:GeneralTrait ;
* skos:prefLabel "Musa taxonomic traits"@en; skos:definition
* "Nomenclature for Characterization traits for species in the Musa taxa."
* "Nomenclature for Characterization traits for species in the Musa taxonomy."
* @en; skos:prefLabel "Rasgos taxonómicos de Musa."@es; skos:definition
* "Nomenclatura de los rasgos de caracterización de las especies en el taxón Musa."
* @es; skos:prefLabel "Муса таксономические черты"@ru; skos:definition
......
......@@ -30,7 +30,7 @@ public interface FilterConstants {
public static final String AVAILABLE = "available";
public static final String ART15 = "art15";
public static final String ART15 = "inTrust";
public static final String MLSSTATUS = "mlsStatus";
......@@ -38,7 +38,7 @@ public interface FilterConstants {
public static final String ALIAS = "alias";
public static final String ACCENUMB = "acceNumb";
public static final String ACCENUMB = "accessionNumber";
public static final String INSTCODE = "institute.code";
......
......@@ -33,16 +33,16 @@ import com.querydsl.core.types.Predicate;
public class AccessionCollectFilter extends BasicModelFilter<AccessionCollectFilter, AccessionCollect> {
/** The date. */
public StringFilter date;
public StringFilter collDate;
/** The numb. */
public StringFilter numb;
public StringFilter collNumb;
/** The mission. */
public Set<String> mission;
public Set<String> collMissId;
/** The site. */
public StringFilter site;
public StringFilter collSite;
/**
* Builds the query.
......@@ -63,17 +63,17 @@ public class AccessionCollectFilter extends BasicModelFilter<AccessionCollectFil
final BooleanBuilder and = new BooleanBuilder();
super.buildPredicate(collect, collect._super, and);
if (date != null) {
and.and(date.buildQuery(collect.collDate));
if (collDate != null) {
and.and(collDate.buildQuery(collect.collDate));
}
if (numb != null) {
and.and(numb.buildQuery(collect.collNumb));
if (collNumb != null) {
and.and(collNumb.buildQuery(collect.collNumb));
}
if (site != null) {
and.and(site.buildQuery(collect.collSite));
if (collSite != null) {
and.and(collSite.buildQuery(collect.collSite));
}
if (mission != null && !mission.isEmpty()) {
and.and(collect.collMissId.in(mission));
if (collMissId != null && !collMissId.isEmpty()) {
and.and(collect.collMissId.in(collMissId));
}
return and;
}
......
......@@ -16,9 +16,13 @@
package org.genesys2.server.service.filter;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import org.genesys.blocks.model.filters.NumberFilter;
import org.genesys.blocks.model.filters.StringFilter;
......@@ -61,11 +65,11 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
/** The crop name. */
public StringFilter cropName;
/** The holder. */
public InstituteFilter holder;
/** The institute. */
public InstituteFilter institute;
/** The acce numb. */
public StringFilter acceNumb;
public StringFilter accessionNumber;
/** The doi. */
public Set<String> doi;
......@@ -73,14 +77,14 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
/** The seq no. */
public NumberFilter<Double> seqNo;
/** The taxa. */
public TaxonomyFilter taxa;
/** The taxonomy. */
public TaxonomyFilter taxonomy;
/** The samp stat. */
public Set<Integer> sampStat;
/** The origin. */
public CountryFilter origin;
public CountryFilter countryOfOrigin;
/** The geo. */
public AccessionGeoFilter geo;
......@@ -95,16 +99,16 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
public Boolean sgsv;
/** The art 15. */
public Boolean art15;
public Boolean inTrust;
/** The pdci. */
public NumberFilter<Double> pdci;
/** acce.lists uuid */
public Set<UUID> list;
public Set<UUID> lists;
/** accession aliases */
public StringFilter alias;
public StringFilter aliasses;
/** accessions with images */
public Boolean images;
......@@ -124,25 +128,25 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(accession, accession._super._super, and);
if (taxa != null) {
if (taxonomy != null) {
QTaxonomy2 qTaxonomy = new QTaxonomy2("taxonomy");
query.innerJoin(accession.taxonomy, qTaxonomy);
and.and(taxa.buildQuery(qTaxonomy));
and.and(taxonomy.buildQuery(qTaxonomy));
}
if (crop != null && !crop.isEmpty()) {
QCrop qCrop = new QCrop("crop");
query.leftJoin(accession.crop, qCrop);
and.and(qCrop.shortName.in(crop));
}
if (holder != null) {
if (institute != null) {
QFaoInstitute qInstitute = new QFaoInstitute("institute");
query.innerJoin(accession.institute, qInstitute);
and.and(holder.buildQuery(qInstitute));
and.and(institute.buildQuery(qInstitute));
}
if (origin != null) {
if (countryOfOrigin != null) {
QCountry qOrigin = new QCountry("countryOfOrigin");
query.leftJoin(accession.countryOfOrigin, qOrigin);
and.and(origin.buildQuery(qOrigin));
and.and(countryOfOrigin.buildQuery(qOrigin));
}
if (geo != null) {
QAccessionGeo qGeo = new QAccessionGeo("geo");
......@@ -171,8 +175,8 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
if (CollectionUtil.isNotEmpty(doi)) {
and.and(accession.doi.in(doi));
}
if (acceNumb != null) {
and.and(acceNumb.buildQuery(accession.accessionNumber));
if (accessionNumber != null) {
and.and(accessionNumber.buildQuery(accession.accessionNumber));
}
if (seqNo != null) {
and.and(seqNo.buildQuery(accession.seqNo));
......@@ -189,17 +193,17 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
if (available != null) {
and.and(accession.available.eq(available));
}
if (art15 != null) {
and.and(accession.inTrust.eq(art15));
if (inTrust != null) {
and.and(accession.inTrust.eq(inTrust));
}
if (CollectionUtil.isNotEmpty(list)) {
and.and(qAccessionId.lists.any().uuid.in(list));
if (CollectionUtil.isNotEmpty(lists)) {
and.and(qAccessionId.lists.any().uuid.in(lists));
}
if (CollectionUtil.isNotEmpty(uuid)) {
and.and(qAccessionId.uuid.in(uuid));
}
if (alias != null) {
and.and(alias.buildQuery(accession.accessionId.aliases.any().name));
if (aliasses != null) {
and.and(aliasses.buildQuery(accession.accessionId.aliases.any().name));
}
// TODO Do we have to change this?
if (sgsv != null) {
......@@ -232,8 +236,8 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(accession, accession._super._super, and);
if (taxa != null) {
and.and(taxa.buildQuery(accession.taxonomy));
if (taxonomy != null) {
and.and(taxonomy.buildQuery(accession.taxonomy));
}
if (historic != null) {
and.and(accession.historic.eq(historic));
......@@ -244,14 +248,14 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
if (cropName != null) {
and.and(cropName.buildQuery(accession.cropName));
}
if (holder != null) {
and.and(holder.buildQuery(accession.institute));
if (institute != null) {
and.and(institute.buildQuery(accession.institute));
}
if (CollectionUtil.isNotEmpty(doi)) {
and.and(accession.doi.in(doi));
}
if (acceNumb != null) {
and.and(acceNumb.buildQuery(accession.accessionNumber));
if (accessionNumber != null) {
and.and(accessionNumber.buildQuery(accession.accessionNumber));
}
if (seqNo != null) {
and.and(seqNo.buildQuery(accession.seqNo));
......@@ -265,8 +269,8 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
if (CollectionUtil.isNotEmpty(storage)) {
and.and(accession.accessionId.storage.any().in(storage));
}
if (origin != null) {
and.and(origin.buildQuery(accession.countryOfOrigin));
if (countryOfOrigin != null) {
and.and(countryOfOrigin.buildQuery(accession.countryOfOrigin));
}
if (mlsStatus != null) {
and.and(accession.mlsStatus.eq(mlsStatus));
......@@ -280,20 +284,20 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
if (coll != null) {
and.and(coll.buildQuery(accession.accessionId.coll));
}
if (art15 != null) {
and.and(accession.inTrust.eq(art15));
if (inTrust != null) {
and.and(accession.inTrust.eq(inTrust));
}
if (pdci != null) {
and.and(pdci.buildQuery(accession.accessionId.pdci.score));
}
if (CollectionUtil.isNotEmpty(list)) {
and.and(accession.accessionId.lists.any().uuid.in(list));
if (CollectionUtil.isNotEmpty(lists)) {
and.and(accession.accessionId.lists.any().uuid.in(lists));
}
if (CollectionUtil.isNotEmpty(uuid)) {
and.and(accession.accessionId.uuid.in(uuid));
}
if (alias != null) {
and.and(alias.buildQuery(accession.accessionId.aliases.any().name));
if (aliasses != null) {
and.and(aliasses.buildQuery(accession.accessionId.aliases.any().name));
}
// TODO Do we have to change this?
if (sgsv != null) {
......@@ -330,10 +334,10 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
* @return the institute filter
*/
public synchronized InstituteFilter holder() {
if (this.holder==null) {
return this.holder = new InstituteFilter();
if (this.institute ==null) {
return this.institute = new InstituteFilter();
} else {
return this.holder;
return this.institute;
}
}
......@@ -343,10 +347,10 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
* @return the country filter
*/
public synchronized CountryFilter origin() {
if (this.origin == null) {
return this.origin = new CountryFilter();
if (this.countryOfOrigin == null) {
return this.countryOfOrigin = new CountryFilter();
}
return this.origin;
return this.countryOfOrigin;
}
/**
......@@ -379,10 +383,10 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
* @return the taxonomy filter
*/
public synchronized TaxonomyFilter taxa() {
if (this.taxa == null) {
return this.taxa = new TaxonomyFilter();
if (this.taxonomy == null) {
return this.taxonomy = new TaxonomyFilter();
}
return this.taxa;
return this.taxonomy;
}
/**
......@@ -391,10 +395,10 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
* @return the string filter
*/
public synchronized StringFilter acceNumb() {
if (acceNumb == null) {
acceNumb = new StringFilter();
if (accessionNumber == null) {
accessionNumber = new StringFilter();
}
return acceNumb;
return accessionNumber;
}
public synchronized Set<String> doi() {
......@@ -403,4 +407,5 @@ public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession>
}
return doi;
}
}
......@@ -214,7 +214,7 @@ public class AppliedFiltersConverter {
break;
}
case FilterConstants.ART15: {
f.art15 = convertBoolean(af.getValues());
f.inTrust = convertBoolean(af.getValues());
break;
}
case FilterConstants.MLSSTATUS: {
......@@ -227,7 +227,7 @@ public class AppliedFiltersConverter {
break;
}
case FilterConstants.ACCENUMB: {
f.acceNumb = convertStringFilter(af);
f.accessionNumber = convertStringFilter(af);
break;
}
case FilterConstants.HISTORIC: {
......@@ -239,7 +239,7 @@ public class AppliedFiltersConverter {
break;
}
case FilterConstants.LISTS: {
f.list = toUUIDSet(af);
f.list