44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
package org.gcube.application;
|
|
|
|
import org.gcube.application.geoportalcommon.GeoportalCommon;
|
|
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
|
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
|
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 {
|
|
|
|
//System.out.println(getGeoNaDataViewProfile());
|
|
|
|
System.out.println(getLinks());
|
|
|
|
}
|
|
|
|
public static GeoNaDataViewerProfile getGeoNaDataViewProfile() throws Exception{
|
|
System.out.println("getGeoNaDataViewProfile called");
|
|
|
|
ScopeProvider.instance.set(scope);
|
|
GeoportalCommon gc = new GeoportalCommon();
|
|
GeoNaDataViewerProfile profile = gc.getGeoNaDataViewProfile(null);
|
|
System.out.println("Returning profile: "+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;
|
|
}
|
|
|
|
}
|