Task #17166 Fixing CSS for synoptic table and fixing allyears for FARM
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@181231 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0976438699
commit
636d05f435
|
@ -149,7 +149,14 @@
|
|||
<Change>[Incident #16671] Fixing Catalogue Resolver in case of working
|
||||
with INFRASTRUCTURE and VO scope
|
||||
</Change>
|
||||
<Change>[Incident #16713] GN harvesting from CKAN does not work properly
|
||||
<Change>[Incident #16713] GN harvesting from CKAN does not work
|
||||
properly
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.data-transfer.uri-resolver.2-1-1"
|
||||
date="${buildDate}">
|
||||
<Change>[Incident #17180] Bug fixes
|
||||
</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
4
pom.xml
4
pom.xml
|
@ -9,9 +9,9 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.data.transfer</groupId>
|
||||
<artifactId>uri-resolver</artifactId>
|
||||
<version>2.1.0-SNAPSHOT</version>
|
||||
<version>2.1.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<description>The URI Resolver is an HTTP URI resolver implemented as an REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications. </description>
|
||||
<description>The URI Resolver is an HTTP URI resolver implemented as an REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/data-transfer/${project.artifactId}</connection>
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.gcube.datatransfer.resolver.gis.entity.GisLayerItem;
|
|||
import org.gcube.datatransfer.resolver.gis.exception.GeonetworkInstanceException;
|
||||
import org.gcube.datatransfer.resolver.init.UriResolverSmartGearManagerInit;
|
||||
import org.gcube.datatransfer.resolver.services.error.ExceptionManager;
|
||||
import org.gcube.spatial.data.geonetwork.LoginLevel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -192,18 +193,23 @@ public class GisResolver {
|
|||
* @return the gis layer for layer uuid
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
protected GisLayerItem getGisLayerForLayerUUID(HttpServletRequest req, String scope, String gisUUID) throws Exception{
|
||||
public GisLayerItem getGisLayerForLayerUUID(HttpServletRequest req, String scope, String gisUUID) throws Exception{
|
||||
|
||||
try {
|
||||
GeonetworkInstance gi = null;
|
||||
try {
|
||||
gi = LoadingGeonetworkInstanceCache.get(scope);
|
||||
|
||||
}catch(ExecutionException | InvalidCacheLoadException e){
|
||||
logger.error("Error on getting the Geonetwork Instance from cache for scope "+scope, e);
|
||||
throw ExceptionManager.wrongParameterException(req, "Error on getting the Geonetwork Instance from cache for scope "+scope+". Is it registered for this scope: "+scope+"?", this.getClass(), help);
|
||||
}
|
||||
if(gi==null)
|
||||
throw new Exception("GeonetworkInstance not instanciable in the scope: "+scope);
|
||||
|
||||
LoginLevel toLoginLevel = LoginLevel.SCOPE;
|
||||
logger.info("Performing authentication on GN with "+LoginLevel.class.getSimpleName()+" "+toLoginLevel);
|
||||
gi.getGeonetworkPublisher().login(toLoginLevel);
|
||||
|
||||
GisLayerItem gisLayerItem = MetadataConverter.getWMSOnLineResource(gi, gisUUID);
|
||||
return gisLayerItem;
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CatalogueResolverTest {
|
|||
|
||||
try {
|
||||
|
||||
ScopeProvider.instance.set("/d4science.research-infrastructures.eu");
|
||||
ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab");
|
||||
//ScopeProvider.instance.set("/d4science.research-infrastructures.eu");
|
||||
GatewayCKANCatalogueReference ckanCatalogueReference = CkanCatalogueConfigurationsReader.loadCatalogueEndPoints();
|
||||
System.out.println(ckanCatalogueReference.toString());
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.datatransfer.resolver.gis.entity.GisLayerItem;
|
||||
import org.gcube.datatransfer.resolver.services.GisResolver;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -10,31 +11,44 @@
|
|||
* Sep 7, 2016
|
||||
*/
|
||||
public class GisResolverTest {
|
||||
|
||||
|
||||
/*public void resolve(){
|
||||
|
||||
static String scope = "/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab";
|
||||
static String gisUUID = "6b99efdf-2202-4b6f-aaa3-7e10e0bf09f4";
|
||||
public static void main(String[] args) {
|
||||
GisResolver gisResolver = new GisResolver();
|
||||
String scope = "/gcube/devsec/devVRE";
|
||||
String UUID = "177e1c3c-4a22-4ad9-b015-bfc443d16cb8";
|
||||
ScopeProvider.instance.set(scope);
|
||||
//ServerParameters geonetworkParams = getCachedServerParameters(scope);
|
||||
try {
|
||||
ServerParameters geonetworkParams = gisResolver.getCachedServerParameters(scope);
|
||||
String wmsRequest = gisResolver.getLayerWmsRequest(scope, UUID, geonetworkParams);
|
||||
System.out.println("Final url is: " + wmsRequest);
|
||||
wmsRequest = URLEncoder.encode(wmsRequest, UTF_8);
|
||||
System.out.println("Encoded WMS request is: " + wmsRequest);
|
||||
String gisPortletUrl = gisResolver.getGisViewerApplicationURL(scope);
|
||||
System.out.println("Gis Viewer Application url is: " + gisPortletUrl);
|
||||
// logger.info("WmsRequest is: " + wmsRequest);
|
||||
// wmsRequest = encodeURLWithParamDelimiter(wmsRequest);
|
||||
// logger.info("Encoded url is: " + wmsRequest);
|
||||
// wmsRequest = appendParamReplacement(wmsRequest);
|
||||
gisPortletUrl+="?wmsrequest="+wmsRequest;
|
||||
|
||||
System.out.println(gisPortletUrl);
|
||||
// urlRedirect(req, resp, gisPortletUrl);
|
||||
GisLayerItem gisLayerItem = gisResolver.getGisLayerForLayerUUID(null, scope, gisUUID);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
// public void resolve(){
|
||||
// GisResolver gisResolver = new GisResolver();
|
||||
// String scope = "/gcube/devsec/devVRE";
|
||||
// String UUID = "177e1c3c-4a22-4ad9-b015-bfc443d16cb8";
|
||||
// try {
|
||||
// ServerParameters geonetworkParams = gisResolver.getCachedServerParameters(scope);
|
||||
// String wmsRequest = gisResolver.getLayerWmsRequest(scope, UUID, geonetworkParams);
|
||||
// System.out.println("Final url is: " + wmsRequest);
|
||||
// wmsRequest = URLEncoder.encode(wmsRequest, UTF_8);
|
||||
// System.out.println("Encoded WMS request is: " + wmsRequest);
|
||||
// String gisPortletUrl = gisResolver.getGisViewerApplicationURL(scope);
|
||||
// System.out.println("Gis Viewer Application url is: " + gisPortletUrl);
|
||||
//// logger.info("WmsRequest is: " + wmsRequest);
|
||||
//// wmsRequest = encodeURLWithParamDelimiter(wmsRequest);
|
||||
//// logger.info("Encoded url is: " + wmsRequest);
|
||||
//// wmsRequest = appendParamReplacement(wmsRequest);
|
||||
// gisPortletUrl+="?wmsrequest="+wmsRequest;
|
||||
//
|
||||
// System.out.println(gisPortletUrl);
|
||||
//// urlRedirect(req, resp, gisPortletUrl);
|
||||
// } catch (Exception e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue