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
This commit is contained in:
Costantino Perciante 2017-11-29 20:45:36 +00:00
parent 4b62e244cf
commit 91c204b51c
4 changed files with 8 additions and 13 deletions

View File

@ -3,9 +3,6 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="grsf-common-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/grsf-common-library/grsf-common-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="grsf-publisher-ws"/>
<property name="java-output-path" value="/grsf-publisher-ws/target/classes"/>
</wb-module>

View File

@ -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();
}
/**

View File

@ -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;

View File

@ -24,14 +24,14 @@
<context-param>
<description>Context of pending products under manage activities</description>
<param-name>ManageVRE</param-name>
<!-- <param-value>/gcube/devNext/NextNext</param-value> -->
<param-value>/d4science.research-infrastructures.eu/FARM/GRSF_Admin</param-value>
<param-value>/gcube/devNext/NextNext</param-value>
<!-- <param-value>/d4science.research-infrastructures.eu/FARM/GRSF_Admin</param-value> -->
</context-param>
<context-param>
<description>Context of products no longer under manage activities</description>
<param-name>PublicVRE</param-name>
<!-- <param-value>/gcube/devsec/devVRE</param-value> -->
<param-value>/d4science.research-infrastructures.eu/FARM/GRSF</param-value>
<param-value>/gcube/devsec/devVRE</param-value>
<!-- <param-value>/d4science.research-infrastructures.eu/FARM/GRSF</param-value> -->
</context-param>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>