updated test class

This commit is contained in:
Francesco Mangiacrapa 2020-12-01 16:01:37 +01:00
parent d9090a8013
commit c45674da1d
1 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package org.gcube.application; package org.gcube.application;
import org.gcube.application.shared.GeoNaDataViewerProfile; import org.gcube.application.shared.GeoNaDataViewerProfile;
import org.gcube.application.shared.GeoNaItemRef;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
public class TestGeonaReader { public class TestGeonaReader {
@ -10,7 +11,9 @@ public class TestGeonaReader {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
getGeoNaDataViewProfile(); //System.out.println(getGeoNaDataViewProfile());
System.out.println(getLinks());
} }
@ -18,11 +21,22 @@ public class TestGeonaReader {
System.out.println("getGeoNaDataViewProfile called"); System.out.println("getGeoNaDataViewProfile called");
ScopeProvider.instance.set(scope); ScopeProvider.instance.set(scope);
GeoNaDataViewerProfileReader gdvp = new GeoNaDataViewerProfileReader("geoportal-data-viewer-app"); GeoportalCommon gc = new GeoportalCommon();
GeoNaDataViewerProfile profile = gdvp.readProfileFromInfrastrucure(); GeoNaDataViewerProfile profile = gc.getGeoNaDataViewProfile(null);
System.out.println("Returning profile: "+profile); System.out.println("Returning profile: "+profile);
return profile; return profile;
} }
public static GeoNaItemRef getLinks() throws Exception{
System.out.println("getGeoNaDataViewProfile called");
ScopeProvider.instance.set(scope);
GeoportalCommon gc = new GeoportalCommon();
GeoNaItemRef item = new GeoNaItemRef(new Long(2), "concessione");
GeoNaItemRef links = gc.getPublicLinksFor(item);
return links;
}
} }