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

Added a.inSvalbard filter

parent 8c7f843f
...@@ -17,7 +17,7 @@ public interface GenesysFilterService { ...@@ -17,7 +17,7 @@ public interface GenesysFilterService {
public static interface GenesysFilter { public static interface GenesysFilter {
public enum FilterType { public enum FilterType {
FIXEDSTRING, STRING, NUMERIC FIXEDSTRING, STRING, NUMERIC, BOOLEAN
} }
} }
......
...@@ -64,6 +64,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -64,6 +64,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
this.availableFilters.add(new GenesysFilterImpl("genus", FilterType.STRING)); this.availableFilters.add(new GenesysFilterImpl("genus", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("taxon", FilterType.STRING)); this.availableFilters.add(new GenesysFilterImpl("taxon", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("crop", FilterType.STRING)); this.availableFilters.add(new GenesysFilterImpl("crop", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("inSvalbard", FilterType.BOOLEAN));
} }
@Override @Override
...@@ -98,6 +99,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -98,6 +99,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
StringBuffer sbf=new StringBuffer(); StringBuffer sbf=new StringBuffer();
createQuery(sbf, "a.Origin", jsonTree.get("origin"), params); createQuery(sbf, "a.Origin", jsonTree.get("origin"), params);
createQuery(sbf, "a.Institute", jsonTree.get("institute"), params); createQuery(sbf, "a.Institute", jsonTree.get("institute"), params);
createQuery(sbf, "a.In_Svalbard", jsonTree.get("inSvalbard"), params);
createQuery(sbf, "org.slug", jsonTree.get("organization"), params); createQuery(sbf, "org.slug", jsonTree.get("organization"), params);
createQuery(sbf, "t.Genus", jsonTree.get("genus"), params); createQuery(sbf, "t.Genus", jsonTree.get("genus"), params);
createQuery(sbf, "t.Taxon_Name", jsonTree.get("taxon"), params); createQuery(sbf, "t.Taxon_Name", jsonTree.get("taxon"), params);
......
...@@ -195,6 +195,7 @@ filter.lon=Longitude ...@@ -195,6 +195,7 @@ filter.lon=Longitude
filter.alt=Altitude filter.alt=Altitude
filter.genus=Genus filter.genus=Genus
filter.taxon=Taxonomy name filter.taxon=Taxonomy name
filter.inSvalbard=In Svalbard
search.page.title=Full-text Search search.page.title=Full-text Search
search.no-results=No matches found for your query. search.no-results=No matches found for your query.
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
<c:when test="${filter.type=='NUMERIC'}"> <c:when test="${filter.type=='NUMERIC'}">
<div class="filter-new pull-left">Min: <input class="span1" type="text" /> Max: <input class="span1" type="text" /> <button class="notimportant">+</button></div> <div class="filter-new pull-left">Min: <input class="span1" type="text" /> Max: <input class="span1" type="text" /> <button class="notimportant">+</button></div>
</c:when> </c:when>
<%-- <c:when test="${filter.type=='BOOLEAN'}">
<div class="filter-new pull-left"><input type="checkbox" id="check.${filter.name}" /> <label for="check.${filter.name}">Yes</label> <button class="notimportant">+</button></div>
</c:when> --%>
<c:otherwise> <c:otherwise>
<div class="filter-new pull-left"><input class="span2" type="text" /><button class="notimportant">+</button></div> <div class="filter-new pull-left"><input class="span2" type="text" /><button class="notimportant">+</button></div>
</c:otherwise> </c:otherwise>
......
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