git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/SeaDataNetConnector@119966 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a79f27d4a1
commit
6e6b0359e2
|
@ -144,12 +144,8 @@ public class DivaHTTPClient {
|
|||
new BufferedReader(new InputStreamReader(responseStream));
|
||||
|
||||
String line = "";
|
||||
|
||||
//DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
//ByteArrayInputStream input;
|
||||
//DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
|
||||
|
||||
while ((line = responseStreamReader.readLine()) != null) {
|
||||
stringBuilder.append(line).append("\n");
|
||||
}
|
||||
|
@ -159,20 +155,9 @@ public class DivaHTTPClient {
|
|||
|
||||
String response = stringBuilder.toString();
|
||||
|
||||
//input = new ByteArrayInputStream(stringBuilder.toString().getBytes("UTF-8"));
|
||||
|
||||
System.out.println("RESPONSE STRING: "+response);
|
||||
//System.out.println("RESPONSE STRING: "+response);
|
||||
|
||||
Document doc = loadXMLFromString(response);
|
||||
|
||||
//Node root = doc.getDocumentElement();
|
||||
|
||||
System.out.println("ELEMENTBYTAG: "+doc.getElementsByTagName("stat").item(0).getTextContent());
|
||||
//System.out.println("ROOT: "+root.getTextContent());
|
||||
//System.out.println("INSIDE: "+ root.getChildNodes().item(2).getTextContent());
|
||||
|
||||
//System.out.println("BYID: "+doc.getElementById("vmin").getNodeValue());
|
||||
//System.out.println("BYID: "+doc.getChildNodes().item(2));
|
||||
|
||||
Double vmin = Double.parseDouble(doc.getElementsByTagName("stat").item(0).getTextContent());
|
||||
Double vmax = Double.parseDouble(doc.getElementsByTagName("stat").item(1).getTextContent());
|
||||
|
@ -240,8 +225,9 @@ public class DivaHTTPClient {
|
|||
|
||||
DivaFilePostResponse response=uploadFile(new File("C:"+File.separator+"Users"+File.separator+"marbas"+File.separator+"Desktop"+File.separator+"temperature_argo.txt"));
|
||||
|
||||
System.out.println(getAnalysis(response.getSessionid(),5,4,76,78,1,35,78,1,2));
|
||||
System.out.println(response);
|
||||
//System.out.println(getAnalysis(response.getSessionid(),5,4,76,78,1,35,78,1,2));
|
||||
//System.out.println(response);
|
||||
DivaAnalysisGetResponse respAnalysis = getAnalysis(response.getSessionid(),5, 4, 76, 78, 1, 35, 78, 1, 2);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue