Skip to content

Commit 8c02b12

Browse files
authored
Merge pull request #462 from AtlasOfLivingAustralia/spatiallyValid
change geospatial_kosher to spatiallyValid
2 parents 522e51f + 264fb85 commit 8c02b12

File tree

7 files changed

+48
-48
lines changed

7 files changed

+48
-48
lines changed

grails-app/assets/javascripts/spApp/controller/areaReportCtrl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
name: $i18n(365, "Number of species - spatially valid only"),
263263
query: {q: areaQ.q, bs: areaQ.bs, ws: areaQ.ws, wkt: areaQ.wkt, qid: areaQ.qid},
264264
map: false,
265-
extraQ: ["geospatial_kosher:true"]
265+
extraQ: ["spatiallyValid:true"]
266266
},
267267
{
268268
name: $i18n(366, "Number of endemic species"),
@@ -275,7 +275,7 @@
275275
endemic: true,
276276
query: {q: areaQ.q, bs: areaQ.bs, ws: areaQ.ws, wkt: areaQ.wkt, qid: areaQ.qid},
277277
map: false,
278-
extraQ: ["geospatial_kosher:true"]
278+
extraQ: ["spatiallyValid:true"]
279279
}];
280280

281281
// TODO: move this into config and retrieve from $SH
@@ -289,7 +289,7 @@
289289
name: $i18n(368, "Occurrences - spatially valid only"),
290290
query: {q: areaQ.q, bs: areaQ.bs, ws: areaQ.ws, wkt: areaQ.wkt, qid: areaQ.qid},
291291
occurrences: true,
292-
extraQ: ["geospatial_kosher:true"]
292+
extraQ: ["spatiallyValid:true"]
293293
},
294294
{
295295
name: $i18n(356, "Expert distributions"),

grails-app/assets/javascripts/spApp/directive/selectFacet.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
});
3535

3636
//Watch special options update
37-
//fq=geospatial_kosher:true&fq=-occurrence_status:absent
37+
//fq=spatiallyValid:true&fq=-occurrence_status:absent
3838
scope.$on("speciesOptionsChange",function (event, value) {
3939
scope.fqsOfSpeciesOptions = [];
4040
/*
41-
spatially-valid = geospatial_kosher:true
42-
spatially-suspect = geospatial_kosher:false
43-
spatially-unknown = -geospatial_kosher:*
41+
spatially-valid = spatiallyValid:true
42+
spatially-suspect = spatiallyValid:false
43+
spatially-unknown = -spatiallyValid:*
4444
4545
If we want include VALID and MISSING(UNKNOWN) spatial data
46-
fq=(geospatial_kosher:true OR -geospatial_kosher:*) BS(solr) does not support '-' in complicated query
46+
fq=(spatiallyValid:true OR -spatiallyValid:*) BS(solr) does not support '-' in complicated query
4747
*/
4848

4949
if (value.spatiallyUnknown) { //include UNKNOWN (MISSING) spatial data records
@@ -53,20 +53,20 @@
5353
} else if (value.spatiallyValid) {
5454
//spatially-unknown && spatiallyValid
5555
//-> rule out of spatiallySuspect
56-
scope.fqsOfSpeciesOptions.push('-geospatial_kosher:false');
56+
scope.fqsOfSpeciesOptions.push('-spatiallyValid:false');
5757
}else if (value.spatiallySuspect) {
5858
//spatially-unknown && spatiallySuspect
5959
//-> rule out of spatiallyValid
60-
scope.fqsOfSpeciesOptions.push('-geospatial_kosher:true');
60+
scope.fqsOfSpeciesOptions.push('-spatiallyValid:true');
6161
}
6262
} else {
6363
//spatially-valid and spatially-suspect
6464
if (value.spatiallyValid && value.spatiallySuspect) {
65-
scope.fqsOfSpeciesOptions.push('geospatial_kosher:*');
65+
scope.fqsOfSpeciesOptions.push('spatiallyValid:*');
6666
} else if (value.spatiallyValid) {
67-
scope.fqsOfSpeciesOptions.push('geospatial_kosher:true');
67+
scope.fqsOfSpeciesOptions.push('spatiallyValid:true');
6868
} else if (value.spatiallySuspect) {
69-
scope.fqsOfSpeciesOptions.push('geospatial_kosher:false');
69+
scope.fqsOfSpeciesOptions.push('spatiallyValid:false');
7070
}
7171
}
7272

@@ -413,4 +413,4 @@
413413
}
414414
}
415415
}])
416-
}(angular));
416+
}(angular));

grails-app/assets/javascripts/spApp/directive/selectSpecies.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@
236236
if (pos >= 0) query.q.splice(pos, 1)
237237
}
238238
/*
239-
spatially-valid = geospatial_kosher:true
240-
spatially-suspect = geospatial_kosher:false
241-
spatially-unknown = -geospatial_kosher:*
239+
spatially-valid = spatiallyValid:true
240+
spatially-suspect = spatiallyValid:false
241+
spatially-unknown = -spatiallyValid:*
242242
243243
If we want include VALID and MISSING(UNKNOWN) spatial data
244-
fq=(geospatial_kosher:true OR -geospatial_kosher:*) BS(solr) does not support '-' in complicated query
244+
fq=(spatiallyValid:true OR -spatiallyValid:*) BS(solr) does not support '-' in complicated query
245245
*/
246246
var gs = ["-*:*"]; // select nothing
247247
if (scope.spatiallyUnknown) { //include UNKNOWN (MISSING) spatial data records
@@ -251,23 +251,23 @@
251251
} else if (scope.spatiallyValid) {
252252
// spatially-unknown && spatiallyValid
253253
// Solution -> rule out of spatiallySuspect
254-
gs = ['-geospatial_kosher:false'];
254+
gs = ['-spatiallyValid:false'];
255255
} else if (scope.spatiallySuspect) {
256256
// spatially-unknown && spatiallySuspect
257257
// -> rule out of spatiallyValid
258-
gs = ['-geospatial_kosher:true'];
258+
gs = ['-spatiallyValid:true'];
259259
} else {
260260
//return records without spatial
261-
gs = ['-geospatial_kosher:*'];
261+
gs = ['-spatiallyValid:*'];
262262
}
263263
} else {
264264
//spatially-valid and spatially-suspect
265265
if (scope.spatiallyValid && scope.spatiallySuspect) {
266-
gs = ['geospatial_kosher:*'];
266+
gs = ['spatiallyValid:*'];
267267
} else if (scope.spatiallyValid){
268-
gs = ['geospatial_kosher:true'];
268+
gs = ['spatiallyValid:true'];
269269
} else if (scope.spatiallySuspect){
270-
gs = ['geospatial_kosher:false'];
270+
gs = ['spatiallyValid:false'];
271271
} else {
272272
// No records returned by default
273273
}
@@ -490,4 +490,4 @@
490490
}
491491

492492
}])
493-
}(angular));
493+
}(angular));

grails-app/assets/javascripts/spApp/service/biocacheService.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* "ws": "https://biocache.ala.org.au"
3939
* }
4040
* - fqs
41-
* ["geospatial_kosher:true"]
41+
* ["spatiallyValid:true"]
4242
*
4343
* Ouput:
4444
* 10
@@ -74,7 +74,7 @@
7474
* "ws": "https://biocache.ala.org.au"
7575
* }
7676
* - fqs
77-
* ["geospatial_kosher:true"]
77+
* ["spatiallyValid:true"]
7878
*
7979
* Ouput:
8080
* 2
@@ -115,7 +115,7 @@
115115
* "ws": "https://biocache.ala.org.au"
116116
* }
117117
* - fqs
118-
* ["geospatial_kosher:true"]
118+
* ["spatiallyValid:true"]
119119
* - config
120120
* Ouput:
121121
* "names_and_lsid","Species Name","Scientific Name Authorship","Taxon Rank","Kingdom","Phylum","Class","Order","Family","Genus","Vernacular Name","Number of records","Conservation","Invasive"
@@ -148,10 +148,10 @@
148148
* "ws": "https://biocache.ala.org.au"
149149
* }
150150
* - fqs
151-
* ["geospatial_kosher:true"]
151+
* ["spatiallyValid:true"]
152152
*
153153
* Output:
154-
* "https://biocache-ws.ala.org.au/ws/occurrences/facets/download?facets=names_and_lsid&lookup=true&count=true&lists=true&q=Macropus&fq=geospatial_kosher:true"
154+
* "https://biocache-ws.ala.org.au/ws/occurrences/facets/download?facets=names_and_lsid&lookup=true&count=true&lists=true&q=Macropus&fq=spatiallyValid:true"
155155
*/
156156
speciesListUrl: function (query, fqs) {
157157
var fqList = (fqs === undefined ? '' : '&fq=' + this.joinAndEncode(fqs));
@@ -178,7 +178,7 @@
178178
* "ws": "https://biocache.ala.org.au"
179179
* }
180180
* - fqs
181-
* ["geospatial_kosher:true"]
181+
* ["spatiallyValid:true"]
182182
*
183183
* Output:
184184
* ```
@@ -213,7 +213,7 @@
213213
* "ws": "https://biocache.ala.org.au"
214214
* }
215215
* - fqs
216-
* ["geospatial_kosher:true"]
216+
* ["spatiallyValid:true"]
217217
*
218218
* Output:
219219
* "http://biocache.ala.org.au/ws/explore/endemic/species/1234.csv?facets=names_and_lsid&lookup=true&count=true&lists=true"
@@ -251,7 +251,7 @@
251251
* "ws": "https://biocache.ala.org.au"
252252
* }
253253
* - fqs
254-
* ["geospatial_kosher:true"]
254+
* ["spatiallyValid:true"]
255255
*
256256
* Output:
257257
* []
@@ -284,7 +284,7 @@
284284
* "ws": "https://biocache.ala.org.au"
285285
* }
286286
* - fqs
287-
* ["geospatial_kosher:true"]
287+
* ["spatiallyValid:true"]
288288
*
289289
* Output:
290290
* 500
@@ -322,7 +322,7 @@
322322
* "ws": "https://biocache.ala.org.au"
323323
* }
324324
* - fqs
325-
* ["geospatial_kosher:true"]
325+
* ["spatiallyValid:true"]
326326
*
327327
* Output:
328328
* "<span>Macropus</span>"
@@ -364,10 +364,10 @@
364364
* "ws": "https://biocache.ala.org.au"
365365
* }
366366
* - fqs
367-
* ["geospatial_kosher:true"]
367+
* ["spatiallyValid:true"]
368368
*
369369
* Output:
370-
* "http://biocache-ws.ala.org.au/ws/occurrences/search?q=Macropus&fq=geospatial_kosher:true&pageSize=1&offset=0&facet=false"
370+
* "http://biocache-ws.ala.org.au/ws/occurrences/search?q=Macropus&fq=spatiallyValid:true&pageSize=1&offset=0&facet=false"
371371
*/
372372
constructSearchResultUrl: function (query, fqs, pageSize, offset, facet) {
373373
facet = facet || false;

grails-app/assets/javascripts/spApp/service/toolAddFacetService.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
var q = facet;
5353
if (speciesOptions.spatiallyUnknown) {
5454
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) { /* do nothing */
55-
} else if (speciesOptions.spatiallyValid) q.push('-geospatial_kosher:false');
56-
else if (speciesOptions.spatiallySuspect) q.push('-geospatial_kosher:true');
55+
} else if (speciesOptions.spatiallyValid) q.push('-spatiallyValid:false');
56+
else if (speciesOptions.spatiallySuspect) q.push('-spatiallyValid:true');
5757
} else {
58-
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) q.push('geospatial_kosher:*');
59-
else if (speciesOptions.spatiallyValid) q.push('geospatial_kosher:true');
60-
else if (speciesOptions.spatiallySuspect) q.push('geospatial_kosher:false');
58+
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) q.push('spatiallyValid:*');
59+
else if (speciesOptions.spatiallyValid) q.push('spatiallyValid:true');
60+
else if (speciesOptions.spatiallySuspect) q.push('spatiallyValid:false');
6161
}
6262

6363
if (!speciesOptions.includeAbsences) {

grails-app/assets/javascripts/spApp/service/toolExportChecklistService.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@
6565

6666
if (speciesOptions.spatiallyUnknown) {
6767
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) { /* do nothing */
68-
} else if (speciesOptions.spatiallyValid) q.push('-geospatial_kosher:false');
69-
else if (speciesOptions.spatiallySuspect) q.push('-geospatial_kosher:true');
68+
} else if (speciesOptions.spatiallyValid) q.push('-spatiallyValid:false');
69+
else if (speciesOptions.spatiallySuspect) q.push('-spatiallyValid:true');
7070
} else {
71-
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) q.push('geospatial_kosher:*');
72-
else if (speciesOptions.spatiallyValid) q.push('geospatial_kosher:true');
73-
else if (speciesOptions.spatiallySuspect) q.push('geospatial_kosher:false');
71+
if (speciesOptions.spatiallyValid && speciesOptions.spatiallySuspect) q.push('spatiallyValid:*');
72+
else if (speciesOptions.spatiallyValid) q.push('spatiallyValid:true');
73+
else if (speciesOptions.spatiallySuspect) q.push('spatiallyValid:false');
7474
}
7575

7676
if (!speciesOptions.includeAbsences) {

grails-app/assets/javascripts/spApp/service/urlParamsService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* - ```qname```: display name for the 'q' layer. e.g. ```qname=My URL layer```
3333
* - ```q```: biocache-service q term for occurrences layer to add. e.g. ```q=state:Queensland```
3434
* - ```species_lsid```: LSID for occurrences layer to add. e.g. ```species_lsid=urn:lsid:biodiversity.org.au:afd.taxon:e6aff6af-ff36-4ad5-95f2-2dfdcca8caff```
35-
* - ```fq```: biocache-service fq term for occurrences layer to add. e.g. ```fq=geospatial_kosher:true```
35+
* - ```fq```: biocache-service fq term for occurrences layer to add. e.g. ```fq=spatiallyValid:true```
3636
* - ```qc```: biocache-service fq term for occurrences layer to add. e.g. ```qc=data_hub_uid:dh1```
3737
* - ```qualityProfile```: biocache-service qualityProfile param for data quality profile to apply
3838
* - ```disableAllQualityFilters```: biocache-service disableAllQualityFilters param to disable all data quality filters on this request

0 commit comments

Comments
 (0)