diff --git a/.classpath b/.classpath index 23976a9..acd4306 100644 --- a/.classpath +++ b/.classpath @@ -6,15 +6,15 @@ - + - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 6bb5ced..8abcf6b 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,5 +1,7 @@ + + diff --git a/src/main/java/org/gcube/datacatalogue/ckanutillibrary/server/DataCatalogueRunningCluster.java b/src/main/java/org/gcube/datacatalogue/ckanutillibrary/server/DataCatalogueRunningCluster.java index 1cfdddf..9e52943 100644 --- a/src/main/java/org/gcube/datacatalogue/ckanutillibrary/server/DataCatalogueRunningCluster.java +++ b/src/main/java/org/gcube/datacatalogue/ckanutillibrary/server/DataCatalogueRunningCluster.java @@ -108,6 +108,7 @@ public class DataCatalogueRunningCluster { * Nov 12, 2019 */ //Added by Francesco, see #18039 + public static final String PUBLIC_VRE_CATALOGUE_URL = "public-vre-url"; public static enum ACCESS_LEVEL_TO_CATALOGUE_PORTLET {PUBLIC_GATEWAY, PUBLIC_VRE, PRIVATE_VRE}; public Map mapAccessURLToCatalogue; @@ -456,7 +457,7 @@ public class DataCatalogueRunningCluster { } currValue = null; - currValue = helper.evaluate("/Resource/Profile/Body/vre-public-url/text()"); + currValue = helper.evaluate("/Resource/Profile/Body/"+PUBLIC_VRE_CATALOGUE_URL+"/text()"); if (currValue != null && currValue.size() > 0) { logger.debug("Portlet url found is " + currValue.get(0)); //return currValue.get(0); diff --git a/src/test/java/org/gcube/datacatalogue/ckanutillibrary/server/TestDataCatalogueLib.java b/src/test/java/org/gcube/datacatalogue/ckanutillibrary/server/TestDataCatalogueLib.java index 79cd927..9b1a87c 100644 --- a/src/test/java/org/gcube/datacatalogue/ckanutillibrary/server/TestDataCatalogueLib.java +++ b/src/test/java/org/gcube/datacatalogue/ckanutillibrary/server/TestDataCatalogueLib.java @@ -585,5 +585,12 @@ public class TestDataCatalogueLib { String url = instance.getUrlFromDatasetIdOrName(datasetName); logger.debug("url is " + url); } + + //@Test + public void getCatalogueURLs() throws Exception{ + DataCatalogueImpl util = factory.getUtilsPerScope("/gcube/devNext/NextNext"); + logger.debug("MAP ACCESS URL TO CATALOGUE:" +util.getMapAccessURLToCatalogue()); + + } }