PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Prototipo/PrototipoMemoria/src/java/memoria/beans/QueryBean.java

http://prototipomemoria.googlecode.com/
Java | 105 lines | 72 code | 24 blank | 9 comment | 0 complexity | 7eed3b9c1eb7dfe2283f4f999d58483d MD5 | raw file
  1/*
  2 * To change this template, choose Tools | Templates
  3 * and open the template in the editor.
  4 */
  5
  6package memoria.beans;
  7
  8import java.io.IOException;
  9import java.net.URI;
 10import java.net.URISyntaxException;
 11import java.util.logging.Level;
 12import java.util.logging.Logger;
 13import javax.faces.bean.ManagedBean;
 14import javax.faces.bean.SessionScoped;
 15import javax.faces.context.FacesContext;
 16
 17/**
 18 *
 19 * @author diego
 20 */
 21@ManagedBean
 22@SessionScoped
 23public class QueryBean {
 24
 25    private double latcenter;
 26    private double loncenter;
 27    private double SWlat;
 28    private double SWlon;
 29    private double NElat;
 30    private double NElon;
 31
 32    public double getNElat() {
 33        return NElat;
 34    }
 35
 36    public void setNElat(double NElat) {
 37        this.NElat = NElat;
 38    }
 39
 40    public double getNElon() {
 41        return NElon;
 42    }
 43
 44    public void setNElon(double NElon) {
 45        this.NElon = NElon;
 46    }
 47
 48    public double getSWlat() {
 49        return SWlat;
 50    }
 51
 52    public void setSWlat(double SWlat) {
 53        this.SWlat = SWlat;
 54    }
 55
 56    public double getSWlon() {
 57        return SWlon;
 58    }
 59
 60    public void setSWlon(double SWlon) {
 61        this.SWlon = SWlon;
 62    }
 63
 64    public double getLatcenter() {
 65        return latcenter;
 66    }
 67
 68    public void setLatcenter(double latcenter) {
 69        this.latcenter = latcenter;
 70    }
 71
 72    public double getLoncenter() {
 73        return loncenter;
 74    }
 75
 76    public void setLoncenter(double loncenter) {
 77        this.loncenter = loncenter;
 78    }
 79
 80
 81
 82    /** Creates a new instance of QueryBean */
 83    public QueryBean() {
 84    }
 85
 86    public void ejecutarQuery(){
 87
 88        try {
 89            String proc = "java -jar D:/facu/Memoria/prototipo-googlecode/Prototipo/wsConsume/dist/wsConsume.jar "+this.SWlat+" "+this.SWlon+" "+this.NElat+" "+this.NElon;
 90            System.out.println("ejecutando: "+proc);
 91            Process p = Runtime.getRuntime().exec(proc);
 92            p.waitFor();
 93            java.awt.Desktop.getDesktop().browse(new URI("D:/facu/Memoria/prototipo-googlecode/Prototipo/wsConsume/MyFirstMap.html"));
 94        } catch (InterruptedException ex) {
 95            Logger.getLogger(QueryBean.class.getName()).log(Level.SEVERE, null, ex);
 96        } catch (IOException ex) {
 97            Logger.getLogger(QueryBean.class.getName()).log(Level.SEVERE, null, ex);
 98        } catch (URISyntaxException ex){
 99            Logger.getLogger(QueryBean.class.getName()).log(Level.SEVERE, null, ex);
100        }
101
102
103
104    }
105}