diff --git a/pom.xml b/pom.xml
index 29b8867..76d712e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
org.gcube.spatial.data
gis-interface
- 2.1.5-SNAPSHOT
+ 2.2.0-SNAPSHOT
gis-interface
@@ -28,7 +28,7 @@
org.gcube.spatial.data
geonetwork
- [2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)
+ [3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)
it.geosolutions
diff --git a/src/main/java/org/gcube/spatial/data/gis/GISInterface.java b/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
index 2cd5791..9ef4d85 100644
--- a/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
+++ b/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
@@ -104,12 +104,42 @@ public class GISInterface {
return null;
}
+ public PublishResponse addGeoTIFF(String workspace, String storeName, String coverageName,
+ File toPublishFile,String srs,
+ ProjectionPolicy policy,String defaultStyle, double[] bbox,
+ Metadata geoNetworkMeta, String gnCategory,String gnStylesheet, LoginLevel level){
+ try{
+ GeoNetworkPublisher gn=getGN();
+ gn.login(level);
+ GNInsertConfiguration config=gn.getCurrentUserConfiguration(gnCategory, gnStylesheet);
+ return addGeoTIFF(workspace, storeName, coverageName, toPublishFile, srs, policy, defaultStyle, bbox, geoNetworkMeta, config, level);
+ }catch(Exception e){
+ PublishResponse response=new PublishResponse(geoNetworkMeta);
+ response.getMetaOperationMessages().add("Unable to get GN Configuration , cause :"+e.getMessage());
+ return response;
+ }
+ }
+ public PublishResponse publishDBTable(String workspace, String storeName, GSFeatureTypeEncoder fte,GSLayerEncoder layerEncoder,
+ Metadata geoNetworkMeta, String gnCategory,String gnStylesheet,LoginLevel level){
+ try{
+ GeoNetworkPublisher gn=getGN();
+ gn.login(level);
+ GNInsertConfiguration config=gn.getCurrentUserConfiguration(gnCategory, gnStylesheet);
+ return publishDBTable(workspace, storeName, fte, layerEncoder, geoNetworkMeta, config, level);
+ }catch(Exception e){
+ PublishResponse response=new PublishResponse(geoNetworkMeta);
+ response.getMetaOperationMessages().add("Unable to get GN Configuration , cause :"+e.getMessage());
+ return response;
+ }
+ }
/**
* @see it.geosolutions.geoserver.rest.GeoServerRESTPublisher#publishGeoTIFF(String, String, String, File, String, ProjectionPolicy, String, double[])
*
*/
+
+ @Deprecated
public PublishResponse addGeoTIFF(String workspace, String storeName, String coverageName,
File toPublishFile,String srs,
ProjectionPolicy policy,String defaultStyle, double[] bbox,
@@ -179,7 +209,7 @@ public class GISInterface {
return toReturn;
}
-
+ @Deprecated
public PublishResponse publishDBTable(String workspace, String storeName, GSFeatureTypeEncoder fte,GSLayerEncoder layerEncoder,Metadata geoNetworkMeta, GNInsertConfiguration config,LoginLevel level){
boolean publishResult = false;
PublishResponse toReturn=new PublishResponse(geoNetworkMeta);
diff --git a/src/test/java/org/gcube/spatial/data/gis/PublishTable.java b/src/test/java/org/gcube/spatial/data/gis/PublishTable.java
index 5aaf80b..2a6e083 100644
--- a/src/test/java/org/gcube/spatial/data/gis/PublishTable.java
+++ b/src/test/java/org/gcube/spatial/data/gis/PublishTable.java
@@ -59,9 +59,8 @@ public class PublishTable {
GISInterface gis=GISInterface.get();
- Configuration gnConfig=gis.getGeoNetworkReader().getConfiguration();
- PublishResponse resp=gis.publishDBTable(workspace, datastore, fte, le, meta.getMetadata(), new GNInsertConfiguration(gnConfig.getScopeGroup()+"", "datasets", "_none_", true), LoginLevel.DEFAULT);
+ PublishResponse resp=gis.publishDBTable(workspace, datastore, fte, le, meta.getMetadata(), "datasets", "_none_", LoginLevel.DEFAULT);
System.out.println(resp);
}