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
This commit is contained in:
Francesco Mangiacrapa 2016-09-14 10:19:47 +00:00
parent 594638a0dd
commit 95c322c0ee
1 changed files with 11 additions and 8 deletions

View File

@ -9,22 +9,21 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.gcube.common.resources.gcore.utils.XPathHelper; import org.gcube.common.resources.gcore.utils.XPathHelper;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient; import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.Query; import org.gcube.resources.discovery.client.queries.api.Query;
import org.gcube.resources.discovery.client.queries.impl.QueryBox; import org.gcube.resources.discovery.client.queries.impl.QueryBox;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
/** /**
* The Class UriResolverMapReader. * The Class ApplicationProfileReader.
* *
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* May 4, 2015 * Sep 14, 2016
*/ */
public class ApplicationProfileReader { 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_DESCRIPTION_TEXT = "/Resource/Profile/Description/text()";
protected static final String RESOURCE_PROFILE_NAME_TEXT = "/Resource/Profile/Name/text()"; protected static final String RESOURCE_PROFILE_NAME_TEXT = "/Resource/Profile/Name/text()";
// private Logger logger = LoggerFactory.getLogger(UriResolverMapReader.class); private Logger logger = Logger.getLogger(ApplicationProfileReader.class);
//TODO TEMP SOLUTION IN ORDER TO PRINT USING ALSO LOG4J INTO GEOEXPLORER PORTLET
private Logger logger = LoggerFactory.getLogger(ApplicationProfileReader.class);
private String secondaryType; private String secondaryType;
private String scope; private String scope;
private String resourceName; private String resourceName;
@ -72,7 +69,6 @@ public class ApplicationProfileReader {
* resource name {@value #WORKSPACE_EXPLORER_APP_NAME} and secondaryType {@value #SECONDARY_TYPE} * resource name {@value #WORKSPACE_EXPLORER_APP_NAME} and secondaryType {@value #SECONDARY_TYPE}
* *
* @return the applicationProfile profile * @return the applicationProfile profile
* @throws Exception the exception
*/ */
/** /**
* this method looks up the applicationProfile profile among the ones available in the infrastructure. * 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){ public static String getGcubeGenericQueryString(String secondaryType, String appId){
return "for $profile in collection('/db/Profiles/GenericResource')//Resource " + return "for $profile in collection('/db/Profiles/GenericResource')//Resource " +