geoportal-data-common/src/test/java/org/gcube/application/TestGeonaReader.java

44 lines
1.2 KiB
Java
Raw Normal View History

2020-12-01 15:53:44 +01:00
package org.gcube.application;
2020-12-01 16:45:05 +01:00
import org.gcube.application.geoportalcommon.GeoportalCommon;
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
2020-12-01 15:53:44 +01:00
import org.gcube.common.scope.api.ScopeProvider;
public class TestGeonaReader {
private static String scope ="/gcube/devsec/devVRE";
public static void main(String[] args) throws Exception {
2020-12-01 16:01:37 +01:00
//System.out.println(getGeoNaDataViewProfile());
System.out.println(getLinks());
2020-12-01 15:53:44 +01:00
}
public static GeoNaDataViewerProfile getGeoNaDataViewProfile() throws Exception{
System.out.println("getGeoNaDataViewProfile called");
ScopeProvider.instance.set(scope);
2020-12-01 16:01:37 +01:00
GeoportalCommon gc = new GeoportalCommon();
GeoNaDataViewerProfile profile = gc.getGeoNaDataViewProfile(null);
2020-12-01 15:53:44 +01:00
System.out.println("Returning profile: "+profile);
return profile;
}
2020-12-01 16:01:37 +01:00
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;
}
2020-12-01 15:53:44 +01:00
}