diff --git a/CHANGELOG.md b/CHANGELOG.md index d191a63..195f775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for org.gcube.data.transfer.sis-geotk-plugin -## [v1.2.0-SNAPSHOT] 2020-09-07 +## [v1.2.0] 2020-09-07 Upgrade to apache-sis 1.0 ## [v1.1.3] 2020-09-07 diff --git a/pom.xml b/pom.xml index 4b5c9b6..6fc8b0c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.gcube.data.transfer sis-geotk-plugin - 1.2.0-SNAPSHOT + 1.2.0 Sis/GeoToolkit plugin Apache Sis/Geotk plugin for data-transfer-service diff --git a/src/test/java/org/gcube/data/transfer/plugins/sis/TestGetMetadata.java b/src/test/java/org/gcube/data/transfer/plugins/sis/TestGetMetadata.java index 1f6791b..547b275 100644 --- a/src/test/java/org/gcube/data/transfer/plugins/sis/TestGetMetadata.java +++ b/src/test/java/org/gcube/data/transfer/plugins/sis/TestGetMetadata.java @@ -6,6 +6,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.URL; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.security.MessageDigest; @@ -19,8 +20,21 @@ public class TestGetMetadata { public static void main(String[] args) throws UnsupportedStorageException, DataStoreException, IOException, NoSuchAlgorithmException { String[] toCheckFiles=new String[] { - "/Users/FabioISTI/Downloads/Aaptos_aaptos.nc", + + + // ********** HDF - NETCDF 4 "/Users/FabioISTI/Downloads/NASA_Precipitations_1950_2100_rcp45.nc", + + "https://thredds.d4science.org/thredds/fileServer/public/netcdf/ClimateChange/NASA_Precipitations_1950_2100_rcp45.nc", + "https://thredds.d4science.org/thredds/fileServer/public/netcdf/ClimateChange/NASA_Precipitations_1950_2100_rcp85.nc", + "https://thredds.d4science.org/thredds/fileServer/public/netcdf/ClimateChange/NASA_Surface_Air_Temperature_1950_2100_rcp45.nc", + "https://thredds.d4science.org/thredds/fileServer/public/netcdf/ClimateChange/NASA_Surface_Air_Temperature_1950_2100_rcp85.nc", + "https://thredds.d4science.org/thredds/fileServer/public/netcdf/ClimateChange/hcaf_v6_1950_2100.nc", + + + // *********** NETCDF 3 + + "/Users/FabioISTI/Downloads/Aaptos_aaptos.nc" }; for(String f:toCheckFiles) { @@ -79,8 +93,12 @@ public class TestGetMetadata { } - - System.out.println(SisPlugin.getMetaFromFile(dataset)); + if(dataset.exists()) + System.out.println(SisPlugin.getMetaFromFile(dataset)); + else { + System.out.println(SisPlugin.getMetaFromFile(new URL(src))); + } + }