From 95c322c0eeb7b036415e3a13989a1154631acc2c Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Wed, 14 Sep 2016 10:19:47 +0000 Subject: [PATCH] updated logger git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@131335 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../reader/ApplicationProfileReader.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/reader/ApplicationProfileReader.java b/src/main/java/org/gcube/portlets/user/workspace/server/reader/ApplicationProfileReader.java index f18773b..6daab09 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/reader/ApplicationProfileReader.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/reader/ApplicationProfileReader.java @@ -9,22 +9,21 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; import org.gcube.common.resources.gcore.utils.XPathHelper; import org.gcube.common.scope.api.ScopeProvider; import org.gcube.resources.discovery.client.api.DiscoveryClient; import org.gcube.resources.discovery.client.queries.api.Query; import org.gcube.resources.discovery.client.queries.impl.QueryBox; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.w3c.dom.Node; import org.xml.sax.InputSource; /** - * The Class UriResolverMapReader. + * The Class ApplicationProfileReader. * * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * May 4, 2015 + * Sep 14, 2016 */ public class ApplicationProfileReader { @@ -42,9 +41,7 @@ public class ApplicationProfileReader { protected static final String RESOURCE_PROFILE_DESCRIPTION_TEXT = "/Resource/Profile/Description/text()"; protected static final String RESOURCE_PROFILE_NAME_TEXT = "/Resource/Profile/Name/text()"; -// private Logger logger = LoggerFactory.getLogger(UriResolverMapReader.class); - //TODO TEMP SOLUTION IN ORDER TO PRINT USING ALSO LOG4J INTO GEOEXPLORER PORTLET - private Logger logger = LoggerFactory.getLogger(ApplicationProfileReader.class); + private Logger logger = Logger.getLogger(ApplicationProfileReader.class); private String secondaryType; private String scope; private String resourceName; @@ -72,7 +69,6 @@ public class ApplicationProfileReader { * resource name {@value #WORKSPACE_EXPLORER_APP_NAME} and secondaryType {@value #SECONDARY_TYPE} * * @return the applicationProfile profile - * @throws Exception the exception */ /** * this method looks up the applicationProfile profile among the ones available in the infrastructure. @@ -193,6 +189,13 @@ public class ApplicationProfileReader { } + /** + * Gets the gcube generic query string. + * + * @param secondaryType the secondary type + * @param appId the app id + * @return the gcube generic query string + */ public static String getGcubeGenericQueryString(String secondaryType, String appId){ return "for $profile in collection('/db/Profiles/GenericResource')//Resource " +