From 91c204b51cbb321e6021254ae88b201687395797 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Wed, 29 Nov 2017 20:45:36 +0000 Subject: [PATCH] fixes for conversion of custom fields git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@158930 82a268e6-3cf1-43bd-a215-b396298e98cf --- .settings/org.eclipse.wst.common.component | 3 --- .../grsf_publish_ws/utils/CommonServiceUtils.java | 3 --- .../grsf_publish_ws/utils/HelperMethods.java | 7 ++++--- src/main/webapp/WEB-INF/web.xml | 8 ++++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 396fdd0..6caf699 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -3,9 +3,6 @@ - - uses - diff --git a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/CommonServiceUtils.java b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/CommonServiceUtils.java index f3ff476..2666cf0 100644 --- a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/CommonServiceUtils.java +++ b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/CommonServiceUtils.java @@ -492,15 +492,12 @@ public class CommonServiceUtils { } public static String getRecordOrganization(String itemIdOrName, String apiKey, String context) throws Exception{ - DataCatalogue catalog = HelperMethods.getDataCatalogueRunningInstance(context); CkanDataset dataset = catalog.getDataset(itemIdOrName, apiKey); if(dataset == null) throw new Exception("Unable to find record with id or name " + itemIdOrName); else return dataset.getOrganization().getTitle(); - - } /** diff --git a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/HelperMethods.java b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/HelperMethods.java index 2a8407b..c76aabb 100644 --- a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/HelperMethods.java +++ b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/HelperMethods.java @@ -567,16 +567,17 @@ public abstract class HelperMethods { String usedKey = ""; if(namespaces.containsKey(entry.getKey())){ - toReturn.put(namespaces.get(entry.getKey()), entry.getValue()); usedKey = namespaces.get(entry.getKey()); } else{ - toReturn.put(entry.getKey(), entry.getValue()); usedKey = entry.getKey(); } if(isSourceRecord) - toReturn.put(usedKey.replace("GRSF", "").trim(), entry.getValue()); + usedKey = usedKey.replace("GRSF", "").trim(); + + toReturn.put(usedKey, entry.getValue()); + } return toReturn; diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 15e2f97..c6cd661 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -24,14 +24,14 @@ Context of pending products under manage activities ManageVRE - - /d4science.research-infrastructures.eu/FARM/GRSF_Admin + /gcube/devNext/NextNext + Context of products no longer under manage activities PublicVRE - - /d4science.research-infrastructures.eu/FARM/GRSF + /gcube/devsec/devVRE + index.jsp