diff --git a/pom.xml b/pom.xml
index 1003051..d71d80d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,8 @@
org.gcube.tools
1.1.0-SNAPSHOT
-
-
+
+
scm:git:${gitBaseUrl}/${project.artifactId}.git
scm:git:${gitBaseUrl}/${project.artifactId}.git
@@ -58,11 +58,11 @@
-
- com.fasterxml.jackson.datatype
- jackson-datatype-jsr310
- 2.8.8
-
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ 2.8.8
+
@@ -94,8 +94,15 @@
org.gcube.spatial.data
sdi-library
- [1.0.0-SNAPSHOT,2.0.0)
+ [1.0.0,2.0.0)
+
+ org.gcube.data.transfer
+ data-transfer-library
+ [1.2.1,2.0.0]
+
+
+
org.gcube.spatial.data
gis-interface
@@ -115,6 +122,8 @@
+
+
junit
@@ -122,13 +131,18 @@
4.11
test
+
+ org.apache.logging.log4j
+ log4j-slf4j18-impl
+ 2.13.3
+ test
+
-
-
-
-
-
-
+
+
+
+
+
diff --git a/report.fulllog b/report.fulllog
index 5d19768..f76618b 100644
--- a/report.fulllog
+++ b/report.fulllog
@@ -453,3 +453,100 @@ org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException: Ma
2020-04-07 17:29:30,033 TRACE is.CachedGeoServerDescriptor [main,getWorkspaces:82] Loading workspaces for https://geona-proto.d4science.org/geoserver
2020-04-07 17:29:30,507 DEBUG is.CachedGeoServerDescriptor [main,getWorkspaces:84] Found 1 workspaces
2020-04-07 17:29:31,000 DEBUG is.CachedGeoServerDescriptor [main,getDatastores:42] Found 3 ds in geona-proto ws
+2020-10-20 14:50:56,493 INFO impl.ScopeProviderScanner [main,provider:50] using scope provider org.gcube.common.scope.impl.DefaultScopeProvider@12bc6874
+2020-10-20 14:50:56,509 DEBUG impl.DefaultScopeProvider [main,set:38] setting scope /gcube/devNext/NextNext in thread 1
+2020-10-20 14:50:57,244 TRACE managers.AbstractRecordManager [main,commit:91] Committing record Concessione(super=Record(id=0, recordType=CONCESSIONE, version=1.0.0, licenzaID=CC-BY, nome=My test thing, folderId=null, lastUpdateTime=2020-10-20T12:50:56.512Z, lastUpdateUser=null, creationTime=2020-10-20T12:50:56.512Z, creationUser=my author), introduzione=This is my project, descrizioneContenuto=It contains this and that, authors=[Some one, Some, oneelse], contributore=Contrib 1, titolari=[Some one, Some, oneelse], responsabile=Someone, editore=Editore, fontiFinanziamento=[Big pharma, Pentagon], soggetto=[Research Excavation, Archeology], risorseCorrelate=null, dataInizioProgetto=2020-10-20T12:50:56.512Z, dataFineProgetto=2020-10-20T12:50:56.512Z, titolareLicenza=Qualcun altro, titolareCopyright=Chiedilo in giro, paroleChiaveLibere=[Robba, Stuff], paroleChiaveICCD=[vattelapesca, somthing something], centroidLat=180.0, centroidLong=90.0, relazioneScavo=RelazioneScavo(super=AssociatedContent(id=0, policy=OPEN, licenseID=CC-BY, titolo=My test thing relazione scavo, creationTime=2020-10-20T12:50:57.125Z, record=null, actualContent=[]), abstractSection=simple abstract section, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology]), immaginiRappresentative=[UploadedImage(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My image number 0, creationTime=2020-10-20T12:50:57.152Z, record=null, actualContent=[]), didascalia=You can see my image number 0, format=TIFF, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology]), UploadedImage(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My image number 1, creationTime=2020-10-20T12:50:57.152Z, record=null, actualContent=[]), didascalia=You can see my image number 1, format=TIFF, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology]), UploadedImage(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My image number 2, creationTime=2020-10-20T12:50:57.152Z, record=null, actualContent=[]), didascalia=You can see my image number 2, format=TIFF, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology]), UploadedImage(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My image number 3, creationTime=2020-10-20T12:50:57.152Z, record=null, actualContent=[]), didascalia=You can see my image number 3, format=TIFF, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology]), UploadedImage(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My image number 4, creationTime=2020-10-20T12:50:57.152Z, record=null, actualContent=[]), didascalia=You can see my image number 4, format=TIFF, responsabili=[Some one, Some, oneelse], soggetto=[Research Excavation, Archeology])], posizionamentoScavo=LayerConcessione(super=SDILayerDescriptor(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My test thing posizionamento area scavo, creationTime=null, record=null, actualContent=[]), layerUUID=null, layerID=null, layerName=null, wmsLink=null), abstractSection=My abstract, topicCategory=Society, subTopic=Archeology, bbox=BBOX(maxLat=90.0, maxLong=180.0, minLat=-90.0, minLong=-180.0), valutazioneQualita=Secondo me si, metodoRaccoltaDati=Fattobbene, scalaAcquisizione=1:10000, authors=[Some one, Some, oneelse]), pianteFineScavo=[LayerConcessione(super=SDILayerDescriptor(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My test thing pianta area scavo, creationTime=null, record=null, actualContent=[]), layerUUID=null, layerID=null, layerName=null, wmsLink=null), abstractSection=My abstract, topicCategory=Society, subTopic=Archeology, bbox=BBOX(maxLat=90.0, maxLong=180.0, minLat=-90.0, minLong=-180.0), valutazioneQualita=Secondo me si, metodoRaccoltaDati=Fattobbene, scalaAcquisizione=1:10000, authors=[Some one, Some, oneelse]), LayerConcessione(super=SDILayerDescriptor(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My test thing pianta area scavo, creationTime=null, record=null, actualContent=[]), layerUUID=null, layerID=null, layerName=null, wmsLink=null), abstractSection=My abstract, topicCategory=Society, subTopic=Archeology, bbox=BBOX(maxLat=90.0, maxLong=180.0, minLat=-90.0, minLong=-180.0), valutazioneQualita=Secondo me si, metodoRaccoltaDati=Fattobbene, scalaAcquisizione=1:10000, authors=[Some one, Some, oneelse]), LayerConcessione(super=SDILayerDescriptor(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My test thing pianta area scavo, creationTime=null, record=null, actualContent=[]), layerUUID=null, layerID=null, layerName=null, wmsLink=null), abstractSection=My abstract, topicCategory=Society, subTopic=Archeology, bbox=BBOX(maxLat=90.0, maxLong=180.0, minLat=-90.0, minLong=-180.0), valutazioneQualita=Secondo me si, metodoRaccoltaDati=Fattobbene, scalaAcquisizione=1:10000, authors=[Some one, Some, oneelse]), LayerConcessione(super=SDILayerDescriptor(super=AssociatedContent(id=0, policy=null, licenseID=CC-BY, titolo=My test thing pianta area scavo, creationTime=null, record=null, actualContent=[]), layerUUID=null, layerID=null, layerName=null, wmsLink=null), abstractSection=My abstract, topicCategory=Society, subTopic=Archeology, bbox=BBOX(maxLat=90.0, maxLong=180.0, minLat=-90.0, minLong=-180.0), valutazioneQualita=Secondo me si, metodoRaccoltaDati=Fattobbene, scalaAcquisizione=1:10000, authors=[Some one, Some, oneelse])], genericContent=[]) Publish is true
+2020-10-20 14:50:57,244 DEBUG managers.AbstractRecordManager [main,commit:95] Record is valid, storing changed content
+2020-10-20 14:50:57,247 DEBUG storage.ContentHandler [main,storeChanges:92] Starting to persist 8 resources My test thing
+2020-10-20 14:50:57,253 DEBUG storage.SDIManager [main,:34] Initializing GIS Interface..
+2020-10-20 14:50:57,267 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:57,267 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /gcube/devNext/NextNext
+2020-10-20 14:50:57,280 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer
+2020-10-20 14:50:57,605 INFO scan.DefaultScanner [main,scan:63] matched 19 resources from 183 urls in 246 ms
+2020-10-20 14:50:57,621 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/socialisti.servicemap
+2020-10-20 14:50:57,628 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/devsec.servicemap
+2020-10-20 14:50:57,629 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/edison.servicemap
+2020-10-20 14:50:57,631 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/farm.servicemap
+2020-10-20 14:50:57,632 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/sobigdata.servicemap
+2020-10-20 14:50:57,634 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/openaire.servicemap
+2020-10-20 14:50:57,637 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/gcube.servicemap
+2020-10-20 14:50:57,639 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/smartarea.servicemap
+2020-10-20 14:50:57,641 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/preprodold.servicemap
+2020-10-20 14:50:57,642 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4science.servicemap
+2020-10-20 14:50:57,643 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4os.servicemap
+2020-10-20 14:50:57,645 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/gcubeapps.servicemap
+2020-10-20 14:50:57,646 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/isti.servicemap
+2020-10-20 14:50:57,649 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/devnext.servicemap
+2020-10-20 14:50:57,650 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/parthenosvo.servicemap
+2020-10-20 14:50:57,652 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/cnr.servicemap
+2020-10-20 14:50:57,654 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4research.servicemap
+2020-10-20 14:50:57,655 INFO impl.ServiceMapScanner [main,maps:62] overwriting older map (v.1.2.2-SNAPSHOT) with newer map (v.1.2.2-SNAPSHOT) for /d4science.research-infrastructures.eu/D4Research
+2020-10-20 14:50:57,656 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/pred4s.servicemap
+2020-10-20 14:50:57,657 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/preprod.servicemap
+2020-10-20 14:50:57,659 INFO icclient.ICClient [main,getStub:76] connecting to https://ic-devnext.dev.d4science.org/collector/search
+2020-10-20 14:50:57,663 INFO icclient.ICClient [main,callService:58] executing query declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; for $resource in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource where ($resource/Profile/Category/text() eq 'Gis') and ($resource/Profile/Platform/Name/text() eq 'GeoServer') return $resource/Profile/AccessPoint
+2020-10-20 14:50:57,671 INFO icclient.Helper [main,queryAddAuthenticationControl:200] submitting filtered query: declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; declare namespace functx = "http://www.functx.com"; declare function functx:is-value-in-sequence ( $value as xs:anyAtomicType? , $seq as xs:anyAtomicType* ) as xs:boolean { $value = $seq } ; for $entry0ValueAuth in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource/Scopes where (functx:is-value-in-sequence('/gcube/devNext/NextNext',$entry0ValueAuth/child::*[local-name()='Scope']/text())) and ( ($entry0ValueAuth/../Profile/Category/text() eq 'Gis') and ($entry0ValueAuth/../Profile/Platform/Name/text() eq 'GeoServer') ) return $entry0ValueAuth/../Profile/AccessPoint
+2020-10-20 14:50:58,201 INFO icclient.ICClient [main,callService:66] executed query declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; for $resource in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource where ($resource/Profile/Category/text() eq 'Gis') and ($resource/Profile/Platform/Name/text() eq 'GeoServer') return $resource/Profile/AccessPoint in 537 ms
+2020-10-20 14:50:58,278 TRACE cache.ISGeoServerCache [main,getTheCache:40] Retrieved 1 instances in /gcube/devNext/NextNext
+2020-10-20 14:50:58,278 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:58,278 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /gcube/devNext/NextNext
+2020-10-20 14:50:58,279 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:58,279 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /gcube/devNext/NextNext
+2020-10-20 14:50:58,280 TRACE is.CachedGeoServerDescriptor [main,getHostedLayersCount:55] Loading layer count for https://geoserver1.dev.d4science.org/geoserver
+2020-10-20 14:50:58,620 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 0 layers
+2020-10-20 14:50:58,620 DEBUG storage.SDIManager [main,:40] Found geoserver descriptor AbstractGeoServerDescriptor [url=https://geoserver1.dev.d4science.org/geoserver, user=admin, password=GS-d3v-98751, layerCount=0]
+2020-10-20 14:50:58,621 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:58,621 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:58,621 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /gcube/devNext/NextNext
+2020-10-20 14:50:58,621 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:50:58,621 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /gcube/devNext/NextNext
+2020-10-20 14:50:58,621 DEBUG storage.SDIManager [main,:43] Contacting Data Transfer from geoserver geoserver1.dev.d4science.org
+2020-10-20 14:50:58,622 DEBUG library.DataTransferClient [main,getInstanceByEndpoint:37] Getting transferer for endpoint : geoserver1.dev.d4science.org
+2020-10-20 14:50:58,623 DEBUG transferers.TransfererBuilder [main,getTransfererByHost:30] Get transferer by Host geoserver1.dev.d4science.org
+2020-10-20 14:52:27,418 INFO impl.ScopeProviderScanner [main,provider:50] using scope provider org.gcube.common.scope.impl.DefaultScopeProvider@12bc6874
+2020-10-20 14:52:27,425 DEBUG impl.DefaultScopeProvider [main,set:38] setting scope /gcube/devNext/NextNext in thread 1
+2020-10-20 14:52:28,147 DEBUG managers.AbstractRecordManager [main,commit:95] Record is valid, storing changed content
+2020-10-20 14:52:28,147 DEBUG storage.ContentHandler [main,storeChanges:92] Starting to persist 8 resources My test thing
+2020-10-20 14:52:28,155 DEBUG storage.SDIManager [main,:34] Initializing GIS Interface..
+2020-10-20 14:52:28,168 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:28,168 DEBUG cache.ISGeoServerCache [main,getTheCache:37] Going to retrieve information from IS. Scope is /gcube/devNext/NextNext
+2020-10-20 14:52:28,180 DEBUG cache.ISGeoServerCache [main,queryforGeoServer:69] Querying IS for service profiles category Gis , name GeoServer
+2020-10-20 14:52:28,559 INFO scan.DefaultScanner [main,scan:63] matched 19 resources from 183 urls in 294 ms
+2020-10-20 14:52:28,581 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/socialisti.servicemap
+2020-10-20 14:52:28,590 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/devsec.servicemap
+2020-10-20 14:52:28,592 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/edison.servicemap
+2020-10-20 14:52:28,593 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/farm.servicemap
+2020-10-20 14:52:28,595 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/sobigdata.servicemap
+2020-10-20 14:52:28,597 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/openaire.servicemap
+2020-10-20 14:52:28,599 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/gcube.servicemap
+2020-10-20 14:52:28,604 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/smartarea.servicemap
+2020-10-20 14:52:28,606 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/preprodold.servicemap
+2020-10-20 14:52:28,607 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4science.servicemap
+2020-10-20 14:52:28,609 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4os.servicemap
+2020-10-20 14:52:28,610 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/gcubeapps.servicemap
+2020-10-20 14:52:28,611 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/isti.servicemap
+2020-10-20 14:52:28,612 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/devnext.servicemap
+2020-10-20 14:52:28,614 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/parthenosvo.servicemap
+2020-10-20 14:52:28,616 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/cnr.servicemap
+2020-10-20 14:52:28,626 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/d4research.servicemap
+2020-10-20 14:52:28,628 INFO impl.ServiceMapScanner [main,maps:62] overwriting older map (v.1.2.2-SNAPSHOT) with newer map (v.1.2.2-SNAPSHOT) for /d4science.research-infrastructures.eu/D4Research
+2020-10-20 14:52:28,629 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/pred4s.servicemap
+2020-10-20 14:52:28,630 INFO impl.ServiceMapScanner [main,maps:52] loading jar:file:/Users/FabioISTI/.m2/repository/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-SNAPSHOT.jar!/preprod.servicemap
+2020-10-20 14:52:28,633 INFO icclient.ICClient [main,getStub:76] connecting to https://ic-devnext.dev.d4science.org/collector/search
+2020-10-20 14:52:28,641 INFO icclient.ICClient [main,callService:58] executing query declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; for $resource in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource where ($resource/Profile/Category/text() eq 'Gis') and ($resource/Profile/Platform/Name/text() eq 'GeoServer') return $resource/Profile/AccessPoint
+2020-10-20 14:52:28,647 INFO icclient.Helper [main,queryAddAuthenticationControl:200] submitting filtered query: declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; declare namespace functx = "http://www.functx.com"; declare function functx:is-value-in-sequence ( $value as xs:anyAtomicType? , $seq as xs:anyAtomicType* ) as xs:boolean { $value = $seq } ; for $entry0ValueAuth in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource/Scopes where (functx:is-value-in-sequence('/gcube/devNext/NextNext',$entry0ValueAuth/child::*[local-name()='Scope']/text())) and ( ($entry0ValueAuth/../Profile/Category/text() eq 'Gis') and ($entry0ValueAuth/../Profile/Platform/Name/text() eq 'GeoServer') ) return $entry0ValueAuth/../Profile/AccessPoint
+2020-10-20 14:52:29,275 INFO icclient.ICClient [main,callService:66] executed query declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; for $resource in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource where ($resource/Profile/Category/text() eq 'Gis') and ($resource/Profile/Platform/Name/text() eq 'GeoServer') return $resource/Profile/AccessPoint in 634 ms
+2020-10-20 14:52:29,299 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:29,299 DEBUG cache.ISGeoServerCache [main,setUpdated:58] Setting update for scope /gcube/devNext/NextNext
+2020-10-20 14:52:29,299 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:29,299 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /gcube/devNext/NextNext
+2020-10-20 14:52:29,733 DEBUG is.CachedGeoServerDescriptor [main,getHostedLayersCount:57] Found 0 layers
+2020-10-20 14:52:29,733 DEBUG storage.SDIManager [main,:40] Found geoserver descriptor AbstractGeoServerDescriptor [url=https://geoserver1.dev.d4science.org/geoserver, user=admin, password=GS-d3v-98751, layerCount=0]
+2020-10-20 14:52:29,733 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:29,733 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:29,733 DEBUG cache.ISGeoServerCache [main,getLastUpdate:52] Accessing lastUpdate in scope /gcube/devNext/NextNext
+2020-10-20 14:52:29,734 DEBUG utils.ScopeUtils [main,getCurrentScope:31] Found scope provider /gcube/devNext/NextNext, skipping token
+2020-10-20 14:52:29,734 DEBUG cache.GeoServerCache [main,getDescriptor:39] Access to MOSTUNLOAD instance in /gcube/devNext/NextNext
+2020-10-20 14:52:29,734 DEBUG storage.SDIManager [main,:43] Contacting Data Transfer from geoserver geoserver1.dev.d4science.org
+2020-10-20 14:52:29,734 DEBUG library.DataTransferClient [main,getInstanceByEndpoint:37] Getting transferer for endpoint : geoserver1.dev.d4science.org
+2020-10-20 14:52:29,736 DEBUG transferers.TransfererBuilder [main,getTransfererByHost:30] Get transferer by Host geoserver1.dev.d4science.org
diff --git a/src/main/java/org/gcube/application/geoportal/PostgisTableFactory.java b/src/main/java/org/gcube/application/geoportal/PostgisTableFactory.java
index 172238a..4c7339c 100644
--- a/src/main/java/org/gcube/application/geoportal/PostgisTableFactory.java
+++ b/src/main/java/org/gcube/application/geoportal/PostgisTableFactory.java
@@ -60,7 +60,6 @@ public class PostgisTableFactory {
log.debug("Creating table from CSV FILE "+csvFile);
parser=CSV.fromPath(csvFile);
-
// Getting type
GeometryType type=GeometryType.POINT;
if(csvFile.contains("linee"))
diff --git a/src/main/java/org/gcube/application/geoportal/managers/AbstractRecordManager.java b/src/main/java/org/gcube/application/geoportal/managers/AbstractRecordManager.java
index 43716ac..5ca14b2 100644
--- a/src/main/java/org/gcube/application/geoportal/managers/AbstractRecordManager.java
+++ b/src/main/java/org/gcube/application/geoportal/managers/AbstractRecordManager.java
@@ -93,14 +93,12 @@ public abstract class AbstractRecordManager {
// storeInfo(theRecord);
log.debug("Record is valid, storing changed content");
- contentHandler.storeChanges();
+ contentHandler.storeChanges(publish);
storeInfo(theRecord);
if(publish) {
log.debug("Registering centroid of "+theRecord);
registerCentroid();
- log.debug("Publishing changed content of "+theRecord);
- publish();
storeInfo(theRecord);
}
@@ -122,9 +120,10 @@ public abstract class AbstractRecordManager {
log.debug("Inserting / updated centroid Row {} ",centroidRow);
PreparedStatement ps = db.prepareInsertStatement(centroidsTable, true, true);
-
+
centroidsTable.fillCSVPreparedStatament(centroidRow, ps, false);
ps.executeUpdate();
+ db.commit();
}catch(SQLException e) {
throw new PublishException("Unable to publish centroid.",e, null);
}
diff --git a/src/main/java/org/gcube/application/geoportal/managers/ConcessioneManager.java b/src/main/java/org/gcube/application/geoportal/managers/ConcessioneManager.java
index 4a5c786..ec59db0 100644
--- a/src/main/java/org/gcube/application/geoportal/managers/ConcessioneManager.java
+++ b/src/main/java/org/gcube/application/geoportal/managers/ConcessioneManager.java
@@ -1,7 +1,6 @@
package org.gcube.application.geoportal.managers;
import java.io.IOException;
-import java.time.temporal.ChronoField;
import java.util.HashMap;
import java.util.Map;
@@ -100,8 +99,8 @@ public class ConcessioneManager extends AbstractRecordManager {
// CENTROID
Map centroidsRow=new HashMap();
-// centroidsRow.put(DBConstants.Concessioni.UUID, toRegister.getId()+"");
- centroidsRow.put(DBConstants.Concessioni.ANNO, record.getDataInizioProgetto().get(ChronoField.YEAR)+"");
+ centroidsRow.put(DBConstants.Concessioni.ID, record.getId()+"");
+ centroidsRow.put(DBConstants.Concessioni.ANNO, record.getDataInizioProgetto().getYear()+"");
centroidsRow.put(DBConstants.Concessioni.NOME, record.getNome());
centroidsRow.put(DBConstants.Concessioni.REGIONE, "");
centroidsRow.put(DBConstants.Defaults.XCOORD_FIELD, record.getCentroidLong()+"");
@@ -123,7 +122,7 @@ public class ConcessioneManager extends AbstractRecordManager {
centroidsRow.put(DBConstants.Concessioni.VERSIONE,record.getVersion());
centroidsRow.put(DBConstants.Concessioni.LICENZA,record.getLicenzaID());
centroidsRow.put(DBConstants.Concessioni.TITOLARE_LICENZA,record.getTitolareLicenza());
-//TODO centroidsRow.put(DBConstants.Concessioni.ACCESSO,r.get("accesso_dati"));
+ centroidsRow.put(DBConstants.Concessioni.ACCESSO,record.getAccesso().toString());
centroidsRow.put(DBConstants.Concessioni.PAROLE_CHIAVE,Serialization.asString(record.getParoleChiaveLibere()));
return centroidsRow;
diff --git a/src/main/java/org/gcube/application/geoportal/model/AccessType.java b/src/main/java/org/gcube/application/geoportal/model/AccessType.java
new file mode 100644
index 0000000..4cea235
--- /dev/null
+++ b/src/main/java/org/gcube/application/geoportal/model/AccessType.java
@@ -0,0 +1,7 @@
+package org.gcube.application.geoportal.model;
+
+public enum AccessType {
+
+ OPEN_ACCESS,RESTRICTED,EMBARGOED
+
+}
diff --git a/src/main/java/org/gcube/application/geoportal/model/Record.java b/src/main/java/org/gcube/application/geoportal/model/Record.java
index 6813431..7443ae5 100644
--- a/src/main/java/org/gcube/application/geoportal/model/Record.java
+++ b/src/main/java/org/gcube/application/geoportal/model/Record.java
@@ -1,6 +1,6 @@
package org.gcube.application.geoportal.model;
-import java.time.Instant;
+import java.time.LocalDateTime;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
@@ -40,6 +40,7 @@ public abstract class Record {
protected RecordType recordType;
protected String version="1.0.0";
protected String licenzaID="CC-BY";
+ protected AccessType accesso=AccessType.OPEN_ACCESS;
//Nome del progetto
protected String nome;
@@ -48,9 +49,9 @@ public abstract class Record {
protected String folderId;
//Accounting
- protected Instant lastUpdateTime;
+ protected LocalDateTime lastUpdateTime;
protected String lastUpdateUser;
- protected Instant creationTime;
+ protected LocalDateTime creationTime;
protected String creationUser;
diff --git a/src/main/java/org/gcube/application/geoportal/model/concessioni/Concessione.java b/src/main/java/org/gcube/application/geoportal/model/concessioni/Concessione.java
index b149c15..b565fc2 100644
--- a/src/main/java/org/gcube/application/geoportal/model/concessioni/Concessione.java
+++ b/src/main/java/org/gcube/application/geoportal/model/concessioni/Concessione.java
@@ -1,6 +1,6 @@
package org.gcube.application.geoportal.model.concessioni;
-import java.time.Instant;
+import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -57,8 +57,8 @@ public class Concessione extends Record{
private List risorseCorrelate;
- private Instant dataInizioProgetto;
- private Instant dataFineProgetto;
+ private LocalDateTime dataInizioProgetto;
+ private LocalDateTime dataFineProgetto;
private String titolareLicenza;
private String titolareCopyright;
diff --git a/src/main/java/org/gcube/application/geoportal/model/content/AssociatedContent.java b/src/main/java/org/gcube/application/geoportal/model/content/AssociatedContent.java
index f0b7f4f..227e056 100644
--- a/src/main/java/org/gcube/application/geoportal/model/content/AssociatedContent.java
+++ b/src/main/java/org/gcube/application/geoportal/model/content/AssociatedContent.java
@@ -1,6 +1,6 @@
package org.gcube.application.geoportal.model.content;
-import java.time.Instant;
+import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -42,7 +42,7 @@ public abstract class AssociatedContent {
private AccessPolicy policy;
private String licenseID;
private String titolo;
- private Instant creationTime;
+ private LocalDateTime creationTime;
@ManyToOne
private Record record;
diff --git a/src/main/java/org/gcube/application/geoportal/model/db/DBConstants.java b/src/main/java/org/gcube/application/geoportal/model/db/DBConstants.java
index 98b406e..c5c64c2 100644
--- a/src/main/java/org/gcube/application/geoportal/model/db/DBConstants.java
+++ b/src/main/java/org/gcube/application/geoportal/model/db/DBConstants.java
@@ -34,7 +34,7 @@ public class DBConstants {
*/
public static class Concessioni{
- public static final String UUID="uuid";
+ public static final String ID="id";
public static final String NOME="nome";
public static final String ANNO="anno";
public static final String REGIONE="regione";
@@ -67,7 +67,7 @@ public class DBConstants {
static {
CENTROIDS.getFields().add(new Field(Defaults.INTERNAL_ID,FieldType.AUTOINCREMENT));
- CENTROIDS.getFields().add(new Field(UUID,FieldType.TEXT));
+ CENTROIDS.getFields().add(new Field(ID,FieldType.TEXT));
CENTROIDS.getFields().add(new Field(NOME,FieldType.TEXT));
CENTROIDS.getFields().add(new Field(ANNO,FieldType.INT));
CENTROIDS.getFields().add(new Field(REGIONE,FieldType.TEXT));
diff --git a/src/main/java/org/gcube/application/geoportal/model/fault/SDIInteractionException.java b/src/main/java/org/gcube/application/geoportal/model/fault/SDIInteractionException.java
new file mode 100644
index 0000000..ebd6dc3
--- /dev/null
+++ b/src/main/java/org/gcube/application/geoportal/model/fault/SDIInteractionException.java
@@ -0,0 +1,39 @@
+package org.gcube.application.geoportal.model.fault;
+
+public class SDIInteractionException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public SDIInteractionException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ public SDIInteractionException(String message, Throwable cause, boolean enableSuppression,
+ boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ // TODO Auto-generated constructor stub
+ }
+
+ public SDIInteractionException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ public SDIInteractionException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ public SDIInteractionException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+
+
+
+}
diff --git a/src/main/java/org/gcube/application/geoportal/storage/ContentHandler.java b/src/main/java/org/gcube/application/geoportal/storage/ContentHandler.java
index a9cd8d3..6b45909 100644
--- a/src/main/java/org/gcube/application/geoportal/storage/ContentHandler.java
+++ b/src/main/java/org/gcube/application/geoportal/storage/ContentHandler.java
@@ -1,11 +1,7 @@
package org.gcube.application.geoportal.storage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStream;
-import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@@ -19,15 +15,10 @@ import org.gcube.application.geoportal.model.content.AssociatedContent;
import org.gcube.application.geoportal.model.content.OtherContent;
import org.gcube.application.geoportal.model.content.PersistedContent;
import org.gcube.application.geoportal.model.content.UploadedImage;
-import org.gcube.application.geoportal.model.content.WorkspaceContent;
import org.gcube.application.geoportal.model.fault.PersistenceException;
import org.gcube.application.geoportal.model.gis.SDILayerDescriptor;
import org.gcube.application.geoportal.utils.Files;
-import org.gcube.application.geoportal.utils.Serialization;
-import org.gcube.application.geoportal.utils.Workspace;
-import org.gcube.common.storagehub.client.dsl.FileContainer;
import org.gcube.common.storagehub.client.dsl.FolderContainer;
-import org.gcube.common.storagehub.client.dsl.StorageHubClient;
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
import lombok.Data;
@@ -93,7 +84,7 @@ public class ContentHandler {
}
- public void storeChanges() throws PersistenceException {
+ public void storeChanges(Boolean publish) throws PersistenceException {
//
@@ -101,6 +92,10 @@ public class ContentHandler {
log.debug("Starting to persist "+uploadedResources.size()+" resources "+record.getNome());
WorkspaceManager wsManager=new WorkspaceManager(record);
+ SDIManager sdiManager=null;
+ if(publish)
+ sdiManager=new SDIManager();
+
for(Entry> entry:uploadedResources.entrySet()) {
AssociatedContent content=entry.getKey();
@@ -121,8 +116,20 @@ public class ContentHandler {
if(content instanceof LayerConcessione) {
destination= wsManager.getSubFolder("layers/"+content.getTitolo());
description="Layer concessione : "+content.getTitolo();
+
+ if(publish) {
+ for(TempFile theFile : entry.getValue()) {
+ persisted.add(sdiManager.pushLayerFile(theFile.getTheFile(), theFile.getOriginalFileName(), record.getId(), content.getId()));
+ }
+ //TODO
+ //Layer registration
+ // GS + GN
+
+ }
+
}else throw new Exception("Invalid SDI Content "+content);
+
}else if (content instanceof OtherContent ) {
destination= wsManager.getSubFolder("other/"+content.getTitolo());
description= "Other content : "+content.getTitolo();
@@ -146,29 +153,6 @@ public class ContentHandler {
}
-// public void publishContent() {
-// log.debug("Publishing updated content into SDI ");
-// //TODO
-// for(Entry> entry:uploadedResources.entrySet()) {
-// AssociatedContent content=entry.getKey();
-//
-// if (content instanceof SDILayerDescriptor) {
-// //SDI Section
-// SDILayerDescriptor layer=(SDILayerDescriptor)content;
-// log.debug("Publishing "+layer);
-// if(content instanceof LayerConcessione) {
-// // Upload Files to geoserver
-//
-//
-// }else throw new Exception("Invalid SDI Content "+content);
-//
-// }
-// }
-//
-//
-//
-// }
-//
@Override
protected void finalize() throws Throwable {
diff --git a/src/main/java/org/gcube/application/geoportal/storage/GeoServerManager.java b/src/main/java/org/gcube/application/geoportal/storage/GeoServerManager.java
deleted file mode 100644
index 1d8f92f..0000000
--- a/src/main/java/org/gcube/application/geoportal/storage/GeoServerManager.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.gcube.application.geoportal.storage;
-
-public class GeoServerManager {
-
- public GeoServerManager() {
- // TODO Auto-generated constructor stub
- }
-
-}
diff --git a/src/main/java/org/gcube/application/geoportal/storage/SDIManager.java b/src/main/java/org/gcube/application/geoportal/storage/SDIManager.java
new file mode 100644
index 0000000..966a2e4
--- /dev/null
+++ b/src/main/java/org/gcube/application/geoportal/storage/SDIManager.java
@@ -0,0 +1,78 @@
+package org.gcube.application.geoportal.storage;
+
+import java.io.File;
+import java.net.URL;
+
+import org.gcube.application.geoportal.model.content.GeoServerContent;
+import org.gcube.application.geoportal.model.fault.SDIInteractionException;
+import org.gcube.data.transfer.library.DataTransferClient;
+import org.gcube.data.transfer.library.TransferResult;
+import org.gcube.data.transfer.library.faults.DestinationNotSetException;
+import org.gcube.data.transfer.library.faults.FailedTransferException;
+import org.gcube.data.transfer.library.faults.InitializationException;
+import org.gcube.data.transfer.library.faults.InvalidDestinationException;
+import org.gcube.data.transfer.library.faults.InvalidSourceException;
+import org.gcube.data.transfer.library.faults.SourceNotSetException;
+import org.gcube.data.transfer.model.Destination;
+import org.gcube.data.transfer.model.DestinationClashPolicy;
+import org.gcube.spatial.data.gis.GISInterface;
+import org.gcube.spatial.data.gis.is.AbstractGeoServerDescriptor;
+
+import lombok.extern.log4j.Log4j2;
+import lombok.extern.slf4j.Slf4j;
+
+
+@Slf4j
+public class SDIManager {
+
+ private GISInterface gis;
+ private DataTransferClient dtGeoServer;
+ private String geoserverHostName;
+
+
+ public SDIManager() throws SDIInteractionException {
+ try{
+ log.debug("Initializing GIS Interface..");
+ gis=GISInterface.get();
+ AbstractGeoServerDescriptor geoserver=gis.getCurrentGeoServer();
+ if(geoserver==null)
+ throw new Exception("Unable to contact data transfer for geoserver ");
+
+ log.debug("Found geoserver descriptor "+geoserver);
+ geoserverHostName=new URL(gis.getCurrentGeoServer().getUrl()).getHost();
+
+ log.debug("Contacting Data Transfer from geoserver {} ",geoserverHostName);
+ dtGeoServer=DataTransferClient.getInstanceByEndpoint("http://"+geoserverHostName);
+
+ }catch(Exception e) {
+ throw new SDIInteractionException("Unable to initialize SDI Manager",e);
+ }
+ }
+
+
+
+ // GEOSERVER-PERSISTENCE-ID / GNA / PROJECT-ID /LAYER-ID/ FILENAME
+
+ public GeoServerContent pushLayerFile(File theFile, String filename, long projectID, long layerID) throws SDIInteractionException {
+ try {
+
+ Destination destination=new Destination(filename);
+ destination.setCreateSubfolders(true);
+ destination.setOnExistingFileName(DestinationClashPolicy.REWRITE);
+ destination.setPersistenceId("geoserver");
+ destination.setSubFolder("GNA/"+projectID+"/"+layerID);
+ TransferResult result=dtGeoServer.localFile(theFile, destination);
+
+ GeoServerContent content=new GeoServerContent();
+ content.setFilename(filename);
+ content.setGeoserverPath(result.getRemotePath());
+ content.setGeoserverHostName(geoserverHostName);
+ return content;
+ } catch (InvalidSourceException | SourceNotSetException | FailedTransferException | InitializationException
+ | InvalidDestinationException | DestinationNotSetException e) {
+ throw new SDIInteractionException("Unable to transfer file "+filename,e);
+ }
+ }
+
+
+}
diff --git a/src/main/java/org/gcube/application/geoportal/utils/ISUtils.java b/src/main/java/org/gcube/application/geoportal/utils/ISUtils.java
index 88d6814..5db133b 100644
--- a/src/main/java/org/gcube/application/geoportal/utils/ISUtils.java
+++ b/src/main/java/org/gcube/application/geoportal/utils/ISUtils.java
@@ -9,6 +9,7 @@ import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
+import org.gcube.spatial.data.geonetwork.model.ScopeConfiguration;
public class ISUtils {
@@ -37,4 +38,5 @@ public class ISUtils {
throw new RuntimeException("Unable to decrypt : "+toDecrypt,e);
}
}
+
}
diff --git a/src/main/java/org/gcube/application/geoportal/utils/Layers.java b/src/main/java/org/gcube/application/geoportal/utils/Layers.java
index 266129a..36d396c 100644
--- a/src/main/java/org/gcube/application/geoportal/utils/Layers.java
+++ b/src/main/java/org/gcube/application/geoportal/utils/Layers.java
@@ -119,4 +119,21 @@ public class Layers {
// }
// }
+
+ public static void publishShapeFile() {
+ String DEFAULT_CRS="GEOGCS[\"WGS 84\", \n" +
+ " DATUM[\"World Geodetic System 1984\", \n" +
+ " SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], \n" +
+ " AUTHORITY[\"EPSG\",\"6326\"]], \n" +
+ " PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \n" +
+ " UNIT[\"degree\", 0.017453292519943295], \n" +
+ " AXIS[\"Geodetic longitude\", EAST], \n" +
+ " AXIS[\"Geodetic latitude\", NORTH], \n" +
+ " AUTHORITY[\"EPSG\",\"4326\"]]";
+
+
+
+
+
+ }
}
diff --git a/src/test/java/org/gcube/application/geoportal/TestModel.java b/src/test/java/org/gcube/application/geoportal/TestModel.java
index 0f02dcd..3796d98 100644
--- a/src/test/java/org/gcube/application/geoportal/TestModel.java
+++ b/src/test/java/org/gcube/application/geoportal/TestModel.java
@@ -1,9 +1,8 @@
package org.gcube.application.geoportal;
-import java.time.Instant;
+import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Date;
import org.gcube.application.geoportal.model.AccessPolicy;
import org.gcube.application.geoportal.model.concessioni.Concessione;
@@ -19,7 +18,7 @@ public class TestModel {
// Generic fields
- concessione.setCreationTime(Instant.now());
+ concessione.setCreationTime(LocalDateTime.now());
concessione.setCreationUser("my author");
concessione.setLastUpdateTime(concessione.getCreationTime());
concessione.setVersion("1.0.0");
@@ -46,8 +45,8 @@ public class TestModel {
- concessione.setDataInizioProgetto(Instant.now());
- concessione.setDataFineProgetto(Instant.now());
+ concessione.setDataInizioProgetto(LocalDateTime.now());
+ concessione.setDataFineProgetto(LocalDateTime.now());
concessione.setTitolareLicenza("Qualcun altro");
concessione.setTitolareCopyright("Chiedilo in giro");
@@ -56,8 +55,8 @@ public class TestModel {
concessione.setParoleChiaveICCD(Arrays.asList(new String[] {"vattelapesca","somthing something"}));
- concessione.setCentroidLat(180.0);
- concessione.setCentroidLong(90.0);
+ concessione.setCentroidLat(-13.0);
+ concessione.setCentroidLong(45.0);
return concessione;
}
@@ -88,7 +87,7 @@ public class TestModel {
img.setDidascalia("You can see my image number "+i);
img.setFormat("TIFF");
img.setSoggetto(concessione.getSoggetto());
- img.setCreationTime(Instant.now());
+ img.setCreationTime(LocalDateTime.now());
img.setResponsabili(concessione.getAuthors());
img.setLicenseID("CC-BY");
imgs.add(img);
diff --git a/src/test/java/org/gcube/application/geoportal/TestSDI.java b/src/test/java/org/gcube/application/geoportal/TestSDI.java
new file mode 100644
index 0000000..abb1e11
--- /dev/null
+++ b/src/test/java/org/gcube/application/geoportal/TestSDI.java
@@ -0,0 +1,18 @@
+package org.gcube.application.geoportal;
+
+import org.gcube.application.geoportal.model.fault.SDIInteractionException;
+import org.gcube.application.geoportal.storage.SDIManager;
+import org.gcube.application.geoportal.utils.Files;
+
+public class TestSDI {
+
+ public static void main(String[] args) throws SDIInteractionException {
+ TokenSetter.set("/gcube/devNext/NextNext");
+
+ SDIManager sdiManager=new SDIManager();
+ sdiManager.pushLayerFile(Files.getFileFromResources("concessioni/pos.dbf"), "pos.dbf", 123, 1);
+
+
+ }
+
+}
diff --git a/src/test/java/org/gcube/application/geoportal/UseCases.java b/src/test/java/org/gcube/application/geoportal/UseCases.java
index 044f398..7df6875 100644
--- a/src/test/java/org/gcube/application/geoportal/UseCases.java
+++ b/src/test/java/org/gcube/application/geoportal/UseCases.java
@@ -69,7 +69,7 @@ public class UseCases {
//If true -> data are published into the SDI
- Boolean publish=false;
+ Boolean publish=true;
/*Chiedo al manager di salvare il progetto, causando :
*scrittura sul WS
diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties
new file mode 100644
index 0000000..719fa38
--- /dev/null
+++ b/src/test/resources/log4j.properties
@@ -0,0 +1,8 @@
+log4j.rootLogger=DEBUG, stdout
+
+#CONSOLE
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Threshold=INFO
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%t] %-5p %c %d{dd MMM yyyy ;HH:mm:ss.SSS} - %m%n
+
diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml
index 74328d0..634a1bb 100644
--- a/src/test/resources/logback.xml
+++ b/src/test/resources/logback.xml
@@ -7,16 +7,6 @@
-
- logFile.log
- true
-
- %d{yyyy-MM-dd HH:mm:ss} | %-5p | [%thread] %logger{5}:%L - %msg%n
-
-
-
-
-