Commit 8d81087b authored by Matija Obreza's avatar Matija Obreza
Browse files

"institute" filter renamed to "instCode", "origin" to "orgCty", "lat" to

"latitude", "lon" to "longitude", "mls" to "mlsStat", "accenumb" to
"acceNumb"
parent 51f4c059
...@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; ...@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
public interface GenesysFilterService { public interface GenesysFilterService {
String[] DEFAULT_FILTERS = { "crop", "genus", "taxon", "origin", "lat", "lon", "organization", "institute", "accenumb", "inSvalbard", "mls", "inTrust", String[] DEFAULT_FILTERS = { "crop", "genus", "taxon", "orgCty", "latitude", "longitude", "organization", "instCode", "acceNumb", "inSvalbard", "mlsStat", "inTrust",
"available" }; "available" };
Page<Accession> listAccessions(JsonNode jsonTree, Pageable pageable); Page<Accession> listAccessions(JsonNode jsonTree, Pageable pageable);
......
...@@ -114,16 +114,16 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -114,16 +114,16 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
this.availableFilters.add(new GenesysAutocompleteFilterImpl("genus", "/explore/ac/genus")); this.availableFilters.add(new GenesysAutocompleteFilterImpl("genus", "/explore/ac/genus"));
this.availableFilters.add(new GenesysAutocompleteFilterImpl("taxon", "/explore/ac/taxonomy")); this.availableFilters.add(new GenesysAutocompleteFilterImpl("taxon", "/explore/ac/taxonomy"));
this.availableFilters.add(new GenesysAutocompleteFilterImpl("origin", "/explore/ac/country")); this.availableFilters.add(new GenesysAutocompleteFilterImpl("orgCty", "/explore/ac/country"));
this.availableFilters.add(new GenesysFilterImpl("lat", DataType.NUMERIC)); this.availableFilters.add(new GenesysFilterImpl("latitude", DataType.NUMERIC));
this.availableFilters.add(new GenesysFilterImpl("lon", DataType.NUMERIC)); this.availableFilters.add(new GenesysFilterImpl("longitude", DataType.NUMERIC));
this.availableFilters.add(new GenesysFilterImpl("elevation", DataType.NUMERIC)); this.availableFilters.add(new GenesysFilterImpl("elevation", DataType.NUMERIC));
this.availableFilters.add(new GenesysFilterImpl("organization", DataType.STRING)); this.availableFilters.add(new GenesysFilterImpl("organization", DataType.STRING));
this.availableFilters.add(new GenesysAutocompleteFilterImpl("institute", "/explore/ac/instCode")); this.availableFilters.add(new GenesysAutocompleteFilterImpl("instCode", "/explore/ac/instCode"));
this.availableFilters.add(new GenesysFilterImpl("accenumb", DataType.NUMERIC)); this.availableFilters.add(new GenesysFilterImpl("acceNumb", DataType.NUMERIC));
this.availableFilters.add(new GenesysFilterImpl("inSvalbard", DataType.BOOLEAN)); this.availableFilters.add(new GenesysFilterImpl("inSvalbard", DataType.BOOLEAN));
this.availableFilters.add(new GenesysFilterImpl("mls", DataType.BOOLEAN)); this.availableFilters.add(new GenesysFilterImpl("mlsStat", DataType.BOOLEAN));
this.availableFilters.add(new GenesysFilterImpl("inTrust", DataType.BOOLEAN)); this.availableFilters.add(new GenesysFilterImpl("inTrust", DataType.BOOLEAN));
this.availableFilters.add(new GenesysFilterImpl("available", DataType.BOOLEAN)); this.availableFilters.add(new GenesysFilterImpl("available", DataType.BOOLEAN));
} }
...@@ -219,7 +219,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -219,7 +219,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
sb.append(" inner join croptaxonomy ct on ct.taxonomyId=t.id inner join crop on crop.id=ct.cropId "); sb.append(" inner join croptaxonomy ct on ct.taxonomyId=t.id inner join crop on crop.id=ct.cropId ");
} }
} }
if (jsonTree.has("lat") || jsonTree.has("lon") || jsonTree.has("alt")) { if (jsonTree.has("latitude") || jsonTree.has("longitude") || jsonTree.has("elevation")) {
sb.append(" inner join accessiongeo geo on geo.accessionId=a.id "); sb.append(" inner join accessiongeo geo on geo.accessionId=a.id ");
} }
if (jsonTree.has("organization")) { if (jsonTree.has("organization")) {
...@@ -227,18 +227,18 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -227,18 +227,18 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
} }
StringBuffer sbf = new StringBuffer(); StringBuffer sbf = new StringBuffer();
createQuery(sbf, "a.acceNumb", jsonTree.get("accenumb"), params); createQuery(sbf, "a.acceNumb", jsonTree.get("acceNumb"), params);
createQuery(sbf, "a.orgCty", jsonTree.get("origin"), params); createQuery(sbf, "a.orgCty", jsonTree.get("orgCty"), params);
createQuery(sbf, "a.instCode", jsonTree.get("institute"), params); createQuery(sbf, "a.instCode", jsonTree.get("instCode"), params);
createQuery(sbf, "a.inSGSV", jsonTree.get("inSvalbard"), params); createQuery(sbf, "a.inSGSV", jsonTree.get("inSvalbard"), params);
createQuery(sbf, "a.mlsStat", jsonTree.get("mls"), params); createQuery(sbf, "a.mlsStat", jsonTree.get("mlsStat"), params);
createQuery(sbf, "a.inTrust", jsonTree.get("inTrust"), params); createQuery(sbf, "a.inTrust", jsonTree.get("inTrust"), params);
createQuery(sbf, "a.available", jsonTree.get("available"), params); createQuery(sbf, "a.available", jsonTree.get("available"), 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.taxonName", jsonTree.get("taxon"), params); createQuery(sbf, "t.taxonName", jsonTree.get("taxon"), params);
createQuery(sbf, "geo.longitude", jsonTree.get("lon"), params); createQuery(sbf, "geo.longitude", jsonTree.get("longitude"), params);
createQuery(sbf, "geo.latitude", jsonTree.get("lat"), params); createQuery(sbf, "geo.latitude", jsonTree.get("latitude"), params);
createQuery(sbf, "geo.elevation", jsonTree.get("elevation"), params); createQuery(sbf, "geo.elevation", jsonTree.get("elevation"), params);
createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params); createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params);
...@@ -711,18 +711,18 @@ public class GenesysFilterServiceImpl implements GenesysFilterService { ...@@ -711,18 +711,18 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
} }
} }
createQuery(sbf, "a.acceNumb", jsonTree.get("accenumb"), params); createQuery(sbf, "a.acceNumb", jsonTree.get("acceNumb"), params);
createQuery(sbf, "a.orgCty", jsonTree.get("origin"), params); createQuery(sbf, "a.orgCty", jsonTree.get("orgCty"), params);
createQuery(sbf, "a.instCode", jsonTree.get("institute"), params); createQuery(sbf, "a.instCode", jsonTree.get("instCode"), params);
createQuery(sbf, "a.inSGSV", jsonTree.get("inSvalbard"), params); createQuery(sbf, "a.inSGSV", jsonTree.get("inSvalbard"), params);
createQuery(sbf, "a.mlsStat", jsonTree.get("mls"), params); createQuery(sbf, "a.mlsStat", jsonTree.get("mlsStat"), params);
createQuery(sbf, "a.inTrust", jsonTree.get("inTrust"), params); createQuery(sbf, "a.inTrust", jsonTree.get("inTrust"), params);
createQuery(sbf, "a.available", jsonTree.get("available"), params); createQuery(sbf, "a.available", jsonTree.get("available"), 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.taxonName", jsonTree.get("taxon"), params); createQuery(sbf, "t.taxonName", jsonTree.get("taxon"), params);
createQuery(sbf, "geo.longitude", jsonTree.get("lon"), params); createQuery(sbf, "geo.longitude", jsonTree.get("longitude"), params);
createQuery(sbf, "geo.latitude", jsonTree.get("lat"), params); createQuery(sbf, "geo.latitude", jsonTree.get("latitude"), params);
createQuery(sbf, "geo.elevation", jsonTree.get("elevation"), params); createQuery(sbf, "geo.elevation", jsonTree.get("elevation"), params);
createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params); createQuery(sbf, "crop.shortName", jsonTree.get("crop"), params);
......
...@@ -128,7 +128,7 @@ public class CountryController extends BaseController { ...@@ -128,7 +128,7 @@ public class CountryController extends BaseController {
filters.put("filter.countryOfOrigin", country); filters.put("filter.countryOfOrigin", country);
model.addAttribute("filters", filters); model.addAttribute("filters", filters);
model.addAttribute("jsonFilter", "{\"origin\":[\"" + country.getCode3() + "\"]}"); model.addAttribute("jsonFilter", "{\"orgCty\":[\"" + country.getCode3() + "\"]}");
return "/accession/data"; return "/accession/data";
} }
......
...@@ -160,7 +160,7 @@ public class WiewsController extends BaseController { ...@@ -160,7 +160,7 @@ public class WiewsController extends BaseController {
filters.put("filter.holdingInstitute", faoInstitute); filters.put("filter.holdingInstitute", faoInstitute);
model.addAttribute("filters", filters); model.addAttribute("filters", filters);
model.addAttribute("jsonFilter", "{\"institute\":[\"" + faoInstitute.getCode() + "\"]}"); model.addAttribute("jsonFilter", "{\"instCode\":[\"" + faoInstitute.getCode() + "\"]}");
return "/accession/data"; return "/accession/data";
} }
...@@ -190,7 +190,7 @@ public class WiewsController extends BaseController { ...@@ -190,7 +190,7 @@ public class WiewsController extends BaseController {
filters.put("filter.holdingInstitute", faoInstitute); filters.put("filter.holdingInstitute", faoInstitute);
model.addAttribute("filters", filters); model.addAttribute("filters", filters);
model.addAttribute("jsonFilter", "{\"institute\":[\"" + faoInstitute.getCode() + "\"],\"taxon\":[\"" + taxonomy.getTaxonName() + "\"]}"); model.addAttribute("jsonFilter", "{\"instCode\":[\"" + faoInstitute.getCode() + "\"],\"taxon\":[\"" + taxonomy.getTaxonName() + "\"]}");
return "/accession/data"; return "/accession/data";
} }
......
...@@ -312,19 +312,19 @@ filters.data-is-filtered=The data is filtered. ...@@ -312,19 +312,19 @@ filters.data-is-filtered=The data is filtered.
filters.modify-filters=View & Modify filters filters.modify-filters=View & Modify filters
filter.taxonomy=Taxonomy filter.taxonomy=Taxonomy
filter.inTrust=ITPGRFA Art. 15 accession filter.inTrust=ITPGRFA Art. 15 accession
filter.accenumb=Accession name filter.acceNumb=Accession name
filter.crop=Crop filter.crop=Crop
filter.countryOfOrigin=Country of Origin filter.countryOfOrigin=Country of Origin
filter.holdingInstitute=Holding Institute filter.holdingInstitute=Holding Institute
filter.origin=Country of Origin filter.orgCty=Country of Origin
filter.institute=Holding Institute filter.instCode=Holding Institute
filter.lat=Latitude filter.latitude=Latitude
filter.lon=Longitude filter.longitude=Longitude
filter.elevation=Elevation filter.elevation=Elevation
filter.genus=Genus filter.genus=Genus
filter.taxon=Taxonomy name filter.taxon=Taxonomy name
filter.inSvalbard=In Svalbard filter.inSvalbard=In Svalbard
filter.mls=In Multilateral System filter.mlsStat=In Multilateral System
filter.available=Available for distribution filter.available=Available for distribution
search.page.title=Full-text Search search.page.title=Full-text Search
......
...@@ -313,15 +313,15 @@ filter.taxonomy=التصنيف ...@@ -313,15 +313,15 @@ filter.taxonomy=التصنيف
filter.crop=المحصول filter.crop=المحصول
filter.countryOfOrigin=بلد المنشأ filter.countryOfOrigin=بلد المنشأ
filter.holdingInstitute=منشأة الحيازة filter.holdingInstitute=منشأة الحيازة
filter.origin=بلد المنشأ filter.orgCty=بلد المنشأ
filter.institute=منشأة الحيازة filter.instCode=منشأة الحيازة
filter.lat=خط العرض filter.latitude=خط العرض
filter.lon=خط الطول filter.longitude=خط الطول
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus=جنس filter.genus=جنس
filter.taxon=اسم التصنيف filter.taxon=اسم التصنيف
filter.inSvalbard=في سفالبارد filter.inSvalbard=في سفالبارد
filter.mls=في النظام متعدد الأطراف filter.mlsStat=في النظام متعدد الأطراف
# filter.available=Available for distribution # filter.available=Available for distribution
search.page.title=بحث عن كامل النص search.page.title=بحث عن كامل النص
......
...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomie ...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomie
filter.crop=Anbaupflanze filter.crop=Anbaupflanze
filter.countryOfOrigin=Herkunftsland filter.countryOfOrigin=Herkunftsland
filter.holdingInstitute=Bereitstellendes Institut filter.holdingInstitute=Bereitstellendes Institut
filter.origin=Herkunftsland filter.orgCty=Herkunftsland
filter.institute=Bereitstellendes Institut filter.instCode=Bereitstellendes Institut
filter.lat=Breitengrad filter.latitude=Breitengrad
filter.lon=Längengrad filter.longitude=Längengrad
filter.elevation=Höhe filter.elevation=Höhe
filter.genus=Genus filter.genus=Genus
filter.taxon=Taxonomischer Name filter.taxon=Taxonomischer Name
filter.inSvalbard=In Svalbard filter.inSvalbard=In Svalbard
filter.mls=Im multilateralen System filter.mlsStat=Im multilateralen System
filter.available=abgebbar filter.available=abgebbar
search.page.title=Volltextsuche search.page.title=Volltextsuche
......
...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomía ...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomía
filter.crop=Cultivo filter.crop=Cultivo
filter.countryOfOrigin=País de origen filter.countryOfOrigin=País de origen
filter.holdingInstitute=Instituto poseedor filter.holdingInstitute=Instituto poseedor
filter.origin=País de origen filter.orgCty=País de origen
filter.institute=Instituto poseedor filter.instCode=Instituto poseedor
filter.lat=Latitud filter.latitude=Latitud
filter.lon=Longitud filter.longitude=Longitud
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus=Género filter.genus=Género
filter.taxon=Nombre taxonómico filter.taxon=Nombre taxonómico
filter.inSvalbard=En Svalbard filter.inSvalbard=En Svalbard
filter.mls=En un sistema multilateral filter.mlsStat=En un sistema multilateral
# filter.available=Available for distribution # filter.available=Available for distribution
search.page.title=Buscador por texto completo search.page.title=Buscador por texto completo
......
...@@ -210,10 +210,10 @@ accession.holdingCountry=محل ...@@ -210,10 +210,10 @@ accession.holdingCountry=محل
# filter.crop=Crop # filter.crop=Crop
# filter.countryOfOrigin=Country of Origin # filter.countryOfOrigin=Country of Origin
# filter.holdingInstitute=Holding Institute # filter.holdingInstitute=Holding Institute
# filter.origin=Country of Origin # filter.orgCty=Country of Origin
# filter.institute=Holding Institute # filter.instCode=Holding Institute
# filter.lat=Latitude # filter.latitude=Latitude
# filter.lon=Longitude # filter.longitude=Longitude
# filter.alt=Altitude # filter.alt=Altitude
# filter.genus=Genus # filter.genus=Genus
# filter.taxon=Taxonomy name # filter.taxon=Taxonomy name
......
...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomie ...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomie
filter.crop=Récolte filter.crop=Récolte
filter.countryOfOrigin=Pays d'origine filter.countryOfOrigin=Pays d'origine
filter.holdingInstitute=Institut titulaire filter.holdingInstitute=Institut titulaire
filter.origin=Pays d'origine filter.orgCty=Pays d'origine
filter.institute=Institut titulaire filter.instCode=Institut titulaire
filter.lat=Latitude filter.latitude=Latitude
filter.lon=Longitude filter.longitude=Longitude
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus=Genre filter.genus=Genre
filter.taxon=Nom de taxonomie filter.taxon=Nom de taxonomie
filter.inSvalbard=Dans Svalbard filter.inSvalbard=Dans Svalbard
filter.mls=Dans le système multilatéral filter.mlsStat=Dans le système multilatéral
# filter.available=Available for distribution # filter.available=Available for distribution
search.page.title=Recherche par texte complet search.page.title=Recherche par texte complet
......
...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomia ...@@ -313,15 +313,15 @@ filter.taxonomy=Taxonomia
filter.crop=Corte filter.crop=Corte
filter.countryOfOrigin=País de Origem filter.countryOfOrigin=País de Origem
filter.holdingInstitute=Instituto de Conservação filter.holdingInstitute=Instituto de Conservação
filter.origin=País de Origem filter.orgCty=País de Origem
filter.institute=Instituto de Conservação filter.instCode=Instituto de Conservação
filter.lat=Latitude filter.latitude=Latitude
filter.lon=Longitude filter.longitude=Longitude
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus=Género filter.genus=Género
filter.taxon=Nome da taxonomia filter.taxon=Nome da taxonomia
filter.inSvalbard=Em Svalbard filter.inSvalbard=Em Svalbard
filter.mls=No Sistema Multilateral filter.mlsStat=No Sistema Multilateral
# filter.available=Available for distribution # filter.available=Available for distribution
search.page.title=Pesquisa de texto completo search.page.title=Pesquisa de texto completo
......
...@@ -313,15 +313,15 @@ filter.taxonomy=Классификация ...@@ -313,15 +313,15 @@ filter.taxonomy=Классификация
filter.crop=Культура filter.crop=Культура
filter.countryOfOrigin=Страна происхождения filter.countryOfOrigin=Страна происхождения
filter.holdingInstitute=Институт-держатель filter.holdingInstitute=Институт-держатель
filter.origin=Страна происхождения filter.orgCty=Страна происхождения
filter.institute=Институт-держатель filter.instCode=Институт-держатель
filter.lat=Широта filter.latitude=Широта
filter.lon=Долгота filter.longitude=Долгота
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus=Сорт filter.genus=Сорт
filter.taxon=Имя классификации filter.taxon=Имя классификации
filter.inSvalbard=На Шпицбергене filter.inSvalbard=На Шпицбергене
filter.mls=В многосторонней системе filter.mlsStat=В многосторонней системе
# filter.available=Available for distribution # filter.available=Available for distribution
search.page.title=Полнотекстовый поиск search.page.title=Полнотекстовый поиск
......
...@@ -313,15 +313,15 @@ filter.taxonomy=分类 ...@@ -313,15 +313,15 @@ filter.taxonomy=分类
filter.crop=作物 filter.crop=作物
filter.countryOfOrigin=原产国 filter.countryOfOrigin=原产国
filter.holdingInstitute=保存单位 filter.holdingInstitute=保存单位
filter.origin=原产国 filter.orgCty=原产国
filter.institute=保存单位 filter.instCode=保存单位
filter.lat=纬度 filter.latitude=纬度
filter.lon=经度 filter.longitude=经度
# filter.elevation=Elevation # filter.elevation=Elevation
filter.genus= filter.genus=
filter.taxon=分类名称 filter.taxon=分类名称
filter.inSvalbard=保存在斯瓦尔巴德 filter.inSvalbard=保存在斯瓦尔巴德
filter.mls=在多边系统中 filter.mlsStat=在多边系统中
filter.available=可供种 filter.available=可供种
search.page.title=全文搜索 search.page.title=全文搜索
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
<div class="main-col-header clearfix"> <div class="main-col-header clearfix">
<div class="nav-header pull-left"> <div class="nav-header pull-left">
<div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" /></div> <div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
<a href="<c:url value="/explore/map"><c:param name="filter">${jsonFilter}</c:param></c:url>">Map</a></div>
<div class="pagination"> <div class="pagination">
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" /> <spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a> <a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
......
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