|
|
|
@ -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)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|