diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg
index 925b64726..a0b3ff5af 100644
--- a/.github/badges/jacoco.svg
+++ b/.github/badges/jacoco.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/.github/coverage/jacoco.csv b/.github/coverage/jacoco.csv
index 8924f2ca4..758f79398 100644
--- a/.github/coverage/jacoco.csv
+++ b/.github/coverage/jacoco.csv
@@ -94,7 +94,7 @@ Portal-Core,org.auscope.portal.core.services.responses.opendap,SimpleBounds,6,15
Portal-Core,org.auscope.portal.core.services.responses.opendap,SimpleAxis,0,35,0,0,0,14,0,5,0,5
Portal-Core,org.auscope.portal.core.services.responses.opendap,ViewVariableFactory,56,407,14,38,11,78,15,19,1,7
Portal-Core,org.auscope.portal.core.services.responses.opendap,SimpleGrid,13,25,0,0,1,10,1,3,1,3
-Portal-Core,org.auscope.portal.core.view.knownlayer,CSWRecordSelector,9,58,0,12,3,18,3,11,3,5
+Portal-Core,org.auscope.portal.core.view.knownlayer,CSWRecordSelector,9,100,0,12,3,21,3,11,3,5
Portal-Core,org.auscope.portal.core.view.knownlayer,KMLSelector,11,44,0,6,4,9,3,5,3,2
Portal-Core,org.auscope.portal.core.view.knownlayer,WMSSelectors,34,51,4,2,9,12,5,3,3,2
Portal-Core,org.auscope.portal.core.view.knownlayer,KnownLayerGrouping,8,21,0,0,1,8,1,4,1,4
@@ -224,8 +224,8 @@ Portal-Core,org.auscope.portal.core.services,SISSVoc3Service,6,203,1,9,2,57,3,11
Portal-Core,org.auscope.portal.core.services,GoogleCloudMonitoringService,190,127,3,7,52,32,10,7,8,4
Portal-Core,org.auscope.portal.core.services,CSWFilterService,211,360,10,18,41,66,12,17,6,9
Portal-Core,org.auscope.portal.core.services,CSWCacheService.CSWCacheUpdateThread,114,901,13,65,24,181,13,34,0,8
-Portal-Core,org.auscope.portal.core.services,VocabularyCacheService.VocabularyCacheUpdateThread,0,121,0,6,0,33,0,8,0,5
Portal-Core,org.auscope.portal.core.services,SISSVoc2Service,0,151,2,4,0,35,2,4,0,3
+Portal-Core,org.auscope.portal.core.services,VocabularyCacheService.VocabularyCacheUpdateThread,0,121,0,6,0,33,0,8,0,5
Portal-Core,org.auscope.portal.core.services,SearchService,796,0,95,0,137,0,57,0,9,0
Portal-Core,org.auscope.portal.core.services,GoogleCloudMonitoringCachedService.CacheEntry,51,0,0,0,21,0,8,0,8,0
Portal-Core,org.auscope.portal.core.services,VocabularyFilterService,8,345,8,24,2,85,8,21,0,13
diff --git a/.github/coverage/percentage.txt b/.github/coverage/percentage.txt
index 15cdc05de..8b1378917 100644
--- a/.github/coverage/percentage.txt
+++ b/.github/coverage/percentage.txt
@@ -1 +1 @@
-63.9316
+
diff --git a/pom.xml b/pom.xml
index abae43e65..ebe4e9cc1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.auscope.portal
portal-core
jar
- 2.5.0-SNAPSHOT
+ 2.6.0-SNAPSHOT
Portal-Core
Core functionality common to various AuScope portals.
http://portal.auscope.org
@@ -48,7 +48,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.6.15
+ 3.1.5
@@ -323,7 +323,7 @@
org.json
json
- 20230227
+ 20231013
@@ -403,6 +403,7 @@
javax.annotation
javax.annotation-api
+ 1.3.2
commons-io
@@ -414,18 +415,13 @@
joda-time
2.12.5
-
- org.apache.jena
- jena-arq
- 4.2.0
-
-
- org.slf4j
- jcl-over-slf4j
-
-
-
-
+
+ org.apache.jena
+ apache-jena-libs
+ 4.10.0
+ pom
+
+
com.github.openstack4j.core
openstack4j-core
3.9
diff --git a/src/main/java/org/auscope/portal/core/cloud/CloudJob.java b/src/main/java/org/auscope/portal/core/cloud/CloudJob.java
index 0c7d42ac3..4d9c44bde 100644
--- a/src/main/java/org/auscope/portal/core/cloud/CloudJob.java
+++ b/src/main/java/org/auscope/portal/core/cloud/CloudJob.java
@@ -7,10 +7,10 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
+import jakarta.persistence.MappedSuperclass;
/**
* Base class representing the base state of a job that is sent to the cloud for processing.
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/DownloadController.java b/src/main/java/org/auscope/portal/core/server/controllers/DownloadController.java
index de530fe7c..6b4df50a9 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/DownloadController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/DownloadController.java
@@ -21,9 +21,9 @@
import java.io.OutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.activation.MimetypesFileTypeMap;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.activation.MimetypesFileTypeMap;
import javax.naming.OperationNotSupportedException;
import org.apache.commons.io.FilenameUtils;
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/OPeNDAPController.java b/src/main/java/org/auscope/portal/core/server/controllers/OPeNDAPController.java
index d9189a91d..e2133eb35 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/OPeNDAPController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/OPeNDAPController.java
@@ -6,8 +6,8 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletResponse;
import org.json.JSONObject;
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/ServiceConfigurationController.java b/src/main/java/org/auscope/portal/core/server/controllers/ServiceConfigurationController.java
index ef283dd6c..049014f30 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/ServiceConfigurationController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/ServiceConfigurationController.java
@@ -2,7 +2,7 @@
import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.auscope.portal.core.configuration.ServiceConfiguration;
import org.auscope.portal.core.configuration.ServiceConfigurationItem;
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/WCSController.java b/src/main/java/org/auscope/portal/core/server/controllers/WCSController.java
index 80665af8f..908dfe5ef 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/WCSController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/WCSController.java
@@ -9,8 +9,8 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/WFSController.java b/src/main/java/org/auscope/portal/core/server/controllers/WFSController.java
index 6deadbc2d..c0c413047 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/WFSController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/WFSController.java
@@ -7,10 +7,10 @@
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponseWrapper;
+import jakarta.servlet.http.HttpServletRequest;
import org.apache.http.HttpStatus;
import org.auscope.portal.core.services.WFSGml32Service;
diff --git a/src/main/java/org/auscope/portal/core/server/controllers/WMSController.java b/src/main/java/org/auscope/portal/core/server/controllers/WMSController.java
index b5dc760e6..68e6671ab 100644
--- a/src/main/java/org/auscope/portal/core/server/controllers/WMSController.java
+++ b/src/main/java/org/auscope/portal/core/server/controllers/WMSController.java
@@ -13,8 +13,8 @@
import java.util.List;
import javax.naming.OperationNotSupportedException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
diff --git a/src/main/java/org/auscope/portal/core/server/http/download/FileUploadBean.java b/src/main/java/org/auscope/portal/core/server/http/download/FileUploadBean.java
index 1c6bcf54a..5c0bb210d 100644
--- a/src/main/java/org/auscope/portal/core/server/http/download/FileUploadBean.java
+++ b/src/main/java/org/auscope/portal/core/server/http/download/FileUploadBean.java
@@ -1,16 +1,17 @@
package org.auscope.portal.core.server.http.download;
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
+import org.springframework.web.multipart.MultipartFile;
+
public class FileUploadBean {
- private CommonsMultipartFile file;
+ private MultipartFile file;
- public CommonsMultipartFile getFile() {
+ public MultipartFile getFile() {
return file;
}
- public void setFile(CommonsMultipartFile file) {
+ public void setFile(MultipartFile file) {
this.file = file;
}
}
diff --git a/src/main/java/org/auscope/portal/core/services/CSWCacheService.java b/src/main/java/org/auscope/portal/core/services/CSWCacheService.java
index 092b1f67f..a83fb724b 100644
--- a/src/main/java/org/auscope/portal/core/services/CSWCacheService.java
+++ b/src/main/java/org/auscope/portal/core/services/CSWCacheService.java
@@ -31,6 +31,8 @@
import org.auscope.portal.core.services.responses.csw.CSWRecordTransformerFactory;
import org.auscope.portal.core.util.FileIOUtil;
import org.objenesis.strategy.StdInstantiatorStrategy;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import com.esotericsoftware.kryo.Kryo;
@@ -84,6 +86,11 @@ public class CSWCacheService {
/** If true, this class will force the usage of HTTP GetMethods instead of POST methods (where possible). Useful workaround for some CSW services */
protected boolean forceGetMethods = false;
protected Date lastCacheUpdate;
+
+ // KnownLayerService needs to be informed when indexing is finished, must be @Lazy loaded to avoid circular dependencies
+ @Autowired
+ @Lazy
+ private KnownLayerService knownLayerService;
/**
* Creates a new instance of a CSWKeywordCacheService. This constructor is normally autowired by the spring framework.
@@ -257,6 +264,10 @@ private synchronized void updateFinished(Map> newKeywordC
this.keywordsByRegistry = newKeywordByEndpointCache;
}
saveCacheToFile();
+
+ // Inform KnownLayerService that there are potentially new CSWRecords
+ knownLayerService.updateKnownLayersCache();
+
this.updateRunning = false;
this.lastCacheUpdate = new Date();
diff --git a/src/main/java/org/auscope/portal/core/services/WMSService.java b/src/main/java/org/auscope/portal/core/services/WMSService.java
index 5ce62ecdc..f5f20da38 100644
--- a/src/main/java/org/auscope/portal/core/services/WMSService.java
+++ b/src/main/java/org/auscope/portal/core/services/WMSService.java
@@ -11,8 +11,8 @@
import java.util.stream.Stream;
import javax.naming.OperationNotSupportedException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
diff --git a/src/main/java/org/auscope/portal/core/services/cloud/FileStagingService.java b/src/main/java/org/auscope/portal/core/services/cloud/FileStagingService.java
index 4018e3dc0..1ac6ceb2a 100644
--- a/src/main/java/org/auscope/portal/core/services/cloud/FileStagingService.java
+++ b/src/main/java/org/auscope/portal/core/services/cloud/FileStagingService.java
@@ -9,7 +9,7 @@
import java.util.ArrayList;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/src/main/java/org/auscope/portal/core/services/csw/CSWServiceItem.java b/src/main/java/org/auscope/portal/core/services/csw/CSWServiceItem.java
index a0b28fcc3..54b1acbe3 100644
--- a/src/main/java/org/auscope/portal/core/services/csw/CSWServiceItem.java
+++ b/src/main/java/org/auscope/portal/core/services/csw/CSWServiceItem.java
@@ -3,7 +3,7 @@
import java.util.Arrays;
import java.util.Collection;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.auscope.portal.core.server.OgcServiceProviderType;
diff --git a/src/main/java/org/auscope/portal/core/view/knownlayer/CSWRecordSelector.java b/src/main/java/org/auscope/portal/core/view/knownlayer/CSWRecordSelector.java
index 0b215ca56..dd305c136 100644
--- a/src/main/java/org/auscope/portal/core/view/knownlayer/CSWRecordSelector.java
+++ b/src/main/java/org/auscope/portal/core/view/knownlayer/CSWRecordSelector.java
@@ -10,18 +10,18 @@
*/
public class CSWRecordSelector implements KnownLayerSelector {
- private String recordId;
- private String descriptiveKeyword;
- private String serviceName;
+ private String[] recordIds;
+ private String[] descriptiveKeywords;
+ private String[] serviceNames;
/**
* @param descriptiveKeyword
* the descriptive keyword used to identify CSW records
*/
public CSWRecordSelector() {
- this.descriptiveKeyword = null;
- this.recordId = null;
- this.serviceName = null;
+ this.descriptiveKeywords = new String[0];
+ this.recordIds = new String[0];
+ this.serviceNames = new String[0];
}
/**
@@ -29,8 +29,8 @@ public CSWRecordSelector() {
*
* @return record id string
*/
- public String getRecordId() {
- return recordId;
+ public String[] getRecordIds() {
+ return recordIds;
}
/**
@@ -39,8 +39,8 @@ public String getRecordId() {
* @param recordId record id string
* @return
*/
- public void setRecordId(String recordId) {
- this.recordId = recordId;
+ public void setRecordIds(String[] recordIds) {
+ this.recordIds = recordIds;
}
/**
@@ -48,8 +48,8 @@ public void setRecordId(String recordId) {
*
* @return the descriptiveKeyword
*/
- public String getDescriptiveKeyword() {
- return descriptiveKeyword;
+ public String[] getDescriptiveKeywords() {
+ return descriptiveKeywords;
}
/**
@@ -58,8 +58,8 @@ public String getDescriptiveKeyword() {
* @param descriptiveKeyword
* the descriptiveKeyword to set
*/
- public void setDescriptiveKeyword(String descriptiveKeyword) {
- this.descriptiveKeyword = descriptiveKeyword;
+ public void setDescriptiveKeywords(String[] descriptiveKeywords) {
+ this.descriptiveKeywords = descriptiveKeywords;
}
/**
@@ -67,8 +67,8 @@ public void setDescriptiveKeyword(String descriptiveKeyword) {
*
* @return the service name
*/
- public String getServiceName() {
- return serviceName;
+ public String[] getServiceNames() {
+ return serviceNames;
}
/**
@@ -77,8 +77,8 @@ public String getServiceName() {
* @param serviceName the service name string to search for in CSW records
*
*/
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
+ public void setServiceNames(String[] serviceNames) {
+ this.serviceNames = serviceNames;
}
/**
@@ -87,18 +87,21 @@ public void setServiceName(String serviceName) {
*/
@Override
public RelationType isRelatedRecord(CSWRecord record) {
- if (recordId != null && recordId.equals(record.getFileIdentifier())) {
- return RelationType.Belongs;
+ for (String recordId: recordIds) {
+ if (recordId.equals(record.getFileIdentifier())) {
+ return RelationType.Belongs;
+ }
}
-
- if (descriptiveKeyword != null && record.containsKeyword(descriptiveKeyword)) {
- return RelationType.Belongs;
+ for (String descriptiveKeyword: descriptiveKeywords) {
+ if (record.containsKeyword(descriptiveKeyword)) {
+ return RelationType.Belongs;
+ }
+ }
+ for (String serviceName: serviceNames) {
+ if (serviceName.equals(record.getServiceName())) {
+ return RelationType.Belongs;
+ }
}
-
- if (serviceName != null && serviceName.equals(record.getServiceName())) {
- return RelationType.Belongs;
- }
-
return RelationType.NotRelated;
}
}
diff --git a/src/test/java/org/auscope/portal/core/server/controllers/TestCSWCacheController.java b/src/test/java/org/auscope/portal/core/server/controllers/TestCSWCacheController.java
index e38203198..f379b3114 100644
--- a/src/test/java/org/auscope/portal/core/server/controllers/TestCSWCacheController.java
+++ b/src/test/java/org/auscope/portal/core/server/controllers/TestCSWCacheController.java
@@ -7,8 +7,8 @@
import java.util.Map;
import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.json.JSONArray;
import org.json.JSONObject;
diff --git a/src/test/java/org/auscope/portal/core/server/controllers/TestDownloadController.java b/src/test/java/org/auscope/portal/core/server/controllers/TestDownloadController.java
index 63befbdd9..0f371cc22 100644
--- a/src/test/java/org/auscope/portal/core/server/controllers/TestDownloadController.java
+++ b/src/test/java/org/auscope/portal/core/server/controllers/TestDownloadController.java
@@ -8,7 +8,7 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
diff --git a/src/test/java/org/auscope/portal/core/server/controllers/TestWCSController.java b/src/test/java/org/auscope/portal/core/server/controllers/TestWCSController.java
index cc5cd5bbc..3a370fbc5 100644
--- a/src/test/java/org/auscope/portal/core/server/controllers/TestWCSController.java
+++ b/src/test/java/org/auscope/portal/core/server/controllers/TestWCSController.java
@@ -9,9 +9,9 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.WriteListener;
+import jakarta.servlet.http.HttpServletResponse;
import org.auscope.portal.core.services.WCSService;
import org.auscope.portal.core.services.responses.csw.CSWGeographicBoundingBox;
diff --git a/src/test/java/org/auscope/portal/core/server/controllers/TestWfsController.java b/src/test/java/org/auscope/portal/core/server/controllers/TestWfsController.java
index 4fdd4777a..3800b1b56 100644
--- a/src/test/java/org/auscope/portal/core/server/controllers/TestWfsController.java
+++ b/src/test/java/org/auscope/portal/core/server/controllers/TestWfsController.java
@@ -2,8 +2,8 @@
import java.net.URI;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
import org.apache.http.client.methods.HttpRequestBase;
import org.auscope.portal.core.services.PortalServiceException;
diff --git a/src/test/java/org/auscope/portal/core/services/cloud/TestFileStagingService.java b/src/test/java/org/auscope/portal/core/services/cloud/TestFileStagingService.java
index 2c9e9dd0a..9626d17d0 100644
--- a/src/test/java/org/auscope/portal/core/services/cloud/TestFileStagingService.java
+++ b/src/test/java/org/auscope/portal/core/services/cloud/TestFileStagingService.java
@@ -9,7 +9,7 @@
import java.util.Date;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.io.IOUtils;
import org.auscope.portal.core.cloud.CloudJob;
diff --git a/src/test/java/org/auscope/portal/core/services/responses/opendap/TestViewVariableFactory.java b/src/test/java/org/auscope/portal/core/services/responses/opendap/TestViewVariableFactory.java
index 5d54a2441..93bdb1279 100644
--- a/src/test/java/org/auscope/portal/core/services/responses/opendap/TestViewVariableFactory.java
+++ b/src/test/java/org/auscope/portal/core/services/responses/opendap/TestViewVariableFactory.java
@@ -4,8 +4,8 @@
import java.util.Arrays;
import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.json.JSONArray;
import org.json.JSONObject;
diff --git a/src/test/java/org/auscope/portal/core/test/ByteBufferedServletOutputStream.java b/src/test/java/org/auscope/portal/core/test/ByteBufferedServletOutputStream.java
index 7ff1f84bf..4f77480e8 100644
--- a/src/test/java/org/auscope/portal/core/test/ByteBufferedServletOutputStream.java
+++ b/src/test/java/org/auscope/portal/core/test/ByteBufferedServletOutputStream.java
@@ -3,8 +3,8 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.WriteListener;
/**
* Test class extension of a ServletOutputStream that allows access to an underlying byte[] of data that was written
diff --git a/src/test/java/org/auscope/portal/core/test/jmock/ReadableServletOutputStream.java b/src/test/java/org/auscope/portal/core/test/jmock/ReadableServletOutputStream.java
index 75bebe04b..16be8c0f5 100644
--- a/src/test/java/org/auscope/portal/core/test/jmock/ReadableServletOutputStream.java
+++ b/src/test/java/org/auscope/portal/core/test/jmock/ReadableServletOutputStream.java
@@ -5,8 +5,8 @@
import java.io.IOException;
import java.util.zip.ZipInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.WriteListener;
/**
* A ServletOutputStream extension that buffers any written data and gives methods to access that data.
diff --git a/src/test/java/org/auscope/portal/core/view/knownlayer/TestKnownLayerSelectors.java b/src/test/java/org/auscope/portal/core/view/knownlayer/TestKnownLayerSelectors.java
index 737763396..4430cc081 100644
--- a/src/test/java/org/auscope/portal/core/view/knownlayer/TestKnownLayerSelectors.java
+++ b/src/test/java/org/auscope/portal/core/view/knownlayer/TestKnownLayerSelectors.java
@@ -104,11 +104,12 @@ public void setupRecordList() throws MalformedURLException {
@Test
public void testCSWKeywordSelector() {
CSWRecordSelector selector = new CSWRecordSelector();
- selector.setDescriptiveKeyword("Report");
+ String[] keywords = {"Report", "WMS"};
+ selector.setDescriptiveKeywords(keywords);
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(0)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(1)));
- Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(2)));
+ Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(2)));
Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(3)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(4)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(5)));
@@ -122,9 +123,10 @@ public void testCSWKeywordSelector() {
@Test
public void testCSWServiceNameSelector() {
CSWRecordSelector selector = new CSWRecordSelector();
- selector.setServiceName("name4");
+ String[] names = {"name1", "name4"};
+ selector.setServiceNames(names);
- Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(0)));
+ Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(0)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(1)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(2)));
Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(3)));
@@ -140,10 +142,11 @@ public void testCSWServiceNameSelector() {
@Test
public void testCSWIdSelector() {
CSWRecordSelector selector = new CSWRecordSelector();
- selector.setRecordId("id4");
+ String[] ids = {"id2", "id4"};
+ selector.setRecordIds(ids);
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(0)));
- Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(1)));
+ Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(1)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(2)));
Assert.assertEquals(RelationType.Belongs, selector.isRelatedRecord(recordList.get(3)));
Assert.assertEquals(RelationType.NotRelated, selector.isRelatedRecord(recordList.get(4)));