Commit 955817bf authored by Matija Obreza's avatar Matija Obreza
Browse files

Added Dataset#crop filter

parent a3f73653
......@@ -59,6 +59,9 @@ public class DatasetFilter extends AuditedVersionedModelFilter {
/** The published. */
public Boolean published;
/** The crop. */
public Set<String> crop;
/**
* Builds the query.
*
......@@ -89,6 +92,9 @@ public class DatasetFilter extends AuditedVersionedModelFilter {
if (CollectionUtils.isNotEmpty(language)) {
and.and(dataset.language.in(language));
}
if ((crop != null) && !crop.isEmpty()) {
and.and(dataset.crops.any().in(crop));
}
if (StringUtils.isNotBlank(_text)) {
/*@formatter:off*/
......@@ -97,6 +103,7 @@ public class DatasetFilter extends AuditedVersionedModelFilter {
FilterHelpers.equalsAny(_text,
dataset.versionTag,
dataset.owner.shortName,
dataset.crops.any(),
dataset.descriptors.any().crop,
dataset.accessionIdentifiers.any().genus, dataset.accessionIdentifiers.any().instCode, dataset.accessionIdentifiers.any().acceNumb
),
......
Supports Markdown
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