From d33035e7667c84523e46963112ca51ebadfad7eb Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Wed, 12 Jul 2023 12:20:15 +1000 Subject: [PATCH 1/7] 3.2.2-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 30bb113cf..0c9f2744d 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ repositories { } group = 'au.org.ala' -version = '3.2.1-SNAPSHOT' +version = '3.2.2-SNAPSHOT' boolean inplace = false From d0efbd82006aabc71b840bc6a3519239198df667 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Thu, 13 Jul 2023 10:36:15 +1000 Subject: [PATCH 2/7] travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad22804dc..b44d16d7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,8 @@ cache: before_install: - export TZ=Australia/Canberra after_success: - - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ./gradlew clean && travis_retry ./gradlew publish' + - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ./gradlew clean' + - ./gradlew publish - ./gradlew coveralls #after_success: # - mvn coveralls:report From 4aa74e185b80fb4b3b1dea063e15de2b60f0078d Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Mon, 17 Jul 2023 14:55:58 +1000 Subject: [PATCH 3/7] Fix double quote escaping with faceting --- .../java/au/org/ala/biocache/dao/SolrIndexDAOImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/au/org/ala/biocache/dao/SolrIndexDAOImpl.java b/src/main/java/au/org/ala/biocache/dao/SolrIndexDAOImpl.java index b87b1a177..ef3e5a214 100644 --- a/src/main/java/au/org/ala/biocache/dao/SolrIndexDAOImpl.java +++ b/src/main/java/au/org/ala/biocache/dao/SolrIndexDAOImpl.java @@ -28,10 +28,7 @@ import org.apache.solr.client.solrj.impl.*; import org.apache.solr.client.solrj.io.SolrClientCache; import org.apache.solr.client.solrj.io.Tuple; -import org.apache.solr.client.solrj.io.stream.AlaCloudSolrStream; -import org.apache.solr.client.solrj.io.stream.SolrStream; -import org.apache.solr.client.solrj.io.stream.StreamContext; -import org.apache.solr.client.solrj.io.stream.TupleStream; +import org.apache.solr.client.solrj.io.stream.*; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.client.solrj.request.schema.SchemaRequest; import org.apache.solr.client.solrj.response.FieldStatsInfo; @@ -1308,6 +1305,6 @@ private ModifiableSolrParams buildEndemicExpr(SolrQuery subset, SolrQuery supers } private String escapeDoubleQuote(String input) { - return input.replaceAll("\"", "\\\""); + return input.replaceAll("\"", "\\\\\""); } } From fa07c8030ef20712935ced47447aa0aafc8e4db0 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Wed, 23 Aug 2023 14:08:24 +1000 Subject: [PATCH 4/7] add JSON support for occurrences/offline/download --- .../ala/biocache/service/DownloadService.java | 10 +-- .../ala/biocache/web/DownloadController.java | 72 +++++++++++++++++-- 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/src/main/java/au/org/ala/biocache/service/DownloadService.java b/src/main/java/au/org/ala/biocache/service/DownloadService.java index 4396eba87..bc3745489 100644 --- a/src/main/java/au/org/ala/biocache/service/DownloadService.java +++ b/src/main/java/au/org/ala/biocache/service/DownloadService.java @@ -1125,6 +1125,9 @@ public String generateEmailContent(String template, Map substitu public void cancel(DownloadDetailsDTO dd) throws InterruptedException { + // remove from persistent queue (disk) + persistentQueueDAO.remove(dd); + // signal download to end dd.setInterrupt(true); @@ -1134,9 +1137,6 @@ public void cancel(DownloadDetailsDTO dd) throws InterruptedException { // get executor for this user ThreadPoolExecutor ex = userExecutors.get(getUserId(dd)); if (ex != null) { - // remove from persistent queue (disk) - persistentQueueDAO.remove(dd); - // remove from executor queue for (Runnable r : ex.getQueue()) { if (((DownloadRunnable) r).currentDownload.getUniqueId().equals(dd.getUniqueId())) { @@ -1305,6 +1305,7 @@ public void run() { } } } + persistentQueueDAO.remove(currentDownload); } catch (InterruptedException e) { Thread.currentThread().interrupt(); //shutting down @@ -1340,8 +1341,9 @@ public void run() { + currentDownload.getFileLocation(), ex); } - // If we ever want to retry on failure, enable this + // If we ever want to retry on failure, enable doRetry and disable queue.remove //doRetry = true + persistentQueueDAO.remove(currentDownload); } finally { // in case of server up/down, only remove from queue // after emails are sent diff --git a/src/main/java/au/org/ala/biocache/web/DownloadController.java b/src/main/java/au/org/ala/biocache/web/DownloadController.java index 029f7d0cd..7bcf7bb9f 100644 --- a/src/main/java/au/org/ala/biocache/web/DownloadController.java +++ b/src/main/java/au/org/ala/biocache/web/DownloadController.java @@ -16,23 +16,28 @@ import au.org.ala.biocache.dao.PersistentQueueDAO; import au.org.ala.biocache.dao.SearchDAO; -import au.org.ala.biocache.dto.DownloadDetailsDTO; -import au.org.ala.biocache.dto.DownloadRequestDTO; -import au.org.ala.biocache.dto.DownloadRequestParams; -import au.org.ala.biocache.dto.DownloadStatusDTO; +import au.org.ala.biocache.dto.*; import au.org.ala.biocache.service.AuthService; import au.org.ala.biocache.service.DownloadService; import au.org.ala.ws.security.profile.AlaUserProfile; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; +import org.apache.http.entity.ContentType; import org.apache.log4j.Logger; import org.apache.solr.common.SolrDocumentList; import org.springdoc.api.annotations.ParameterObject; @@ -40,6 +45,7 @@ import org.springframework.http.MediaType; import org.springframework.security.access.annotation.Secured; import org.springframework.stereotype.Controller; +import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.*; import javax.inject.Inject; @@ -111,15 +117,69 @@ public class DownloadController extends AbstractSecureController { * @throws Exception */ @Operation(summary = "Asynchronous occurrence download", tags = "Download") + @Parameters(value = { + // DownloadRequestParams + @Parameter(name="email", description = "The email address to sent the download email once complete.", in = ParameterIn.QUERY, required = true), + @Parameter(name="reason", description = "Reason for download.", in = ParameterIn.QUERY), + @Parameter(name="file", description = "Download File name.", in = ParameterIn.QUERY), + @Parameter(name="fields", description = "Fields to download.", in = ParameterIn.QUERY, required = true), + @Parameter(name="extra", description = "CSV list of extra fields to be added to the download.", in = ParameterIn.QUERY), + @Parameter(name="qa", description = "the CSV list of issue types to include in the download, defaults to 'all'. Also supports 'none'", in = ParameterIn.QUERY), + @Parameter(name="sep", description = "Field delimiter for fileType='csv', defaults to ','", in = ParameterIn.QUERY, schema = @Schema(type = "char", allowableValues = {",", "\t"})), + @Parameter(name="esc", description = "Field escape for fileType='csv', defaults to '\"'", schema = @Schema(type = "char", defaultValue = "\""), in = ParameterIn.QUERY), + @Parameter(name="dwcHeaders", description = "Use darwin core headers, defaults to false", schema = @Schema(type = "boolean", defaultValue = "false"), in = ParameterIn.QUERY), + @Parameter(name="includeMisc", description = "Include miscellaneous properties, defaults to false", schema = @Schema(type = "boolean", defaultValue = "false"), in = ParameterIn.QUERY), + @Parameter(name="reasonTypeId", description = "Logger reason ID See https://logger.ala.org.au/service/logger/reasons", required = true, schema = @Schema(type = "string", defaultValue = "10"), in = ParameterIn.QUERY), + @Parameter(name="sourceTypeId", description = "Source ID See https://logger.ala.org.au/service/logger/sources", schema = @Schema(type = "string", defaultValue = "0"), in = ParameterIn.QUERY), + @Parameter(name="fileType", description = "File type. CSV or TSV. Defaults to CSV", schema = @Schema(type = "string", allowableValues = {"csv", "tsv"}), in = ParameterIn.QUERY), + @Parameter(name="customHeader", description = "Override header names with a CSV with 'requested field','header' pairs", in = ParameterIn.QUERY), + @Parameter(name="mintDoi", description = "Request to generate a DOI for the download or not. Default false", schema = @Schema(type = "boolean", defaultValue = "false"), in = ParameterIn.QUERY), + @Parameter(name="emailNotify", description = "Send notification email. Default true", schema = @Schema(type = "boolean", defaultValue = "true"), in = ParameterIn.QUERY), + + // SpatialSearchRequestParams (download specific only) + @Parameter(name="q", description = "Main search query. Examples 'q=Kangaroo' or 'q=vernacularName:red'", in = ParameterIn.QUERY), + @Parameter(name="fq", description = "Filter queries. Examples 'fq=state:Victoria&fq=state:Queensland", array = @ArraySchema(schema = @Schema(type = "string")), in = ParameterIn.QUERY), + @Parameter(name="qId", description = "Query ID for persisted queries", in = ParameterIn.QUERY), +// @Parameter(name="pageSize", description = "The prefix to limit returned values for previewing results. Use a value < 10, e.g. 5", in = ParameterIn.QUERY), + @Parameter(name="qc", description = "The query context to be used for the search. This will be used to generate extra query filters.", in = ParameterIn.QUERY), + + @Parameter(name="qualityProfile", description = "The quality profile to use, null for default", in = ParameterIn.QUERY), + @Parameter(name="disableAllQualityFilters", description = "Disable all default filters", in = ParameterIn.QUERY), + @Parameter(name="disableQualityFilter", description = "Default filters to disable (currently can only disable on category, so it's a list of disabled category name)", array = @ArraySchema(schema = @Schema(type = "string")), in = ParameterIn.QUERY), + + @Parameter(name="radius", description = "Radius for a spatial search. Use together with lat and lon.", schema = @Schema(type = "float"), in = ParameterIn.QUERY), + @Parameter(name="lat", description = "Decimal latitude for the spatial search. Use together with radius and lon.", schema = @Schema(type = "float"), in = ParameterIn.QUERY), + @Parameter(name="lon", description = "Decimal longitude for the spatial search. Use together with radius and lat.", schema = @Schema(type = "float"), in = ParameterIn.QUERY), + + @Parameter(name="wkt", description = "Well Known Text for the spatial search. Large WKT will be simplified.", in = ParameterIn.QUERY) + } ) + @RequestBody( + description = "parameters in the body as application/x-www-form-urlencoded or a JSON object", + content = { + @Content( + mediaType = "application/json"), + @Content( + mediaType = "application/x-www-form-urlencoded") + }) @Tag(name ="Download", description = "Services for downloading occurrences and specimen data") @RequestMapping(value = { "occurrences/offline/download"}, method = {RequestMethod.GET, RequestMethod.POST}) public @ResponseBody DownloadStatusDTO occurrenceDownload( - @Valid @ParameterObject DownloadRequestParams requestParams, + @Valid @Parameter(hidden = true) DownloadRequestParams requestParams, @Parameter(description = "Original IP making the request") @RequestParam(value = "ip", required = false) String ip, HttpServletRequest request, HttpServletResponse response) throws Exception { - DownloadRequestDTO downloadRequestDTO = DownloadRequestDTO.create(requestParams, request); + DownloadRequestDTO downloadRequestDTO; + if (request.getContentType() != null && request.getContentType().toLowerCase().contains("application/json")) { + ObjectMapper om = new ObjectMapper(); + om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + String input = StreamUtils.copyToString(request.getInputStream(), StandardCharsets.UTF_8); + DownloadRequestParams jsonParams = om.readValue(input, DownloadRequestParams.class); + + downloadRequestDTO = DownloadRequestDTO.create(jsonParams, request); + } else { + downloadRequestDTO = DownloadRequestDTO.create(requestParams, request); + } Optional downloadUser = authService.getDownloadUser(downloadRequestDTO, request); if (!downloadUser.isPresent()){ From 0b8420913cbdcb67fe99977a1e93128961116575 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Fri, 29 Sep 2023 12:32:43 +1000 Subject: [PATCH 5/7] add missing SpatialSearchRequestParams DTO wrapping in controllers --- .../au/org/ala/biocache/web/MapController.java | 17 +++++++++++------ .../ala/biocache/web/OccurrenceController.java | 15 +++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/main/java/au/org/ala/biocache/web/MapController.java b/src/main/java/au/org/ala/biocache/web/MapController.java index 01bc854fd..3a9ab5f2e 100644 --- a/src/main/java/au/org/ala/biocache/web/MapController.java +++ b/src/main/java/au/org/ala/biocache/web/MapController.java @@ -140,11 +140,12 @@ public void pointsWmsImage(@ParameterObject SpatialSearchRequestParams requestPa */ @Operation(summary = "Occurrence info summary service for JS map popups.", tags = {"Mapping"}) @RequestMapping(value = {"/occurrences/info" }, method = RequestMethod.GET, produces = "application/json") - public String getOccurrencesInformation(SpatialSearchRequestDTO requestParams, + public String getOccurrencesInformation(SpatialSearchRequestParams requestParams, @RequestParam(value = "callback", required = false) String callback, Model model, HttpServletResponse response) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); if (requestParams.getLon() == null) { response.sendError(400, "Required Double parameter 'lon' is not present"); @@ -170,7 +171,7 @@ public String getOccurrencesInformation(SpatialSearchRequestDTO requestParams, response.setContentType("application/json"); } - SolrDocumentList sdl = searchDAO.findByFulltext(requestParams); + SolrDocumentList sdl = searchDAO.findByFulltext(dto); List points = new ArrayList(); if (sdl != null) { @@ -245,7 +246,7 @@ private void streamImage(BufferedImage img, HttpServletResponse response) throws @Operation(summary = "Renders a density map for a species.", tags = {"Mapping"}) @RequestMapping(value = {"/density/map", "/occurrences/static"}, method = RequestMethod.GET) public @ResponseBody - void speciesDensityMap(SpatialSearchRequestDTO requestParams, + void speciesDensityMap(SpatialSearchRequestParams requestParams, @RequestParam(value = "forceRefresh", required = false, defaultValue = "false") boolean forceRefresh, @RequestParam(value = "forcePointsDisplay", required = false, defaultValue = "false") boolean forcePointsDisplay, @RequestParam(value = "pointColour", required = false, defaultValue = "0000ff") String pointColour, @@ -256,6 +257,8 @@ void speciesDensityMap(SpatialSearchRequestDTO requestParams, HttpServletRequest request, HttpServletResponse response) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); + File outputDir = new File(heatmapOutputDir); if (!outputDir.exists()) { FileUtils.forceMkdir(outputDir); @@ -285,7 +288,7 @@ void speciesDensityMap(SpatialSearchRequestDTO requestParams, if (!f.isFile() || !f.exists() || forceRefresh) { logger.debug("Regenerating heatmap image"); //If not, generate - generateStaticHeatmapImages(requestParams, false, forcePointsDisplay, pointHeatMapThreshold, pointColour, facetValues, facetColours, opacity, request); + generateStaticHeatmapImages(dto, false, forcePointsDisplay, pointHeatMapThreshold, pointColour, facetValues, facetColours, opacity, request); } else { logger.debug("Heatmap file already exists on disk, sending file back to user"); } @@ -324,12 +327,14 @@ private String getQueryHash(HttpServletRequest request) throws NoSuchAlgorithmEx */ @Operation(summary = "Renders a density map legend for a species.", tags = {"Mapping"}) @RequestMapping(value = "/density/legend", method = RequestMethod.GET) - public @ResponseBody void speciesDensityLegend(SpatialSearchRequestDTO requestParams, + public @ResponseBody void speciesDensityLegend(SpatialSearchRequestParams requestParams, @RequestParam(value = "forceRefresh", required = false, defaultValue = "false") boolean forceRefresh, @RequestParam(value = "pointHeatMapThreshold", required = false, defaultValue = "500") Integer pointHeatMapThreshold, HttpServletRequest request, HttpServletResponse response) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); + File baseDir = new File(heatmapOutputDir); String outputHMFile = getOutputFile(request); @@ -340,7 +345,7 @@ private String getQueryHash(HttpServletRequest request) throws NoSuchAlgorithmEx if (!f.isFile() || !f.exists() || forceRefresh) { //If not, generate logger.debug("regenerating heatmap legend"); - generateStaticHeatmapImages(requestParams, true, false, pointHeatMapThreshold, "0000ff", null, null, 1.0f, request); + generateStaticHeatmapImages(dto, true, false, pointHeatMapThreshold, "0000ff", null, null, 1.0f, request); } else { logger.debug("legend file already exists on disk, sending file back to user"); } diff --git a/src/main/java/au/org/ala/biocache/web/OccurrenceController.java b/src/main/java/au/org/ala/biocache/web/OccurrenceController.java index 33fce9304..87661fdcc 100644 --- a/src/main/java/au/org/ala/biocache/web/OccurrenceController.java +++ b/src/main/java/au/org/ala/biocache/web/OccurrenceController.java @@ -754,11 +754,12 @@ SearchResultDTO occurrenceSearchByTaxon( @RequestMapping(value = "/occurrences/taxon/source/**", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Deprecated public @ResponseBody - List sourceByTaxon(SpatialSearchRequestDTO requestParams, + List sourceByTaxon(SpatialSearchRequestParams requestParams, HttpServletRequest request) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); String guid = searchUtils.getGuidFromPath(request); requestParams.setQ("taxonConceptID:" + guid); - Map sources = searchDAO.getSourcesForQuery(requestParams); + Map sources = searchDAO.getSourcesForQuery(dto); return searchUtils.getSourceInformation(sources); } @@ -1278,7 +1279,8 @@ private Double distInMetres(Double lat1, Double lon1, Double lat2, Double lon2) @RequestMapping(value = {"/occurrences/nearest", "/occurrences/nearest.json" }, method = RequestMethod.GET) @Deprecated public @ResponseBody - Map nearestOccurrence(SpatialSearchRequestDTO requestParams) throws Exception { + Map nearestOccurrence(SpatialSearchRequestParams requestParams) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); logger.debug(String.format("Received lat: %f, lon:%f, radius:%f", requestParams.getLat(), requestParams.getLon(), requestParams.getRadius())); @@ -1289,7 +1291,7 @@ Map nearestOccurrence(SpatialSearchRequestDTO requestParams) thr requestParams.setDir("asc"); requestParams.setFacet(false); - SearchResultDTO searchResult = searchDAO.findByFulltextSpatialQuery(requestParams, false, null); + SearchResultDTO searchResult = searchDAO.findByFulltextSpatialQuery(dto, false, null); List ocs = searchResult.getOccurrences(); if (!ocs.isEmpty()) { @@ -1316,14 +1318,15 @@ Map nearestOccurrence(SpatialSearchRequestDTO requestParams) thr @RequestMapping(value = { "/occurrences/coordinates" }, method = {RequestMethod.GET, RequestMethod.POST}) - public void dumpDistinctLatLongs(SpatialSearchRequestDTO requestParams, HttpServletResponse response) throws Exception { + public void dumpDistinctLatLongs(SpatialSearchRequestParams requestParams, HttpServletResponse response) throws Exception { + SpatialSearchRequestDTO dto = SpatialSearchRequestDTO.create(requestParams); requestParams.setFacets(new String[]{OccurrenceIndex.LAT_LNG}); requestParams.setFacet(true); if (requestParams.getQ().length() < 1) requestParams.setQ("*:*"); try { ServletOutputStream out = response.getOutputStream(); - searchDAO.writeCoordinatesToStream(requestParams, out); + searchDAO.writeCoordinatesToStream(dto, out); } catch (Exception e) { logger.error(e.getMessage(), e); } From 0f2e06a20d51ff3e160541a6957597c8d1e85652 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Tue, 10 Oct 2023 13:10:15 +1000 Subject: [PATCH 6/7] add dynamic search field spatialObject --- .../ala/biocache/dto/SpatialObjectDTO.java | 85 +++++++++++++++++++ .../biocache/service/AlaLayersService.java | 26 ++++++ .../ala/biocache/service/LayersService.java | 8 +- .../ala/biocache/util/QueryFormatUtils.java | 66 ++++++++++++++ src/main/resources/spring.xml | 4 +- src/main/webapp/WEB-INF/ehcache.xml | 4 +- 6 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 src/main/java/au/org/ala/biocache/dto/SpatialObjectDTO.java diff --git a/src/main/java/au/org/ala/biocache/dto/SpatialObjectDTO.java b/src/main/java/au/org/ala/biocache/dto/SpatialObjectDTO.java new file mode 100644 index 000000000..fce0e0669 --- /dev/null +++ b/src/main/java/au/org/ala/biocache/dto/SpatialObjectDTO.java @@ -0,0 +1,85 @@ +package au.org.ala.biocache.dto; + +public class SpatialObjectDTO { + Double area_km; + String bbox; + String name; + String description; + String fieldname; + String pid; + String id; + String fid; + String wmsurl; + + public Double getArea_km() { + return area_km; + } + + public void setArea_km(Double area_km) { + this.area_km = area_km; + } + + public String getBbox() { + return bbox; + } + + public void setBbox(String bbox) { + this.bbox = bbox; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFieldname() { + return fieldname; + } + + public void setFieldname(String fieldname) { + this.fieldname = fieldname; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFid() { + return fid; + } + + public void setFid(String fid) { + this.fid = fid; + } + + public String getWmsurl() { + return wmsurl; + } + + public void setWmsurl(String wmsurl) { + this.wmsurl = wmsurl; + } +} diff --git a/src/main/java/au/org/ala/biocache/service/AlaLayersService.java b/src/main/java/au/org/ala/biocache/service/AlaLayersService.java index 8a54d0cc1..3e244ee41 100644 --- a/src/main/java/au/org/ala/biocache/service/AlaLayersService.java +++ b/src/main/java/au/org/ala/biocache/service/AlaLayersService.java @@ -14,19 +14,25 @@ ***************************************************************************/ package au.org.ala.biocache.service; +import au.org.ala.biocache.dto.SpatialObjectDTO; import com.fasterxml.jackson.core.type.TypeReference; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.Cacheable; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import org.springframework.util.StreamUtils; import org.springframework.web.client.RestOperations; import javax.annotation.PostConstruct; import javax.inject.Inject; import java.io.Reader; +import java.net.URL; +import java.net.URLConnection; import java.net.URLEncoder; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -244,4 +250,24 @@ public Reader sample(String[] analysisLayers, double[][] points, Object o) { // TODO: for on the fly intersection of layers not indexed return null; } + + @Cacheable("spatialObject") + @Override + public SpatialObjectDTO getObject(String spatialObjectId) { + String url = layersServiceUrl + "/object/" + Integer.parseInt(spatialObjectId); + return restTemplate.getForObject(url, SpatialObjectDTO.class); + } + + @Cacheable("wkt") + @Override + public String getObjectWkt(String spatialObjectId) { + String url = layersServiceUrl + "/shape/wkt/" + Integer.parseInt(spatialObjectId); + + try { + URLConnection con = new URL(url).openConnection(); + return StreamUtils.copyToString(con.getInputStream(), Charset.defaultCharset()); + } catch (Exception e) { + return null; + } + } } diff --git a/src/main/java/au/org/ala/biocache/service/LayersService.java b/src/main/java/au/org/ala/biocache/service/LayersService.java index 82fdf7f58..f190b622c 100644 --- a/src/main/java/au/org/ala/biocache/service/LayersService.java +++ b/src/main/java/au/org/ala/biocache/service/LayersService.java @@ -1,7 +1,7 @@ /************************************************************************** * Copyright (C) 2013 Atlas of Living Australia * All Rights Reserved. - * + * * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of @@ -14,6 +14,8 @@ ***************************************************************************/ package au.org.ala.biocache.service; +import au.org.ala.biocache.dto.SpatialObjectDTO; + import java.io.Reader; /** @@ -49,4 +51,8 @@ public interface LayersService { String getLayersServiceUrl(); Reader sample(String[] analysisLayers, double[][] points, Object o); + + SpatialObjectDTO getObject(String spatialObjectId); + + String getObjectWkt(String spatialObjectId); } diff --git a/src/main/java/au/org/ala/biocache/util/QueryFormatUtils.java b/src/main/java/au/org/ala/biocache/util/QueryFormatUtils.java index 7089d9441..5f7d2ea38 100644 --- a/src/main/java/au/org/ala/biocache/util/QueryFormatUtils.java +++ b/src/main/java/au/org/ala/biocache/util/QueryFormatUtils.java @@ -71,6 +71,8 @@ public class QueryFormatUtils { //Patterns that are used to prepare a SOLR query for execution protected Pattern lsidPattern = Pattern.compile("(^|\\s|\"|\\(|\\[|'|-)taxonConceptID:\"?([a-zA-Z0-9/\\.:\\-_]*)\"?"); protected Pattern speciesListPattern = Pattern.compile("(^|\\s|\"|\\(|\\[|'|-)species_list:\"?(dr[0-9]*)\"?"); + + protected Pattern spatialObjectPattern = Pattern.compile("(^|\\s|\"|\\(|\\[|'|-)spatialObject:\"?([0-9]*)\"?"); protected Pattern urnPattern = Pattern.compile("\\burn:[a-zA-Z0-9\\.:-]*"); protected Pattern httpPattern = Pattern.compile("http:[a-zA-Z0-9/\\.:\\-_]*"); protected Pattern uidPattern = Pattern.compile("(?:[\"]*)?((?:[a-z_]*_uid:)|(?:[a-zA-Z]*Uid:))(\\w*)(?:[\"]*)?"); @@ -722,6 +724,68 @@ private boolean formatSpatial(String [] current) throws QidMissingException { return false; } + /** + * Insert spatialObject WKT. + * + * If the query string contains spatialObject: replace with the equivalent geohash:Intersects(WKT) + * + * @param current + * @return + * @throws QidMissingException + */ + private void formatSpatialObject(String [] current) { + if (current == null || current.length < 2 || current[1] == null) { + return; + } + + //if the query string contains spatialObject: replace with the equivalent geohash:Intersects(WKT) + StringBuffer sb = new StringBuffer(); + Matcher m = spatialObjectPattern.matcher(current[1]); + int max = getMaxBooleanClauses(); + HashSet failedObjects = new HashSet<>(); + while (m.find()) { + String spatialObjectId = m.group(2); + String prefix = m.group(1); + try { + String wkt = layersService.getObjectWkt(spatialObjectId); + + if (wkt == null) { + throw new Exception("invalid object id"); + } + String q = prefix + spatialField + ":\"Intersects(" + wkt + ")\""; + + m.appendReplacement(sb, q); + } catch (Exception e) { + logger.error("failed to get WKT for object: " + spatialObjectId); + m.appendReplacement(sb, prefix + "(NOT *:*)"); + failedObjects.add(spatialObjectId); + } + } + m.appendTail(sb); + current[1] = sb.toString(); + + sb = new StringBuffer(); + m = spatialObjectPattern.matcher(current[0]); + while (m.find()) { + String spatialObjectId = m.group(2); + String prefix = m.group(1); + if (failedObjects.contains(spatialObjectId)) { + m.appendReplacement(sb, prefix + "" + HtmlEscapers.htmlEscaper().escape(spatialObjectId) + " (FAILED)"); + } else { + try { + SpatialObjectDTO obj = layersService.getObject(spatialObjectId); + String name = obj.getName(); + m.appendReplacement(sb, prefix + "" + HtmlEscapers.htmlEscaper().escape(name) + ""); + } catch (Exception e) { + logger.error("Couldn't get spatial object name for " + spatialObjectId, e); + m.appendReplacement(sb, prefix + "Species list"); + } + } + } + m.appendTail(sb); + current[0] = sb.toString(); + } + /** * General formatting for formattedQuery and displayString. * @@ -818,6 +882,8 @@ public String[] formatQueryTerm(String query, SpatialSearchRequestDTO searchPara formatHttp(formatted); formatTitleMap(formatted); + formatSpatialObject(formatted); + if (!formatSpatial(formatted)) { formatGeneral(formatted, searchParams); } diff --git a/src/main/resources/spring.xml b/src/main/resources/spring.xml index fc1289cc6..af952a587 100644 --- a/src/main/resources/spring.xml +++ b/src/main/resources/spring.xml @@ -75,7 +75,7 @@ - + @@ -101,4 +101,4 @@ - \ No newline at end of file + diff --git a/src/main/webapp/WEB-INF/ehcache.xml b/src/main/webapp/WEB-INF/ehcache.xml index 1e7ae65fa..c2bde01e3 100644 --- a/src/main/webapp/WEB-INF/ehcache.xml +++ b/src/main/webapp/WEB-INF/ehcache.xml @@ -5,6 +5,8 @@ + + @@ -15,4 +17,4 @@ - \ No newline at end of file + From 1041d2599947323e5648bbebfd40bfe9c59cbb63 Mon Sep 17 00:00:00 2001 From: Adam Collins Date: Wed, 25 Oct 2023 11:08:36 +1000 Subject: [PATCH 7/7] review messages.properties --- .../ala/biocache/web/DownloadController.java | 2 +- src/main/webapp/WEB-INF/messages.properties | 838 +----------------- 2 files changed, 6 insertions(+), 834 deletions(-) diff --git a/src/main/java/au/org/ala/biocache/web/DownloadController.java b/src/main/java/au/org/ala/biocache/web/DownloadController.java index 7bcf7bb9f..3cb9743b6 100644 --- a/src/main/java/au/org/ala/biocache/web/DownloadController.java +++ b/src/main/java/au/org/ala/biocache/web/DownloadController.java @@ -234,7 +234,7 @@ private DownloadStatusDTO download(DownloadRequestDTO requestParams, //identify this download as too large File file = new File(downloadService.biocacheDownloadDir + File.separator + UUID.nameUUIDFromBytes(dd.getRequestParams().getEmail().getBytes(StandardCharsets.UTF_8)) + File.separator + dd.getStartTime() + File.separator + "tooLarge"); FileUtils.forceMkdir(file.getParentFile()); - FileUtils.writeStringToFile(file, "", "UTF-8"); + FileUtils.writeStringToFile(file, requestParams.toString(), "UTF-8"); status.setDownloadUrl(downloadService.biocacheDownloadUrl); status.setStatus(DownloadStatusDTO.DownloadStatus.TOO_LARGE); status.setMessage(downloadService.downloadOfflineMsg); diff --git a/src/main/webapp/WEB-INF/messages.properties b/src/main/webapp/WEB-INF/messages.properties index ff335c24b..4bbfce156 100644 --- a/src/main/webapp/WEB-INF/messages.properties +++ b/src/main/webapp/WEB-INF/messages.properties @@ -1,5 +1,4 @@ # i18n properties -#facet.abcdTypeStatus= facet.acceptedNameUsage=Accepted name facet.acceptedNameUsageID=Accepted name facet.accessRights=Access rights @@ -7,37 +6,19 @@ facet.alreadyGeneralised=Already generalised facet.assertionUserId=Assertions by user facet.assertions=Record issues facet.annotationsUid=Referenced by publication -#facet.associatedMedia= -#facet.associatedOccurrences= -#facet.associatedOrganisms= -#facet.associatedReferences= -#facet.associatedSequences= -#facet.associatedTaxa= facet.basisOfRecord=Record type -#facet.bed= -#facet.behavior= -#facet.bibliographicCitation= -#facet.biome= -#facet.catalogNumber= -facet.cl966=IMCRA 4 Regions -facet.cl1048=IBRA 7 Regions facet.class=Class facet.classID=Class facet.collectionCode=Collection facet.collectionID=Collection facet.collectionName=Collection facet.collectionUid=Collection -facet.common_name_and_lsid= -#facet.continent= facet.coordinatePrecision=Coordinate precision facet.coordinateUncertaintyInMeters=Coordinate uncertainty (in metres) facet.contentTypes=Content types facet.country=Country facet.countryCode=Country Code facet.countryConservation=Country conservation -#facet.countryInvasive= -#facet.county= -#facet.dataGeneralizations= facet.dataHubName=Data Hub facet.dataHubUid=Data Hub facet.dataProviderName=Data provider @@ -46,224 +27,61 @@ facet.dataResourceName=Dataset facet.dataResourceUid=Dataset facet.datasetID=Dataset facet.datasetName=Dataset / Survey name -#facet.dateIdentified= facet.datePrecision=Date precision facet.day=Day facet.decade=Decade facet.decimalLatitude=Latitude facet.decimalLongitude=Longitude -#facet.defaultValuesUsed= -#facet.depth= -#facet.depthAccuracy= -#facet.disposition= -#facet.duplicateJustification= facet.duplicateStatus=Associated records facet.duplicateType=Duplicate record type -#facet.dynamicProperties= -#facet.earliestAgeOrLowestStage= -#facet.earliestEonOrLowestEonothem= -#facet.earliestEpochOrLowestSeries= -#facet.earliestEraOrLowestErathem= -#facet.earliestGeochronologicalEra= -#facet.earliestPeriodOrLowestSystem= -#facet.easting= -#facet.endDayOfYear= facet.establishmentMeans=Establishment means -#facet.eventDate= -#facet.eventDateEnd= facet.eventID=Event ID facet.parentEventID=Parent Event ID facet.fieldNumber=Field Number -facet.text_datasetName=Dataset Name -facet.text_eventID=Event ID -facet.text_parentEventID=Parent Event ID -facet.text_fieldNumber=Field Number -#facet.eventRemarks= -#facet.eventTime= facet.family=Family facet.familyID=Family -#facet.fieldNotes= -#facet.fieldNumber= facet.firstLoadedDate=Date first indexed -#facet.footprintSRS= -#facet.footprintSpatialFit= -#facet.footprintWKT= -#facet.formation= -#facet.fromLithostratigraphicUnit= -#facet.generalisationInMetres= -#facet.generalisationToApplyInMetres= facet.genus=Genus facet.genusID=Genus facet.geodeticDatum=Datum -#facet.geohash= -#facet.geologicalContextID= -#facet.georeferenceProtocol= -#facet.georeferenceRemarks= -#facet.georeferenceSources= -#facet.georeferenceVerificationStatus= -#facet.georeferencedBy= -#facet.georeferencedDate= -#facet.geospatialIssues= -#facet.group= -#facet.habitat= -#facet.hasUserAssertions= -#facet.higherClassification= -#facet.higherGeography= -#facet.higherGeographyID= -#facet.highestBiostratigraphicZone= -#facet.id= -#facet.identificationID= facet.identificationQualifier=Identification qualifier -#facet.identificationReferences= -#facet.identificationRemarks= -#facet.identificationVerificationStatus= facet.identifiedBy=Identified by facet.identifiedByID=Identified by ID -#facet.identifierRole= -#facet.imageID= -#facet.imageIDs= -#facet.inCollection= -#facet.inDataset= -#facet.inDescribedPlace= -#facet.individualCount= -#facet.informationWithheld= -#facet.infraspecificEpithet= -#facet.institutionCode= -#facet.institutionID= facet.institutionName=Institution facet.institutionUid=Institution -#facet.isDuplicateOf= -#facet.isInCluster= -#facet.isRepresentativeOf= -#facet.island= -#facet.islandGroup= facet.kingdom=Kingdom facet.kingdomID=Kingdom -#facet.label= -#facet.language= -#facet.lastAssertionDate= facet.lastLoadDate=lastLoadDate -#facet.lastProcessedDate= -#facet.lat_long= -#facet.latestAgeOrHighestStage= -#facet.latestEonOrHighestEonothem= -#facet.latestEpochOrHighestSeries= -#facet.latestEraOrHighestErathem= -#facet.latestGeochronologicalEra= -#facet.latestPeriodOrHighestSystem= -#facet.lft= facet.license=License facet.lifeStage=Life stage -#facet.lifeStageLineage= -#facet.lithostratigraphicTerms= -#facet.loanDestination= -#facet.loanIdentifier= -#facet.locality= -#facet.location= -#facet.locationAccordingTo= facet.locationID=Location ID -#facet.locationRemarks= -#facet.lowestBiostratigraphicZone= -#facet.machineTags= facet.matchType=Name match metric -#facet.matched_name= -#facet.materialSampleID= facet.maximumDepthInMeters=Maximum depth in metres -#facet.maximumDistanceAboveSurfaceInMeters= facet.maximumElevationInMeters=Max elevation -#facet.measurementAccuracy= -#facet.measurementDeterminedBy= -#facet.measurementDeterminedDate= -#facet.measurementID= -#facet.measurementMethod= -#facet.measurementRemarks= -#facet.measurementType= -#facet.measurementUnit= -#facet.measurementValue= -#facet.member= facet.minimumDepthInMeters=Minimum depth in metres -#facet.minimumDistanceAboveSurfaceInMeters= facet.minimumElevationInMeters=Min elevation -#facet.modified= facet.month=Month facet.multimedia=Multimedia -#facet.multimediaLicense= -#facet.municipality= -#facet.nameAccordingTo= -#facet.nameAccordingToID= -#facet.namePublishedIn= -#facet.namePublishedInID= -#facet.namePublishedInYear= facet.nameType=Name parse type -#facet.names_and_lsid= -#facet.nick= -#facet.nomenclaturalCode= -#facet.nomenclaturalStatus= -#facet.northing= -#facet.null= -#facet.numIdentificationAgreements= -#facet.numIdentificationDisagreements= -#facet.occurrenceDetails= -#facet.occurrenceID= -#facet.occurrenceRemarks= facet.occurrenceStatus=Presence/Absence facet.occurrenceYear=Date (by decade) -#facet.occurrence_year= facet.order=Order facet.orderID=Order -#facet.organismID= -#facet.organismName= -#facet.organismQuantity= -#facet.organismQuantityType= -#facet.organismRemarks= -#facet.organismScope= facet.originalNameUsage=Original name usage facet.originalNameUsageID=Original name usage -#facet.otherCatalogNumbers= facet.outlierLayer=Outlier for layer facet.outlierLayerCount=Outlier layer count -#facet.ownerInstitutionCode= -#facet.packedQuad= -#facet.parentEventID= -#facet.parentNameUsage= -#facet.parentNameUsageID= -#facet.photographer= facet.phylum=Phylum facet.phylumID=Phylum -#facet.point-0.0001= -#facet.point-0.001= -#facet.point-0.01= -#facet.point-0.02= -#facet.point-0.1= -#facet.point-1= -#facet.pointRadiusSpatialFit= -#facet.positioningDevice= -#facet.positioningMethod= -#facet.preparations= -#facet.previousIdentifications= facet.provenance=Provenance -facet.quad= -#facet.raw_altered= -#facet.raw_associatedOccurrences= -facet.raw_audience= facet.raw_basisOfRecord=Record type (unprocessed) -#facet.raw_biome= -#facet.raw_class= -facet.raw_classID= facet.raw_collectionName=Collection (unprocessed) facet.raw_collectionUid=Collection (unprocessed) -#facet.raw_connectionParameters= -#facet.raw_conservationStatuses= -#facet.raw_continent= -#facet.raw_contributor= facet.raw_coordinatePrecision=Coordinate precision (unprocessed) facet.raw_coordinateUncertaintyInMeters=Coordinate uncertainty (unprocessed) facet.raw_country=Country (unprocessed) facet.raw_countryCode=Country Code (unprocessed) facet.raw_countryConservation=Country conservation (unprocessed) -#facet.raw_created= -#facet.raw_creator= -#facet.raw_dataGeneralizations= facet.raw_dataProviderName=Data provider (unprocessed) facet.raw_dataProviderUid=Data provider (unprocessed) facet.raw_dataResourceName=Dataset (unprocessed) @@ -274,148 +92,52 @@ facet.raw_datePrecision=Date precision (unprocessed) facet.raw_day=Day (unprocessed) facet.raw_decimalLatitude=Latitude (unprocessed) facet.raw_decimalLongitude=Longitude (unprocessed) -#facet.raw_depth= -#facet.raw_depthAccuracy= -#facet.raw_description= -#facet.raw_dynamicProperties= -#facet.raw_elevation= -#facet.raw_elevationAccuracy= -#facet.raw_endDayOfYear= facet.raw_establishmentMeans=Establishment means (unprocessed) -#facet.raw_eventDate= facet.raw_family=Family (unprocessed) facet.raw_familyID=Family (unprocessed) -#facet.raw_footprintWKT= -#facet.raw_format= -#facet.raw_generalisationInMetres= -#facet.raw_generalisationToApplyInMetres= facet.raw_geodeticDatum=Datum (unprocessed) facet.raw_genus=Genus (unprocessed) facet.raw_genusID=Genus (unprocessed) -#facet.raw_georeferencedDate= -#facet.raw_identifiedByIds= -#facet.raw_identifier= -#facet.raw_individualCount= -#facet.raw_informationWithheld= -#facet.raw_installationKey= facet.raw_institutionName=Institution (unprocessed) facet.raw_institutionUid=Institution (unprocessed) -#facet.raw_invasiveStatuses= -#facet.raw_isClustered= -#facet.raw_isSensitive= -#facet.raw_issues= facet.raw_kingdom=Kingdom (unprocessed) facet.raw_kingdomID=Kingdom (unprocessed) -#facet.raw_lastCrawled= -#facet.raw_lastLoadDate= -#facet.raw_lastProcessedDate= -#facet.raw_lft= facet.raw_license=License (unprocessed) -#facet.raw_licenseType= -#facet.raw_licenseVersion= facet.raw_lifeStage=Life stage (unprocessed) -#facet.raw_lifeStageLineage= -#facet.raw_locality= -#facet.raw_machineTags= facet.raw_matchType=Name match metric (unprocessed) facet.raw_maximumDepthInMeters=Maximum depth in metres -#facet.raw_maximumDistanceAboveSurfaceInMeters= facet.raw_maximumElevationInMeters=Max elevation (unprocessed) facet.raw_minimumDepthInMeters=Minimum depth in metres (unprocessed) -#facet.raw_minimumDistanceAboveSurfaceInMeters= facet.raw_minimumElevationInMeters=Min elevation (unprocessed) -#facet.raw_modified= facet.raw_month=Month (unprocessed) facet.raw_nameType=Name parse type (unprocessed) -#facet.raw_networkKeys= facet.raw_occurrenceStatus=Presence/Absence (unprocessed) facet.raw_order=Order (unprocessed) facet.raw_orderID=Order (unprocessed) -#facet.raw_organismQuantity= -#facet.raw_organismQuantityType= -#facet.raw_original= facet.raw_phylum=Phylum (unprocessed) facet.raw_phylumID=Phylum (unprocessed) facet.raw_provenance=Provenance (unprocessed) -#facet.raw_publisher= -#facet.raw_publisherTitle= -#facet.raw_publishingCountry= -#facet.raw_publishingOrganizationKey= facet.raw_recordedBy=recordedBy (unprocessed) -#facet.raw_recordedByIds= -#facet.raw_references= -#facet.raw_relativeOrganismQuantity= -#facet.raw_repatriated= -#facet.raw_rgt= -#facet.raw_rightsHolder= -#facet.raw_sampleSizeUnit= -#facet.raw_sampleSizeValue= facet.raw_scientificName=Scientific name (unprocessed) -#facet.raw_scientificNameAuthorship= facet.raw_sensitive=Sensitive (unprocessed) facet.raw_sex=Sex (unprocessed) -facet.raw_source= facet.raw_species=Species (unprocessed) facet.raw_speciesGroup=Lifeform (unprocessed) facet.raw_speciesID=Species (unprocessed) facet.raw_speciesListID=Species lists (unprocessed) facet.raw_speciesSubgroup=Species subgroups (unprocessed) -#facet.raw_startDayOfYear= facet.raw_stateConservation=State conservation (unprocessed) facet.raw_stateProvince=State/Territory (unprocessed) -#facet.raw_taxonConceptID= facet.raw_taxonRank=Identified to rank (unprocessed) facet.raw_taxonRankID=Identified to rank (unprocessed) -#facet.raw_title= -#facet.raw_type= facet.raw_typeStatus=Specimen type (unprocessed) -#facet.raw_typifiedName= -#facet.raw_verbatimCoordinates= facet.raw_vernacularName=Common name (unprocessed) -#facet.raw_waterBody= facet.raw_year=Year (unprocessed) -#facet.recordNumber= facet.recordedBy=recordedBy facet.recordedByID=recorded by ID -#facet.references= -#facet.relatedResourceID= -#facet.relationshipAccordingTo= -#facet.relationshipEstablishedDate= -#facet.relationshipOfResource= -#facet.relationshipRemarks= facet.reproductiveCondition=Reproductive condition -#facet.resourceID= -#facet.resourceRelationshipID= -#facet.rgt= -#facet.rights= -#facet.rightsHolder= -#facet.sampleSizeUnit= -#facet.sampleSizeValue= -#facet.samplingEffort= -#facet.samplingProtocol= facet.scientificName=Scientific name -#facet.scientificNameAuthorship= -#facet.scientificNameID= -#facet.secondaryCollectors= facet.sensitive=Sensitive -#facet.sensitive_dataGeneralizations= -#facet.sensitive_day= -#facet.sensitive_decimalLatitude= -#facet.sensitive_decimalLongitude= -#facet.sensitive_eventDate= -#facet.sensitive_eventID= -#facet.sensitive_eventTime= -#facet.sensitive_footprintWKT= -#facet.sensitive_locality= -#facet.sensitive_locationRemarks= -#facet.sensitive_month= -#facet.sensitive_verbatimCoordinates= -#facet.sensitive_verbatimEventDate= -#facet.sensitive_verbatimLatitude= -#facet.sensitive_verbatimLocality= -#facet.sex= -#facet.soundIDs= -#facet.source= facet.spatiallyValid=Spatial validity facet.species=Species facet.speciesGroup=Lifeform @@ -423,110 +145,26 @@ facet.speciesHabitats=Species habitats facet.speciesID=Species facet.speciesListUid=Species lists facet.speciesSubgroup=Species subgroups -#facet.specificEpithet= -#facet.startDayOfYear= facet.stateConservation=State conservation -#facet.stateInvasive= facet.stateProvince=State/Territory facet.subfamily=Subfamily facet.subgenus=Subgenus facet.subspecies=Subspecies facet.subspeciesID=Subspecies facet.superfamily=Superfamily -#facet.taxonConceptID= -#facet.taxonID= facet.taxonRank=Identified to rank facet.taxonRankID=Identified to rank -#facet.taxonRemarks= facet.taxonomicIssues=Taxon identification issue -#facet.taxonomicStatus= -#facet.text= -#facet.toTaxon= -#facet.type= facet.typeStatus=Specimen type -#facet.typifiedName= facet.userAssertions=Has user assertions facet.userId=User facet.verbatimCoordinateSystem= facet.verbatimCoordinates= facet.verbatimDepth=Depth facet.verbatimElevation=Elevation -#facet.verbatimEventDate= -#facet.verbatimLatitude= -#facet.verbatimLocality= -#facet.verbatimLongitude= -#facet.verbatimSRS= -#facet.verbatimTaxonRank= facet.vernacularName=vernacularName -#facet.videoIDs= -#facet.waterBody= facet.year=Year -#facet.zone= -# Deprecated facet names -#facet.deprecated_abcd_identification_qualifier= -#facet.deprecated_abcd_identification_qualifier_insertion_point= -#facet.deprecated_assertions_missing= -#facet.deprecated_assertions_passed= -#facet.deprecated_assertions_unchecked= -#facet.deprecated_australian_herbarium_region= -#facet.deprecated_bbox= -facet.deprecated_biogeographic_region=Biogeographic region -#facet.deprecated_citation= -#facet.deprecated_cultivar_name= -#facet.deprecated_cultivated= -#facet.deprecated_date_deleted -#facet.deprecated_decimal_latitudelatitude= -#facet.deprecated_deleted= -facet.deprecated_distance_outside_expert_range=Outside expert range -facet.deprecated_duplicate_inst=Duplicates held at -#facet.deprecated_duplicates_original_institution_id= -#facet.deprecated_duplicates_original_unit_id= -#facet.deprecated_exchange_number= -#facet.deprecated_generalised_locality= -facet.deprecated_interaction=Species interaction -#facet.deprecated_loan_botanist= -#facet.deprecated_loan_date= -#facet.deprecated_loan_number= -#facet.deprecated_loan_return_date= -#facet.deprecated_loan_returned_date= -#facet.deprecated_location_determined= -#facet.deprecated_mappable= -#facet.deprecated_matched_name= -#facet.deprecated_mytest= -#facet.deprecated_natural_occurrence= -#facet.deprecated_near_named_place_relation_to= -#facet.deprecated_photo_page_url= -#facet.deprecated_photographer= -#facet.deprecated_portal_id= -#facet.deprecated_preferred_flag= -#facet.deprecated_quality_assertion= -facet.deprecated_query_assertion_uuid=Polygon assertion -#facet.deprecated_query_assertions= -#facet.deprecated_rem_text= -#facet.deprecated_scientific_name_addendum= -#facet.deprecated_scientific_name_without_author= -#facet.deprecated_taxonomic_kosher= -#facet.deprecated_taxonomically_kosher= -#facet.deprecated_text_rev= -#facet.deprecated_type_status_qualifier= -#facet.deprecated_valid_distribution= -#facet.deprecated_verbatim_date_identified= -#facet.deprecated_verification_date= -#facet.deprecated_verification_notes= -#facet.deprecated_verifier= -# Legacy facet names -facet.pestStatus=Pest status -facet.conservationStatus=Conservation status -facet.PublicationType=Publication type -facet.occurrenceDate=Date (by decade) -facet.sources=Sources -facet.uncertainty=Uncertainty (in metres) -facet.ViabilitySummary_d=Seed viability (summary) -facet.AdjustedSeedQuantity_i_RNG=Seed quantity (adjusted) -facet.AdjustedSeedQuantity_i=Seed quantity (adjusted) -facet.last_assertion_date=Date last annotated -facet.query_assertion_type_s=Polygon assertion types -facet.pest_flag_s=Pest status +facet.lastAssertionDate=Date last annotated facet.grid_ref=Grid reference facet.grid_ref_100=Grid reference (100m) facet.grid_ref_1000=Grid reference (1km) @@ -1034,8 +672,6 @@ region.Western\ Australia=WA region.Tasmania=TAS # Misc unknown=Unknown -#user_id=User -#userId=User PreservedSpecimen=Preserved specimen HumanObservation=Human observation MachineObservation=Machine observation @@ -1066,6 +702,8 @@ basisOfRecord.LIVING_SPECIMEN=Living specimen basisOfRecord.LivingSpecimen=Living specimen basisOfRecord.MATERIAL_SAMPLE=Material Sample basisOfRecord.MaterialSample=Material Sample +basisOfRecord.MATERIAL_CITATION=Material Citation +basisOfRecord.OCCURRENCE=Occurrence i18nvalues.month=true month.1=January month.01=January @@ -1089,7 +727,6 @@ month.10=October month.11=November month.12=December # Email -#offlineEmailBody=Testing email body {0} offlineFailEmailBody=Your [hubName] download has failed. Please contact [support] by replying to this email and we will investigate the cause.

Your search URL was:
[searchUrl]

The reference to quote is:
[uniqueId]

Your successful downloads can be found at:
[myDownloadsUrl] offlineFailEmailBodyCSDM=Your [hubName] download has failed. You will not be able to import data for modelling. Please try again after some time or contact [support] by replying to this email and we will investigate the cause.

The reference to quote is:
[uniqueId] # Validation error messages @@ -1152,484 +789,87 @@ species.count=Number of records #download field names. If there is differentiation between raw and processed values for the same field, # it must appear after a ' - ' e.g. "fieldName - raw" and "fieldName - processed" where # the "fieldName" part is identical. -#download field names -#abcdTypeStatus= acceptedNameUsage=Accepted Name Usage acceptedNameUsageID=Accepted Name Usage ID -#accessRights= -#assertionUserId= -#assertions= -#associatedMedia= -#associatedOccurrences= -#associatedOrganisms= -#associatedReferences= -#associatedSequences= -#associatedTaxa= basisOfRecord=Basis Of Record -#bed= -#behavior= -#bibliographicCitation= -#biome= catalogNumber=Catalogue Number cl959=Local Government Area class=Class -#classID= collectionCode=Collection Code #collectionID= collectionName=Collection collectionUid=Collection ID -#common_name_and_lsid= -#continent= coordinatePrecision=Coordinate Precision coordinateUncertaintyInMeters=Coordinate Uncertainty in Metres contentTypes=Content types country=Country - parsed -#countryCode= -#countryConservation= -#countryInvasive= -#county= dataGeneralizations=Data Generalised during processing -#dataHubName= -#dataHubUid= -#dataProviderName= -#dataProviderUid= dataResourceName=Data Resource Name -#dataResourceName=Dataset name dataResourceUid=Data Resource ID -#datasetID= -#datasetName= -#dateIdentified= -#datePrecision= day=Day -decade= -#decimalLatitude=Latitude decimalLatitude=Decimal latitude (WGS84) -#decimalLongitude=Longitude decimalLongitude=Decimal longitude (WGS84) -#defaultValuesUsed= -#depth= -#depthAccuracy= -#disposition= -#duplicateJustification= -#duplicateStatus= -#duplicateType= -#dynamicProperties= -#earliestAgeOrLowestStage= -#earliestEonOrLowestEonothem= -#earliestEpochOrLowestSeries= -#earliestEraOrLowestErathem= -#earliestGeochronologicalEra= -#earliestPeriodOrLowestSystem= -#easting= -#endDayOfYear= -#establishmentMeans= eventDate=Event Date -#eventDate=Event Date - parsed -#eventDateEnd= -#eventID= -#eventRemarks= eventTime=Event Time family=Family -#familyID= -#fieldNotes= -#fieldNumber= -#firstLoadedDate= -#footprintSRS= -#footprintSpatialFit= -#footprintWKT= -#formation= -#fromLithostratigraphicUnit= -#generalisationInMetres= -#generalisationToApplyInMetres= genus=Genus -#genusID= geodeticDatum=Geodetic datum -#geohash= -#geologicalContextID= -#georeferenceProtocol= -#georeferenceRemarks= -#georeferenceSources= -#georeferenceVerificationStatus= -#georeferencedBy= -#georeferencedDate= -#geospatialIssues= -#group= -#habitat= -#hasUserAssertions= -#higherClassification= -#higherGeography= -#higherGeographyID= -#highestBiostratigraphicZone= id=Record ID imageIDs=images -#identificationID= -#identificationQualifier= -#identificationReferences= -#identificationRemarks= -#identificationVerificationStatus= identifiedBy=Identified by -identifiedByID=Identified by ID -#identifierRole= -#imageID= -#imageIDs= -#inCollection= -#inDataset= -#inDescribedPlace= +identifiedByID=Identified by ID individualCount=Individual count informationWithheld=Information withheld during processing -infraspecificEpithet= institutionCode=Institution Code -#institutionID= institutionName=Institution institutionUid=Institution ID -#isDuplicateOf= -#isInCluster= -#isRepresentativeOf= -#island= -#islandGroup= kingdom=Kingdom -#kingdomID= -#label= -#language= -#lastAssertionDate= -#lastLoadDate= -#lastProcessedDate= -#lat_long= -#latestAgeOrHighestStage= -#latestEonOrHighestEonothem= -#latestEpochOrHighestSeries= -#latestEraOrHighestErathem= -#latestGeochronologicalEra= -#latestPeriodOrHighestSystem= -#lft= license=Licence -#lifeStage= -#lifeStageLineage= -#lithostratigraphicTerms= -#loanDestination= -#loanIdentifier= locality=Locality -#location= -#locationAccordingTo= -#locationID= -#locationRemarks= -#lowestBiostratigraphicZone= -#machineTags= -#matchType= -#matched_name= -#materialSampleID= maximumDepthInMeters=Maximum Depth In Meters -#maximumDistanceAboveSurfaceInMeters= maximumElevationInMeters=Maximum Elevation In Metres -#measurementAccuracy= -#measurementDeterminedBy= -#measurementDeterminedDate= -#measurementID= -#measurementMethod= -#measurementRemarks= -#measurementType= -#measurementUnit= -#measurementValue= -#member= minimumDepthInMeters=Minimum Depth In Meters -#minimumDistanceAboveSurfaceInMeters= minimumElevationInMeters=Minimum Elevation In Metres -#modified= month=Month -#multimedia= -#multimediaLicense= -#municipality= -#nameAccordingTo= -#nameAccordingToID= -#namePublishedIn= -#namePublishedInID= -#namePublishedInYear= -#nameType= -#names_and_lsid= -#nick= -#nomenclaturalCode= -#nomenclaturalStatus= -#northing= -#null= -#numIdentificationAgreements= -#numIdentificationDisagreements= -#occurrenceDetails= -#occurrenceID= -#occurrenceRemarks= occurrenceStatus=Occurrence status -#occurrenceYear= -#occurrence_year= order=Order -#orderID= -#organismID= -#organismName= -#organismQuantity= -#organismQuantityType= -#organismRemarks= -#organismScope= -#originalNameUsage= -#originalNameUsageID= -#otherCatalogNumbers= outlierLayer=Outlier for layer -#outlierLayerCount= -#ownerInstitutionCode= -#packedQuad= -#parentEventID= -#parentNameUsage= -#parentNameUsageID= -#photographer= phylum=Phylum -#phylumID= -#point-0.0001= -#point-0.001= -#point-0.01= -#point-0.02= -#point-0.1= -#point-1= -#pointRadiusSpatialFit= -#positioningDevice= -#positioningMethod= preparations=Preparations -#previousIdentifications= -#provenance= -#quad= -#raw_altered= -#raw_associatedOccurrences= -#raw_audience= raw_basisOfRecord=Basis Of Record - original -#raw_biome= -#raw_class= -#raw_classID= -#raw_collectionName= -#raw_collectionUid= -#raw_connectionParameters= -#raw_conservationStatuses= -#raw_continent= -#raw_contributor= -#raw_coordinatePrecision= -#raw_coordinateUncertaintyInMeters= -#raw_country= -#raw_countryCode= -#raw_created= -#raw_creator= -#raw_dataGeneralizations= -#raw_dataProviderName= -#raw_dataProviderUid= -#raw_dataResourceName= -#raw_dataResourceUid= -#raw_datasetTitle= -#raw_dateIdentified= -#raw_datePrecision= -#raw_day= raw_decimalLatitude=Latitude - original raw_decimalLongitude=Longitude - original -#raw_depth= -#raw_depthAccuracy= -#raw_description= -#raw_dynamicProperties= -#raw_elevation= -#raw_elevationAccuracy= -#raw_endDayOfYear= -#raw_establishmentMeans= -raw_eventDate=Date -#raw_family= -#raw_familyID= -#raw_footprintWKT= -#raw_format= -#raw_generalisationInMetres= -#raw_generalisationToApplyInMetres= -#raw_genus= -#raw_genusID= raw_geodeticDatum=Geodetic datum - original -#raw_georeferencedDate= -#raw_identifiedByIds= -#raw_identifier= -#raw_individualCount= -#raw_informationWithheld= -#raw_installationKey= -#raw_institutionName= -#raw_institutionUid= -#raw_invasiveStatuses= -#raw_isClustered= -#raw_isSensitive= -#raw_issues= -#raw_kingdom= -#raw_kingdomID= -#raw_lastCrawled= -#raw_lastLoadDate= -#raw_lastProcessedDate= -#raw_lft= -#raw_license= -#raw_licenseType= -#raw_licenseVersion= -#raw_lifeStage= -#raw_lifeStageLineage= raw_locality=Locality -#raw_machineTags= -#raw_matchType= raw_maximumDepthInMeters=Maximum Depth In Meters -#raw_maximumDistanceAboveSurfaceInMeters= raw_maximumElevationInMeters=Maximum Elevation In Metres raw_minimumDepthInMeters=Minimum Depth In Meters -#raw_minimumDistanceAboveSurfaceInMeters= raw_minimumElevationInMeters=Minimum Elevation In Metres -#raw_modified= -#raw_month= -#raw_nameType= -#raw_networkKeys= -#raw_occurrenceStatus= -#raw_order= -#raw_orderID= -#raw_organismQuantity= -#raw_organismQuantityType= -#raw_original= -#raw_phylum= -#raw_phylumID= -#raw_provenance= -#raw_publisher= -#raw_publisherTitle= -#raw_publishingCountry= -#raw_publishingOrganizationKey= raw_recordedBy=Collector - original -#raw_recordedByIds= -#raw_references= -#raw_relativeOrganismQuantity= -#raw_repatriated= -#raw_rgt= -#raw_rightsHolder= -#raw_sampleSizeUnit= -#raw_sampleSizeValue= raw_scientificName=Scientific Name - original -#raw_scientificNameAuthorship= -#raw_sensitive= raw_sex=Sex -#raw_source= -#raw_species= -#raw_speciesGroup= -#raw_speciesID= -#raw_speciesListID= -#raw_speciesSubgroup= -#raw_startDayOfYear= -#raw_stateConservation= -#raw_stateProvince= -#raw_taxonConceptID= -#raw_taxonRank= -#raw_taxonRankID= -#raw_title= -#raw_type= -#raw_typeStatus= -#raw_typifiedName= -#raw_verbatimCoordinates= raw_vernacularName=Vernacular name - original -#raw_waterBody= -#raw_year= recordNumber=Record number recordedBy=Collector recordedByID=Recorded by ID -#recordedByID= -#references= -#relatedResourceID= -#relationshipAccordingTo= -#relationshipEstablishedDate= -#relationshipOfResource= -#relationshipRemarks= -#reproductiveCondition= -#resourceID= -#resourceRelationshipID= -#rgt= -#rights= -#rightsHolder= -#sampleSizeUnit= -#sampleSizeValue= -#samplingEffort= -#samplingProtocol= scientificName=Scientific Name (intepreted) -#scientificNameAuthorship= -#scientificNameID= -#secondaryCollectors= -#sensitive= -#sensitive_dataGeneralizations= -#sensitive_day= sensitive_decimalLatitude=Latitude - ungeneralised sensitive_decimalLongitude=Longitude - ungeneralised sensitive_eventDate=Event date - sensitive -#sensitive_eventID= -#sensitive_eventTime= -#sensitive_footprintWKT= sensitive_locality=Locality - sensitive -#sensitive_locationRemarks= -#sensitive_month= -#sensitive_verbatimCoordinates= -#sensitive_verbatimEventDate= -#sensitive_verbatimLatitude= -#sensitive_verbatimLocality= sex=Sex soundIDs=sounds -#source= spatiallyValid=Location Quality species=Species -#speciesGroup= speciesHabitats=Species habitats -#speciesID= -#speciesListUid= -#speciesSubgroup= -#specificEpithet= -#startDayOfYear= -#stateConservation= -#stateInvasive= stateProvince=State - parsed -#subfamily= -#subgenus= subspecies=Subspecies -#subspeciesID= -#superfamily= -#taxonConceptID=Taxon Concept ID -#taxonID= taxonRank=Taxon Rank -#taxonRankID= -#taxonRemarks= taxonomicIssues=Taxon identification issue -#taxonomicIssues=Taxonomic issues -#taxonomicStatus= -#text= -#toTaxon= -#type= -#typeStatus= -#typifiedName= -#userAssertions= -#userId=User -#verbatimCoordinateSystem= -#verbatimCoordinates= -#verbatimDepth= -#verbatimElevation= verbatimEventDate=Verbatim event date -#verbatimLatitude= -#verbatimLocality= -#verbatimLongitude= -#verbatimSRS= -#verbatimTaxonRank= vernacularName=Vernacular name videoIDs=videos -#waterBody= year=Year -#zone= -# deprecated field names -#deprecated_abcd_identification_qualifier= -#deprecated_abcd_identification_qualifier_insertion_point= -#deprecated_assertions_missing= -#deprecated_assertions_passed= -#deprecated_assertions_unchecked= -#deprecated_australian_herbarium_region= -#deprecated_biogeographic_region= -#deprecated_cultivar_name= -#deprecated_cultivated= -#deprecated_decimal_latitudelatitude= -#deprecated_duplicate_inst= -#deprecated_duplicates_original_institution_id= -#deprecated_duplicates_original_unit_id= -#deprecated_generalised_locality= -#deprecated_interaction= -#deprecated_verifier= # Legacy field names classs=Class grid_ref=OSGR @@ -1637,23 +877,13 @@ grid_ref_100000=OSGR 100km grid_ref_10000=OSGR 10km grid_ref_2000=OSGR 2km grid_ref_1000=OSGR 1km -sensitive_event_date_end=Event date - sensitive sensitive_grid_reference=Grid reference - sensitive uuid=Record ID -#raw_datum=Geodetic datum - original -max_depth_d=Maximum depth in meters -min_depth_d=Minimum depth in meters -min_elevation_d=Minimum elevation in meters -max_elevation_d=Maximum elevation in meters -record_number=Record number -taxonomic_kosher=Taxonomic Quality -#verbatim_event_date=Verbatim event date #download field descriptions description.=Field from data provider that is not in use by Atlas description.abcdTypeStatus=ABCD field in use by herbaria description.assertionUserId=User ID of the person who has made an assertion about this record description.assertions=A list of all assertions (user and system supplied) for a record resulting from data quality tests -#description.assertions=All the assertions created for this record as part of the system data quality processing description.basisOfRecord=What this is a record of e.g. specimen, human observation, fossil description.bibliographicCitation=Bibliographic citation for this record description.biome=A field indicating if the record has been located in Terrestrial, Marine or Freshwater environment @@ -1671,7 +901,6 @@ description.country=The country where the specimen was collected or observation description.countryConservation=The country conservation status for the taxon associated with this record description.dataHubUid=The Atlas thematic groups for this record. description.dataProviderName=The data provider for this record -#description.dataProviderUid=Atlas ID for this data provider description.dataProviderUid=The Atlas ID for the data resource description.dataResourceName=The data resource that supplies the record. This is typically a CSV or DwCA file, or a webservice. description.dataResourceUid=A list (concatenated and separated) of preparations and preservation methods for a specimen. @@ -1689,7 +918,6 @@ description.genusID=Genus ID for this record description.id=Atlas unique ID for this record description.imageID=Single image URL for this record. description.imageIDs=Image URLs for this record -#description.images=Images associated with a record description.images=A comma-separated list of image IDs (JSON array), representing images associated with a record. A URL to an image details page can be obtained via the URL pattern https://images.ala.org.au/image/{imageID} and the original image file URL can be obtained via the URL pattern https://images.ala.org.au/image/{imageID}/original description.institutionCode=The institution code for this record. This will be populated if the data has come from a museum or herbaria description.institutionName=The name in use by the institution having custody of the object(s) or information referred to in the record. @@ -1741,7 +969,6 @@ description.raw_occurrenceStatus=The original occurrence status value supplied b description.raw_scientificName=Original scientific name supplied with the record description.raw_typeStatus=The original type status value supplied by the data provider description.raw_vernacularName=The original common name value supplied by the data provider -#description.raw_vernacularName=Vernacular name supplied with the record as supplied by the data publisher description.recordedBy=The collector for the occurrence. description.rgt=The right value in the nested set for this record. Used for retrieving records within taxonomic groups. description.scientificName=The name the Atlas has matched this record to in the NSL @@ -1750,7 +977,6 @@ description.sensitive=This fields is populated if the record is sensitive. Value description.sex=The sex of the biological individual(s) represented in the Occurrence description.sounds=Sounds associated with a record description.spatiallyValid=Whether this record is suitable for use in species distribution modelling. -#description.spatiallyValid=An indication of whether a record is spatially valid or not description.species=The species the Atlas has matched this record to in the NSL description.speciesGroup=Higher level group for this record e.g. Birds description.speciesID=The species ID for this record @@ -1759,7 +985,6 @@ description.speciesSubgroup=Higher level subgroup for this record e.g. Parrots description.stateConservation=The state conservation status for the taxon. description.stateProvince=The state or territory matching the supplied coordinates description.subfamily=The subfamily for this record. -#description.subspecies=The subspecies name for this record description.subspecies=The subspecies the Atlas has matched this record to in the NSL description.subspeciesID=The subspecies ID for this record description.superfamily=The super family for this record @@ -1845,52 +1070,36 @@ rangefacet.greater_than=greater than {0} rangefacet.unknown=Unknown decade.pre.start=pre 1850 # issue types -# assertions.AMBIGUOUS_COLLECTION=The given collection matches with more than 1 GRSciColl collection assertions.AMBIGUOUS_COLLECTION=Collection matches multiple -# assertions.AMBIGUOUS_INSTITUTION=The given institution matches with more than 1 GRSciColl institution assertions.AMBIGUOUS_INSTITUTION=Institution matches multiple assertions.BASIS_OF_RECORD_INVALID=Basis of record badly formed -# assertions.COLLECTION_MATCH_FUZZY=The given collection was fuzzily matched to a GRSciColl collection assertions.COLLECTION_MATCH_FUZZY=Collection fuzzy matched -# assertions.COLLECTION_MATCH_NONE=The given collection couldn't be matched with any GRSciColl collection assertions.COLLECTION_MATCH_NONE=Collection unmatched -# assertions.CONTINENT_COUNTRY_MISMATCH=The interpreted continent and country do not match assertions.CONTINENT_COUNTRY_MISMATCH=Continent and country mismatch -# assertions.CONTINENT_DERIVED_FROM_COORDINATES=The interpreted continent is based on the coordinates, not the verbatim string information assertions.CONTINENT_DERIVED_FROM_COORDINATES=Continent derived from coordinates -# assertions.CONTINENT_INVALID=Uninterpretable continent values found assertions.CONTINENT_INVALID=Continent invalid -#assertions.COORDINATE_INVALID=Coordinate value is given in some form but GBIF is unable to interpret it assertions.COORDINATE_INVALID=Coordinate invalid assertions.COORDINATE_OUT_OF_RANGE=Coordinates are out of range for species -#assertions.COORDINATE_PRECISION_INVALID=Indicates an invalid or very unlikely coordinatePrecision assertions.COORDINATE_PRECISION_INVALID=Coordinate Precision invalid assertions.COORDINATE_REPROJECTED=Coordinates converted to WGS84 assertions.COORDINATE_REPROJECTION_FAILED=Decimal latitude/longitude conversion failed assertions.COORDINATE_REPROJECTION_SUSPICIOUS=Coordinate reprojection suspicious -# assertions.COORDINATE_ROUNDED=Original coordinate modified by rounding assertions.COORDINATE_ROUNDED=Coordinate rounded -# assertions.COORDINATE_UNCERTAINTY_METERS_INVALID=Indicates an invalid or very unlikely dwc:uncertaintyInMeters assertions.COORDINATE_UNCERTAINTY_METERS_INVALID=Coordinate uncertainty invalid assertions.COORDINATES_CENTRE_OF_COUNTRY=Coordinates centre of country assertions.COORDINATES_CENTRE_OF_STATEPROVINCE=Supplied coordinates centre of state assertions.COUNTRY_COORDINATE_MISMATCH=Coordinates dont match supplied country assertions.COUNTRY_DERIVED_FROM_COORDINATES=Country inferred from coordinates -# assertions.COUNTRY_INVALID=Uninterpretable country values found assertions.COUNTRY_INVALID=Country invalid -# assertions.COUNTRY_MISMATCH=Interpreted country for dwc:country and dwc:countryCode contradict each other assertions.COUNTRY_MISMATCH=Country missmatch countryCode assertions.DEPTH_MIN_MAX_SWAPPED=Min and max depth reversed assertions.DEPTH_NON_NUMERIC=Depth value non-numeric assertions.DEPTH_NOT_METRIC=Depth value supplied in feet -# assertions.DEPTH_UNLIKELY=Set if depth is larger than 11,000m or negative assertions.DEPTH_UNLIKELY=Depth unlikely -# assertions.DIFFERENT_OWNER_INSTITUTION=The given owner institution is different than the given institution assertions.DIFFERENT_OWNER_INSTITUTION=Different owner institution assertions.ELEVATION_MIN_MAX_SWAPPED=Min and max altitude reversed assertions.ELEVATION_NON_NUMERIC=Altitude value non-numeric assertions.ELEVATION_NOT_METRIC=Altitude value supplied in feet -# assertions.ELEVATION_UNLIKELY=Set if elevation is above the troposphere (17km) or below 11km (Mariana Trench) assertions.ELEVATION_UNLIKELY=Elevation unlikely assertions.FIRST_OF_CENTURY=First of the century assertions.FIRST_OF_MONTH=First of the month @@ -1902,27 +1111,17 @@ assertions.TAXON_MATCH_AGGREGATE=Taxon match aggregate assertions.UNCERTAINTY_NOT_SPECIFIED=Uncertainty not specified assertions.GEODETIC_DATUM_ASSUMED_WGS84=Geodetic datum assumed WGS84 assertions.GEODETIC_DATUM_INVALID=Unrecognized geodetic datum -# assertions.GEOREFERENCED_DATE_INVALID=The date given for dwc:georeferencedDate is invalid and can't be interpreted at all assertions.GEOREFERENCED_DATE_INVALID=Georeferenced date invalid -# assertions.GEOREFERENCED_DATE_UNLIKELY=The date given for dwc:georeferencedDate is in the future or before Linnean times (1700) assertions.GEOREFERENCED_DATE_UNLIKELY=Georeferenced date unlikely assertions.GEOREFERENCE_POST_OCCURRENCE=Georeferenced after occurrence date assertions.ID_PRE_OCCURRENCE=Identification date before occurrence date -# assertions.IDENTIFIED_DATE_INVALID=The date given for dwc:dateIdentified is invalid and can't be interpreted at all. assertions.IDENTIFIED_DATE_INVALID=Identified date invalid -# assertions.IDENTIFIED_DATE_UNLIKELY=The date given for dwc:dateIdentified is in the future or before Linnean times (1700) assertions.IDENTIFIED_DATE_UNLIKELY=Identified date unlikely -# assertions.INDIVIDUAL_COUNT_CONFLICTS_WITH_OCCURRENCE_STATUS=Example: individual count value > 0, but occurrence status is absent. assertions.INDIVIDUAL_COUNT_CONFLICTS_WITH_OCCURRENCE_STATUS=Individual count conflicts with occurrence status -# assertions.INDIVIDUAL_COUNT_INVALID=The individual count value is not a positive integer assertions.INDIVIDUAL_COUNT_INVALID=Individual count invalid -# assertions.INSTITUTION_COLLECTION_MISMATCH=The collection matched doesn't belong to the institution matched assertions.INSTITUTION_COLLECTION_MISMATCH=Institution collection mismatch -# assertions.INSTITUTION_MATCH_FUZZY=The given institution was fuzzily matched to a GRSciColl institution assertions.INSTITUTION_MATCH_FUZZY=Institution fuzzy match -# assertions.INSTITUTION_MATCH_NONE=The given institution couldn't be matched with any GRSciColl institution assertions.INSTITUTION_MATCH_NONE=Institution no match -# assertions.INTERPRETATION_ERROR=An error occurred during interpretation, leaving the record interpretation incomplete assertions.INTERPRETATION_ERROR=Interpretation error assertions.INVALID_SCIENTIFIC_NAME=Invalid scientific name assertions.LOCATION_NOT_SUPPLIED=Location not supplied @@ -1935,31 +1134,20 @@ assertions.MISSING_GEOREFERENCEPROTOCOL=Missing georeferenced protocol assertions.MISSING_GEOREFERENCESOURCES=Missing georeferenced sources assertions.MISSING_GEOREFERENCEVERIFICATIONSTATUS=Missing georeferenced verification status assertions.MISSING_TAXONRANK=Missing taxonomic rank -# assertions.MODIFIED_DATE_INVALID=A (partial) invalid date is given for dc:modified, such as a nonexistent date, zero month, etc assertions.MODIFIED_DATE_INVALID=Modified date invalid -# assertions.MODIFIED_DATE_UNLIKELY=The date given for dc:modified is in the future or predates Unix time (1970) assertions.MODIFIED_DATE_UNLIKELY=Modified date unlikely -# assertions.MULTIMEDIA_DATE_INVALID=An invalid date is given for dc:created of a multimedia object assertions.MULTIMEDIA_DATE_INVALID=Multimedia date invalid -# assertions.MULTIMEDIA_URI_INVALID=An invalid URI is given for a multimedia object assertions.MULTIMEDIA_URI_INVALID=Multimedia URI invalid assertions.NAME_NOT_SUPPLIED=Name not supplied -# assertions.OCCURRENCE_STATUS_INFERRED_FROM_BASIS_OF_RECORD=Occurrence status was inferred from basis of records assertions.OCCURRENCE_STATUS_INFERRED_FROM_BASIS_OF_RECORD=Occurrence status inferred from basis of records -#assertions.OCCURRENCE_STATUS_INFERRED_FROM_INDIVIDUAL_COUNT=Occurrence status was inferred from the individual count value assertions.OCCURRENCE_STATUS_INFERRED_FROM_INDIVIDUAL_COUNT=Occurrence status inferred from individual count value -# assertions.OCCURRENCE_STATUS_UNPARSABLE=Occurrence status value can't be assigned to OccurrenceStatus assertions.OCCURRENCE_STATUS_UNPARSABLE=Unparsable Occurrence status assertions.PRESUMED_NEGATED_LATITUDE=Latitude is negated assertions.PRESUMED_NEGATED_LONGITUDE=Longitude is negated -# assertions.PRESUMED_SWAPPED_COORDINATE=Latitude and longitude appear to be swapped assertions.PRESUMED_SWAPPED_COORDINATE=Latitude and longitude swapped -# assertions.RECORDED_DATE_INVALID=A (partial) invalid date is given, such as a non existing date, zero month assertions.RECORDED_DATE_INVALID=Invalid recorded date -# assertions.RECORDED_DATE_MISMATCH=The recorded date specified as the eventDate string and the individual year, month, day are contradictory assertions.RECORDED_DATE_MISMATCH=Recorded date mismatch assertions.RECORDED_DATE_UNLIKELY=Unlikely recorded date -# assertions.REFERENCES_URI_INVALID=An invalid URI is given for dc:references assertions.REFERENCES_URI_INVALID=Invalid references URI assertions.SENSITIVITY_REPORT_INVALID=Sensitivity report invalid assertions.SENSITIVITY_REPORT_NOT_LOADABLE=Sensitivity report not loadable @@ -1972,11 +1160,8 @@ assertions.TAXON_EXCLUDED=Taxon excluded assertions.TAXON_EXCLUDED_ASSOCIATED=Taxon excluded associated assertions.TAXON_HOMONYM=Taxon homonym assertions.TAXON_INDETERMINATE_SPECIES=Taxon indeterminate species -# assertions.TAXON_MATCH_FUZZY=Matching to the taxonomic backbone can only be done using a fuzzy, non exact match. assertions.TAXON_MATCH_FUZZY=Taxon fuzzy match -# assertions.TAXON_MATCH_HIGHERRANK=Matching to the taxonomic backbone can only be done on a higher rank and not the scientific name. assertions.TAXON_MATCH_HIGHERRANK=Taxon matches to higher rank -# assertions.TAXON_MATCH_NONE=Matching to the taxonomic backbone cannot be done because there was no match at all, or several matches with too little information to keep them apart (potentially homonyms). assertions.TAXON_MATCH_NONE=No taxon match assertions.TAXON_MISAPPLIED=Taxon misapplied assertions.TAXON_MISAPPLIED_MATCHED=Taxon misapplied matched @@ -1984,7 +1169,6 @@ assertions.TAXON_PARENT_CHILD_SYNONYM=Taxon parent child synonym assertions.TAXON_QUESTION_SPECIES=Taxon question species assertions.TAXON_SCOPE_MISMATCH=Resource taxonomic scope mismatch assertions.TAXON_SPECIES_PLURAL=Taxon species plural -# assertions.TYPE_STATUS_INVALID=The given type status is impossible to interpret or significantly different from the recommended vocabulary. assertions.TYPE_STATUS_INVALID=Type status invalid assertions.UNCERTAINTY_IN_PRECISION=Coordinate precision and uncertainty transposed assertions.UNKNOWN_COUNTRY_NAME=Supplied country not recognised @@ -2213,20 +1397,8 @@ dwc.vernacularName=vernacularName dwc.videoIDs=videos dwc.waterBody=waterBody dwc.year=year -# Map the legacy indexed field "occurrence_date" to the eventDate darwin core term -dwc.occurrence_date=eventDate # These DWC terms dont exist, but to keep them in downloads.... -dwc.associated_Media=associatedMedia -dwc.citation=dcterms:bibliographicCitation -dwc.common_name=vernacularName -dwc.cultivated=establishmentMeans -dwc.dataset_name=datasetName -dwc.identified_date=dateIdentified -dwc.life_stage=lifeStage -dwc.owner_institution_code=ownerInstitutionCode -dwc.raw_identification_qualifier=verbatimIdentificationQualifier -dwc.raw_taxon_name=scientificName -dwc.taxon_name=scientificName +dwc.raw_scientificName=scientificName # Empty facet values abcdTypeStatus.novalue=Not supplied acceptedNameUsage.novalue=Not supplied