File tree 6 files changed +12
-7
lines changed
domain/au/org/ala/ecodata
services/au/org/ala/ecodata
src/main/groovy/au/org/ala/ecodata
6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,8 @@ app {
501
501
if (! ala. baseURL) {
502
502
ala. baseURL = " https://www.ala.org.au"
503
503
}
504
- bie. ws. url = " https://www. bie.ala.org.au/ws "
505
- bie. url = " https://www. bie.ala.org.au"
504
+ bie. ws. url = " https://bie-ws .ala.org.au/"
505
+ bie. url = " https://bie.ala.org.au/ "
506
506
507
507
if (! collectory. baseURL) {
508
508
// collectory.baseURL = "https://collectory-dev.ala.org.au/"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import org.bson.types.ObjectId
6
6
7
7
class Record {
8
8
// def grailsApplication
9
+ /* * Represents a species guid that was unable to be matched against the ALA names list */
10
+ static final String UNMATCHED_GUID = " A_GUID"
9
11
10
12
static mapping = {
11
13
occurrenceID index : true
Original file line number Diff line number Diff line change @@ -2052,7 +2052,7 @@ class ParatooService {
2052
2052
}
2053
2053
2054
2054
// record is only created if guid is present
2055
- result. guid = result. guid ?: " A_GUID "
2055
+ result. guid = result. guid ?: Record . UNMATCHED_GUID
2056
2056
result
2057
2057
}
2058
2058
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class SpeciesReMatchService {
85
85
name = name?. toLowerCase() ?: " "
86
86
cacheService. get(' bie-search-auto-' + name, {
87
87
def encodedQuery = URLEncoder . encode(name ?: ' ' , " UTF-8" )
88
- def url = " ${ grailsApplication.config.getProperty('bie.url')} ws/search/auto.jsonp?q=${ encodedQuery} &limit=${ limit} &idxType=TAXON"
88
+ def url = " ${ grailsApplication.config.getProperty('bie.ws. url')} ws/search/auto.jsonp?q=${ encodedQuery} &limit=${ limit} &idxType=TAXON"
89
89
90
90
webService. getJson(url)
91
91
})
Original file line number Diff line number Diff line change 1
1
package au.org.ala.ecodata.metadata
2
2
3
3
import pl.touk.excel.export.getters.Getter
4
+ import au.org.ala.ecodata.Record
4
5
5
6
class SpeciesUrlGetter extends OutputDataGetter implements Getter<String > {
6
7
String biePrefix
@@ -15,8 +16,10 @@ class SpeciesUrlGetter extends OutputDataGetter implements Getter<String> {
15
16
if (! val?. name) {
16
17
return " "
17
18
}
18
-
19
- return val?. guid ? biePrefix+ val. guid : " Unmatched name"
19
+ if (! val?. guid || val. guid == Record . UNMATCHED_GUID ) {
20
+ return " Unmatched name"
21
+ }
22
+ return biePrefix+ val. guid
20
23
}
21
24
22
25
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class TabbedExporter {
27
27
ReportingService reportingService = Holders . grailsApplication. mainContext. getBean(" reportingService" )
28
28
ActivityFormService activityFormService = Holders . grailsApplication. mainContext. getBean(" activityFormService" )
29
29
OutputModelProcessor processor = new OutputModelProcessor ()
30
- String biePrefix = Holders . grailsApplication. config. getProperty(" bie.url" )+ ' / species/'
30
+ String biePrefix = Holders . grailsApplication. config. getProperty(" bie.url" )+ ' species/'
31
31
32
32
static String DATE_CELL_FORMAT = " dd/MM/yyyy"
33
33
Map<String , AdditionalSheet > sheets
You can’t perform that action at this time.
0 commit comments