refactored
This commit is contained in:
parent
45ee429045
commit
12020bc9c2
15
.classpath
15
.classpath
|
@ -1,12 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src/main/java"/>
|
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" path="src/test/java"/>
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application;
|
package org.gcube.application.geoportalcommon;
|
||||||
|
|
||||||
import static org.gcube.resources.discovery.icclient.ICFactory.client;
|
import static org.gcube.resources.discovery.icclient.ICFactory.client;
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ import javax.xml.xpath.XPath;
|
||||||
import javax.xml.xpath.XPathConstants;
|
import javax.xml.xpath.XPathConstants;
|
||||||
import javax.xml.xpath.XPathFactory;
|
import javax.xml.xpath.XPathFactory;
|
||||||
|
|
||||||
import org.gcube.application.shared.GeoNaDataViewerProfile;
|
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
|
||||||
import org.gcube.application.shared.LayerItem;
|
import org.gcube.application.geoportalcommon.shared.LayerItem;
|
||||||
import org.gcube.application.shared.exception.ApplicationProfileNotFoundException;
|
import org.gcube.application.geoportalcommon.shared.exception.ApplicationProfileNotFoundException;
|
||||||
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;
|
|
@ -1,12 +1,12 @@
|
||||||
package org.gcube.application;
|
package org.gcube.application.geoportalcommon;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.gcube.application.shared.GeoNaDataViewerProfile;
|
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
|
||||||
import org.gcube.application.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.application.shared.PublicLink;
|
import org.gcube.application.geoportalcommon.shared.PublicLink;
|
||||||
import org.gcube.portlets.user.urlshortener.UrlShortener;
|
import org.gcube.portlets.user.urlshortener.UrlShortener;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -82,11 +82,12 @@ public class GeoportalCommon {
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public GeoNaDataViewerProfile getGeoNaDataViewProfile(String appID) throws Exception {
|
public GeoNaDataViewerProfile getGeoNaDataViewProfile(String appID) throws Exception {
|
||||||
LOG.info("getGeoNaDataViewProfile called");
|
LOG.info("getGeoNaDataViewProfile called for: "+appID);
|
||||||
|
|
||||||
if(appID==null || appID.isEmpty())
|
if(appID==null || appID.isEmpty())
|
||||||
appID = GeoportalCommonConstants.GEOPORTAL_DATA_VIEWER_APP;
|
appID = GeoportalCommonConstants.GEOPORTAL_DATA_VIEWER_APP;
|
||||||
|
|
||||||
|
LOG.info("using AppId: "+appID);
|
||||||
GeoNaDataViewerProfileReader gdvp = new GeoNaDataViewerProfileReader(appID);
|
GeoNaDataViewerProfileReader gdvp = new GeoNaDataViewerProfileReader(appID);
|
||||||
GeoNaDataViewerProfile profile = gdvp.readProfileFromInfrastrucure();
|
GeoNaDataViewerProfile profile = gdvp.readProfileFromInfrastrucure();
|
||||||
LOG.info("Returning profile: " + profile);
|
LOG.info("Returning profile: " + profile);
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application;
|
package org.gcube.application.geoportalcommon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class GeoportalCommonConstants.
|
* The Class GeoportalCommonConstants.
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application.shared;
|
package org.gcube.application.geoportalcommon.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application.shared;
|
package org.gcube.application.geoportalcommon.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application.shared;
|
package org.gcube.application.geoportalcommon.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package org.gcube.application.shared;
|
package org.gcube.application.geoportalcommon.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.application.shared.exception;
|
package org.gcube.application.geoportalcommon.shared.exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class ApplicationProfileException.
|
* The Class ApplicationProfileException.
|
|
@ -1,7 +1,8 @@
|
||||||
package org.gcube.application;
|
package org.gcube.application;
|
||||||
|
|
||||||
import org.gcube.application.shared.GeoNaDataViewerProfile;
|
import org.gcube.application.geoportalcommon.GeoportalCommon;
|
||||||
import org.gcube.application.shared.GeoNaItemRef;
|
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
|
|
||||||
public class TestGeonaReader {
|
public class TestGeonaReader {
|
||||||
|
|
Loading…
Reference in New Issue