diff --git a/report.fulllog b/report.fulllog index f63f05f..67678a2 100644 --- a/report.fulllog +++ b/report.fulllog @@ -61,3 +61,359 @@ org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Ma at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:211) at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:48) +2020-04-07 11:52:36,568 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 11:52:36,571 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 11:52:36,782 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 11:52:36,782 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 11:52:36,786 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 11:52:36,787 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 11:52:37,898 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 11:52:37,899 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 11:52:37,899 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 12:04:05,744 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 12:04:05,747 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 12:04:06,017 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 12:04:06,018 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 12:04:06,023 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 12:04:06,023 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 12:04:06,803 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 12:04:06,803 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 12:04:06,804 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 12:04:07,867 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 12:04:08,138 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:216) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:48) +2020-04-07 15:45:27,927 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:45:27,929 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 15:45:28,188 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:45:28,192 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:45:28,192 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:45:28,193 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 15:45:29,266 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 15:45:29,267 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 15:45:29,269 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 15:53:33,212 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:53:33,215 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 15:53:33,459 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:53:33,464 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:53:33,464 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:53:33,465 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 15:53:34,346 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 15:53:34,347 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 15:53:34,347 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 15:55:30,347 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:55:30,350 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 15:55:30,665 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:55:30,669 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:55:30,669 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:55:30,670 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 15:55:31,294 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 15:55:31,296 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 15:55:31,296 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 15:59:24,370 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:59:24,374 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 15:59:24,620 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:59:24,623 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:59:24,624 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 15:59:24,624 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 15:59:25,165 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 15:59:25,165 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 15:59:25,166 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 15:59:26,140 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 15:59:26,404 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:53) +2020-04-07 16:07:56,697 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:07:56,700 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 16:07:56,944 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:07:56,947 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:07:56,948 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:07:56,949 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:07:57,586 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 16:07:57,587 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:07:57,588 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:07:58,529 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:07:58,805 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:53) +2020-04-07 16:08:01,394 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:08:01,394 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:08:01,395 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:08:01,395 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:08:01,891 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:09,335 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:09,339 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 16:27:09,621 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:10,759 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 16:27:10,760 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:10,760 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:10,760 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:10,761 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:27:10,761 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:27:11,791 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:12,057 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:14,693 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:14,693 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:14,693 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:14,694 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:15,129 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:19,807 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:19,808 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:19,808 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:19,808 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:20,847 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:21,104 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:22,632 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:22,632 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:22,632 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:22,632 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:23,083 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:26,672 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:26,673 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:26,673 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:26,673 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:27,709 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:27,961 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:29,620 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:29,621 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:29,621 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:29,621 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:30,042 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:32,039 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:32,040 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:32,040 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:32,040 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:33,053 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:33,293 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:34,919 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:34,919 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:34,919 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:34,919 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:35,461 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:37,545 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:37,559 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:37,564 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:37,564 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:38,545 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:38,800 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:40,391 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:40,391 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:40,391 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:40,391 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:40,845 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:43,275 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:43,275 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:43,275 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:43,275 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:44,194 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:44,472 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:45,932 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:45,932 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:45,932 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:45,932 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:46,352 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:27:48,248 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:48,253 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:48,253 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:48,253 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:27:49,217 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:27:49,444 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:27:51,247 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:27:51,248 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:51,248 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:27:51,248 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:27:51,718 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:28:59,163 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:28:59,163 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:28:59,163 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer +2020-04-07 16:28:59,388 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:28:59,389 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:28:59,389 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:28:59,389 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:28:59,821 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 1 layers +2020-04-07 16:28:59,821 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:28:59,821 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=1] +2020-04-07 16:29:00,893 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:01,190 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:03,077 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:03,077 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:03,077 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:03,077 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:03,487 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:29:05,896 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:05,896 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:05,896 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:05,896 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:06,943 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:07,197 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:08,832 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:08,832 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:08,832 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:08,832 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:09,308 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:29:11,447 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:11,447 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:11,447 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:11,447 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:12,429 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:12,642 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:14,280 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:14,288 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:14,288 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:14,288 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:14,746 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:29:33,798 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:33,798 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:33,798 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:33,798 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:34,806 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:35,021 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:36,971 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:36,971 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:36,971 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:36,971 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:37,430 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:29:39,526 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:39,526 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:39,526 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:39,527 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:40,517 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:40,730 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:42,157 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:42,157 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:42,157 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:42,158 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:42,639 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers +2020-04-07 16:29:47,935 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:47,935 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:47,935 DEBUG gis.GISInterface [main,publishDBTable:268] Publish db table : postgis_db under ws : geona-proto, using geoserver AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:47,935 DEBUG gis.GISInterface [main,publishDBTable:269] Using AbstractGeoServerDescriptor [url=https://geona-proto.d4science.org/geoserver, user=admin, password=443876GS-GeoNAProto, layerCount=2] +2020-04-07 16:29:48,917 DEBUG gis.GISInterface [main,publishDBTable:280] Published data, enriching meta.. +2020-04-07 16:29:49,189 WARN gis.GISInterface [main,publishDBTable:290] Unabel to get Gis Link +org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Map Application Type - Resources not found in IS + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:108) + at org.gcube.portlets.user.uriresolvermanager.UriResolverManager.(UriResolverManager.java:136) + at org.gcube.spatial.data.geonetwork.iso.ISOMetadataFactory.getGisLinkByUUID(ISOMetadataFactory.java:294) + at org.gcube.spatial.data.gis.URIUtils.getGisLinkByUUID(URIUtils.java:39) + at org.gcube.spatial.data.gis.GISInterface.publishDBTable(GISInterface.java:288) + at org.gcube.application.geoportal.Uploader.publishLayer(Uploader.java:221) + at org.gcube.application.geoportal.db.LayerTest.main(LayerTest.java:86) +2020-04-07 16:29:50,768 WARN gis.GISInterface [main,getCurrentGeoServerDescriptor:667] *************** ACCESS TO DEPRECATED METHOD GeoServerDescriptor getCurrentGeoServerDescriptor(). Please update your code. +2020-04-07 16:29:50,776 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:50,776 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype +2020-04-07 16:29:50,776 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geona-proto.d4science.org/geoserver +2020-04-07 16:29:51,226 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 2 layers diff --git a/src/main/java/org/gcube/application/geoportal/ArchiveManager.java b/src/main/java/org/gcube/application/geoportal/ArchiveManager.java index 7451f6e..5bb4880 100644 --- a/src/main/java/org/gcube/application/geoportal/ArchiveManager.java +++ b/src/main/java/org/gcube/application/geoportal/ArchiveManager.java @@ -7,5 +7,5 @@ public interface ArchiveManager { public ArchiveDescriptor getByUUID(String UUID); public void store(ArchiveDescriptor desc); - + public void delete(ArchiveDescriptor desc); } diff --git a/src/main/java/org/gcube/application/geoportal/ArchiveManagerImpl.java b/src/main/java/org/gcube/application/geoportal/ArchiveManagerImpl.java index d90a485..097e1ff 100644 --- a/src/main/java/org/gcube/application/geoportal/ArchiveManagerImpl.java +++ b/src/main/java/org/gcube/application/geoportal/ArchiveManagerImpl.java @@ -37,5 +37,26 @@ public class ArchiveManagerImpl implements ArchiveManager { } } + private void deleteEntry(ArchiveDescriptor toDelete) { + EntityManager em=emf.createEntityManager(); + try { + em.getTransaction().begin(); + em.remove(toDelete); + em.getTransaction().commit(); + }finally { + em.close(); + } + } + + @Override + public void delete(ArchiveDescriptor desc) { + //for each layer + // delete Meta + // delete fte + // delete postgis table + // delete from WS + + // delete entry + } } diff --git a/src/main/java/org/gcube/application/geoportal/PostgisDBManager.java b/src/main/java/org/gcube/application/geoportal/PostgisDBManager.java index de40e6a..04e6bf1 100644 --- a/src/main/java/org/gcube/application/geoportal/PostgisDBManager.java +++ b/src/main/java/org/gcube/application/geoportal/PostgisDBManager.java @@ -148,6 +148,9 @@ public class PostgisDBManager { conn.createStatement().executeUpdate("DROP TABLE "+tableName); } + public void truncate(String tableName) throws SQLException{ + conn.createStatement().executeUpdate("TRUNCATE Table "+tableName); + } private static final void printRs(ResultSet rs) throws SQLException { diff --git a/src/main/java/org/gcube/application/geoportal/Uploader.java b/src/main/java/org/gcube/application/geoportal/Uploader.java index 539394c..ed39e20 100644 --- a/src/main/java/org/gcube/application/geoportal/Uploader.java +++ b/src/main/java/org/gcube/application/geoportal/Uploader.java @@ -23,7 +23,10 @@ import org.gcube.application.geoportal.model.DatabaseConnection; import org.gcube.application.geoportal.model.InvalidRecordException; import org.gcube.application.geoportal.model.LayerDescriptor; import org.gcube.application.geoportal.model.PostgisTable; +import org.gcube.application.geoportal.model.PostgisTable.BBOX; +import org.gcube.application.geoportal.model.PublishException; import org.gcube.application.geoportal.utils.CSV; +import org.gcube.application.geoportal.utils.Files; import org.gcube.spatial.data.geonetwork.GeoNetworkPublisher; import org.gcube.spatial.data.geonetwork.LoginLevel; import org.gcube.spatial.data.geonetwork.iso.tpl.ISOMetadataByTemplate; @@ -45,6 +48,7 @@ import org.gcube.spatial.data.geonetwork.iso.tpl.spatial.VectorRepresentation; import org.gcube.spatial.data.gis.GISInterface; import org.gcube.spatial.data.gis.is.GeoServerDescriptor; import org.gcube.spatial.data.gis.model.report.PublishResponse; +import org.gcube.spatial.data.gis.model.report.Report.OperationState; import org.geotoolkit.xml.XML; import org.opengis.metadata.Metadata; @@ -155,12 +159,15 @@ public class Uploader { } } + + + public static LayerDescriptor publishLayer(String csvLayer, PostgisTable.GeometryType expectedType,PostgisDBManager db,GISInterface gis, GeoNetworkPublisher geonetwork) throws Exception { PostgisTable table =CSV.persistCSVLayer(csvLayer, expectedType, db); - + db.commit(); String workspace = "geona-proto"; String storeName = "postgis_db"; @@ -178,9 +185,12 @@ public class Uploader { GSFeatureTypeEncoder fte=new GSFeatureTypeEncoder(); fte.setEnabled(true); - fte.setLatLonBoundingBox(-180.0, -90.0, 180.0, 90.0, DEFAULT_CRS); +// fte.setLatLonBoundingBox(-180.0, -90.0, 180.0, 90.0, DEFAULT_CRS); + BBOX bbox=table.getBoundingBox(); + fte.setLatLonBoundingBox(bbox.getMinLong(), bbox.getMinLat(), bbox.getMaxLong(), bbox.getMaxLat(), DEFAULT_CRS); fte.setName(table.getTablename()); - fte.setNativeCRS(DEFAULT_CRS); + fte.setTitle(Files.getName(csvLayer)); +// fte.setNativeCRS(DEFAULT_CRS); GSLayerEncoder le=new GSLayerEncoder(); @@ -216,7 +226,22 @@ public class Uploader { geonetwork.getCurrentUserConfiguration("dataset", "_none_"), LoginLevel.DEFAULT, false); - return null; + + log.debug("REsult : "+resp); + + if(resp.getDataOperationResult()!=OperationState.COMPLETE||resp.getMetaOperationResult()!=OperationState.COMPLETE) { + throw new PublishException("Outcome was not COMPLETE ",resp); + } + String metadataUUID=geonetwork.getInfo(resp.getReturnedMetaId()).getUuid(); + + return new LayerDescriptor( + UUID.randomUUID().toString(), + new ArchiveDescriptor("some", "some title"), + metadataUUID, + resp.getReturnedMetaId(), + fte.getName(), + workspace, + table.getTablename()); } diff --git a/src/main/java/org/gcube/application/geoportal/model/LayerDescriptor.java b/src/main/java/org/gcube/application/geoportal/model/LayerDescriptor.java index de5708f..cf11c80 100644 --- a/src/main/java/org/gcube/application/geoportal/model/LayerDescriptor.java +++ b/src/main/java/org/gcube/application/geoportal/model/LayerDescriptor.java @@ -5,13 +5,41 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import lombok.ToString; + @Entity +@Getter +@ToString +@RequiredArgsConstructor +@NoArgsConstructor +@AllArgsConstructor public class LayerDescriptor { @Id + @NonNull private String uuid; @ManyToOne @JoinColumn(name="archive_uuid", nullable=false) + @NonNull private ArchiveDescriptor archive; + + @Setter + private String metaUUID; + @Setter + private long metaID; + @Setter + private String layerName; + @Setter + private String geoserverWorkspace; + + + @Setter + private String table; } diff --git a/src/main/java/org/gcube/application/geoportal/model/PostgisTable.java b/src/main/java/org/gcube/application/geoportal/model/PostgisTable.java index cc16a65..914da56 100644 --- a/src/main/java/org/gcube/application/geoportal/model/PostgisTable.java +++ b/src/main/java/org/gcube/application/geoportal/model/PostgisTable.java @@ -127,7 +127,7 @@ public class PostgisTable { - @NonNull + @NonNull private String tablename; @NonNull private List fieldNames; @@ -139,6 +139,10 @@ public class PostgisTable { @Setter private BBOX boundingBox=null; + + public void setTablename(String tablename) { + this.tablename = sanitizeFieldName(tablename); + } public String getCreateStatement() { StringBuilder stmt=new StringBuilder(); diff --git a/src/main/java/org/gcube/application/geoportal/model/PublishException.java b/src/main/java/org/gcube/application/geoportal/model/PublishException.java new file mode 100644 index 0000000..15736f6 --- /dev/null +++ b/src/main/java/org/gcube/application/geoportal/model/PublishException.java @@ -0,0 +1,43 @@ +package org.gcube.application.geoportal.model; + +import org.gcube.spatial.data.gis.model.report.PublishResponse; + +import lombok.NonNull; + +public class PublishException extends Exception { + + /** + * + */ + private static final long serialVersionUID = -1356876669436308224L; + + @NonNull + private PublishResponse resp; + + public PublishException(PublishResponse resp) { + super(); + this.resp=resp; + } + + public PublishException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace,PublishResponse resp) { + super(message, cause, enableSuppression, writableStackTrace); + this.resp=resp; + } + + public PublishException(String message, Throwable cause,PublishResponse resp) { + super(message, cause); + this.resp=resp; + } + + public PublishException(String message,PublishResponse resp) { + super(message); + this.resp=resp; + } + + public PublishException(Throwable cause) { + super(cause); + // TODO Auto-generated constructor stub + } + + +} diff --git a/src/main/java/org/gcube/application/geoportal/utils/CSV.java b/src/main/java/org/gcube/application/geoportal/utils/CSV.java index 1122601..7b762f4 100644 --- a/src/main/java/org/gcube/application/geoportal/utils/CSV.java +++ b/src/main/java/org/gcube/application/geoportal/utils/CSV.java @@ -39,35 +39,58 @@ public class CSV { } + public static final PostgisTable updateTable(PostgisTable table, String csvPath, PostgisDBManager db, boolean clean) throws SQLException, IOException, DBInteractionException, DataParsingException { + CSVParser parser=null; + try { + log.debug("Updateing table "+table.getTablename()+" with "+csvPath); + parser=fromPath(csvPath); + if(clean) { + log.debug("Truncating existing"); + db.truncate(table.getTablename()); + } + return persist(parser,table,db); + + + }finally { + if(parser!=null&&!parser.isClosed()) + parser.close(); + } + } + + public static final PostgisTable persist(CSVParser source,PostgisTable target, PostgisDBManager db) throws IOException, SQLException, DBInteractionException, DataParsingException { + PreparedStatement ps=db.prepareInsertStatement(target, true); + log.debug("Inserting records.."); + long count=0l; + for(CSVRecord r:source.getRecords()) { + Map map=r.toMap(); + try { + target.fillPreparedStatement(map, ps); + count+=ps.executeUpdate(); + }catch(Throwable t) { + log.warn("Row in error : "+map); + throw t; + } + } + if(count!=source.getRecordNumber()) + throw new DBInteractionException("Incoherent number of inserted records : "+count+" / "+source.getRecordNumber()); + + log.debug("Evaluating extent.. "); + target.setBoundingBox(db.evaluateBoundingBox(target)); + return target; + } + + public static final PostgisTable persistCSVLayer(String csvFile,GeometryType type, PostgisDBManager db) throws FileNotFoundException, IOException, SQLException, DBInteractionException, DataParsingException { CSVParser parser=null; try { parser=fromPath(csvFile); PostgisTable toPersist= PostgisTable.fromCSVHeaders(parser.getHeaderNames(), type); - PreparedStatement ps=db.prepareInsertStatement(toPersist, true); - log.debug("Inserting records.."); - long count=0l; - for(CSVRecord r:parser.getRecords()) { - Map map=r.toMap(); - try { - toPersist.fillPreparedStatement(map, ps); - count+=ps.executeUpdate(); - }catch(Throwable t) { - log.warn("Row in error : "+map); - throw t; - } - } - if(count!=parser.getRecordNumber()) - throw new DBInteractionException("Incoherent number of inserted records : "+count+" / "+parser.getRecordNumber()); - - db.commit(); + toPersist.setTablename(Files.getName(csvFile)+"_"+toPersist.getTablename()); - //TODO UNCOMMENT THIS - //toPersist.setBoundingBox(db.evaluateBoundingBox(toPersist)); - return toPersist; + return persist(parser,toPersist,db); }finally { if(parser!=null&&!parser.isClosed()) parser.close(); diff --git a/src/main/java/org/gcube/application/geoportal/utils/Files.java b/src/main/java/org/gcube/application/geoportal/utils/Files.java index 6ebae7e..cae1dde 100644 --- a/src/main/java/org/gcube/application/geoportal/utils/Files.java +++ b/src/main/java/org/gcube/application/geoportal/utils/Files.java @@ -30,4 +30,11 @@ public class Files { return new String(encoded, encoding); } + + public static String getName(String path) { + + return path.substring((path.contains(File.separator)?path.lastIndexOf(File.separator)+1:0) + ,(path.contains(".")?path.lastIndexOf(".")-1:path.length())); + + } } diff --git a/src/main/java/org/gcube/application/geoportal/utils/Layers.java b/src/main/java/org/gcube/application/geoportal/utils/Layers.java new file mode 100644 index 0000000..9e8c6e6 --- /dev/null +++ b/src/main/java/org/gcube/application/geoportal/utils/Layers.java @@ -0,0 +1,33 @@ +package org.gcube.application.geoportal.utils; + +import org.gcube.application.geoportal.PostgisDBManager; +import org.gcube.application.geoportal.model.LayerDescriptor; +import org.gcube.spatial.data.geonetwork.LoginLevel; +import org.gcube.spatial.data.gis.GISInterface; +import org.gcube.spatial.data.gis.is.GeoServerDescriptor; + +public class Layers { + + + public static void deleteLayer(LayerDescriptor desc, GISInterface gis, GeoServerDescriptor geoserver,LoginLevel loginLevel, PostgisDBManager db) throws Exception { + + + // delete fte + gis.deleteLayer(desc.getGeoserverWorkspace(), desc.getLayerName(), desc.getMetaID(), geoserver, loginLevel); + + + + + // delete postgis table + db.deleteTable(desc.getTable()); + + db.commit(); + //TODO + // delete from WS + + + + } + + +} diff --git a/src/test/java/org/gcube/application/geoportal/db/LayerTest.java b/src/test/java/org/gcube/application/geoportal/db/LayerTest.java index 9cead10..2b2a598 100644 --- a/src/test/java/org/gcube/application/geoportal/db/LayerTest.java +++ b/src/test/java/org/gcube/application/geoportal/db/LayerTest.java @@ -1,11 +1,15 @@ package org.gcube.application.geoportal.db; +import java.io.File; +import java.io.FileFilter; import java.util.Map; import org.gcube.application.geoportal.PostgisDBManager; import org.gcube.application.geoportal.TokenSetter; import org.gcube.application.geoportal.Uploader; +import org.gcube.application.geoportal.model.LayerDescriptor; import org.gcube.application.geoportal.utils.CSV; +import org.gcube.application.geoportal.utils.Layers; import org.gcube.application.geoportal.utils.MainUtils; import org.gcube.spatial.data.geonetwork.GeoNetwork; import org.gcube.spatial.data.geonetwork.GeoNetworkPublisher; @@ -19,34 +23,75 @@ public class LayerTest { + "--DBPWD" + "--DBURL" + "--COMMIT" - + "--CSV"; - - - + + "--CSV_PATH | --CSV"; + + + public static void main(String[] args) throws Throwable { if(args.length<1) { System.out.println(USAGE); System.exit(0); } - + Map options=MainUtils.asMap(args); System.out.println("Options : "+options); + + // CHECK FILE(s) TO USE + + File[] toTest=null; + if(options.containsKey("CSV_PATH")) { + String path=MainUtils.getMandatory("CSV_PATH", options); + System.out.println("SCANNING "+path); + File csvFolder=new File(path); + toTest=csvFolder.listFiles(new FileFilter() { + + @Override + public boolean accept(File pathname) { + if(pathname.isDirectory()) return false; + return pathname.getName().endsWith(".csv"); + } + }); + }else { + toTest=new File[] {new File(MainUtils.getMandatory("CSV", options))}; + } + + + + + // SETUP EVERYTHING + System.out.println("PREPARING CONNECTIONS..."); + PostgisDBManager.init(MainUtils.getMandatory("DBURL",options), MainUtils.getMandatory("DBUSER",options), MainUtils.getMandatory("DBPWD",options)); - + PostgisDBManager db=PostgisDBManager.get(); - - String csvLayer=MainUtils.getMandatory("CSV", options); - - + TokenSetter.set("/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype"); - + GeoNetworkPublisher geonetwork= GeoNetwork.get(); - + geonetwork.login(LoginLevel.DEFAULT); - Uploader.publishLayer(csvLayer, CSV.getTypeFromPath(csvLayer), db, GISInterface.get(),geonetwork); + + GISInterface gis=GISInterface.get(); + + + + for(File f:toTest) { + + String csvLayer=f.getAbsolutePath(); + System.out.println("Publishing from file "+csvLayer); + + LayerDescriptor desc= Uploader.publishLayer(csvLayer, CSV.getTypeFromPath(csvLayer), db, gis,geonetwork); + + System.out.println("Created "+desc); + + Layers.deleteLayer(desc, gis, gis.getCurrentGeoServerDescriptor(), LoginLevel.DEFAULT, db); + System.out.println("DELETED"); + } } + + }