Class DivaHTTPClient
- java.lang.Object
-
- org.gcube.dataanalysis.seadatanet.DivaHTTPClient
-
public class DivaHTTPClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringDOWN_FILE_NCstatic StringWEB_HTTP
-
Constructor Summary
Constructors Constructor Description DivaHTTPClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddownloadFileDiva(String fileid, String destinationFile)static DivaAnalysisGetResponsegetAnalysis(String id, double len, double stn, double x0, double x1, double dx, double y0, double y1, double dy, double level)sessionid id from previous upload len correlation length (arc degrees) stn signal to noise ratio (non-dimensional) x0,x1,dx first and last longitude values and resolution of the grid y0,y1,dy idem for latitude level depth levelstatic DivaAnalysisGetResponsegetAnalysis(String id, double len, double stn, double x0, double x1, double dx, double y0, double y1, double dy, double level, Boolean useCurrents, int currentsWeight)static DivaFitResponsegetFit(String id)static voidinputStreamToFile(InputStream is, String path)static voidmain(String[] args)static StringpostFile(File file)static intpostVelocityFiles(String id, String uname, String vname, File binaryFile)static org.gcube.dataanalysis.seadatanet.DivaFilePostResponseuploadFile(File file)
-
-
-
Method Detail
-
postVelocityFiles
public static int postVelocityFiles(String id, String uname, String vname, File binaryFile) throws Exception
- Throws:
Exception
-
getAnalysis
public static DivaAnalysisGetResponse getAnalysis(String id, double len, double stn, double x0, double x1, double dx, double y0, double y1, double dy, double level) throws Exception
sessionid id from previous upload len correlation length (arc degrees) stn signal to noise ratio (non-dimensional) x0,x1,dx first and last longitude values and resolution of the grid y0,y1,dy idem for latitude level depth level- Throws:
Exception
-
getAnalysis
public static DivaAnalysisGetResponse getAnalysis(String id, double len, double stn, double x0, double x1, double dx, double y0, double y1, double dy, double level, Boolean useCurrents, int currentsWeight) throws Exception
- Throws:
Exception
-
getFit
public static DivaFitResponse getFit(String id) throws Exception
- Throws:
Exception
-
uploadFile
public static org.gcube.dataanalysis.seadatanet.DivaFilePostResponse uploadFile(File file) throws Exception, IOException, ParserConfigurationException, SAXException
-
downloadFileDiva
public static void downloadFileDiva(String fileid, String destinationFile) throws Exception
- Throws:
Exception
-
inputStreamToFile
public static void inputStreamToFile(InputStream is, String path) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
-