Revision 6342

View differences:

trunk/extensions/extWMS/src/com/iver/cit/gvsig/gui/wizards/WMSWizardData.java
71 71
    private String serverVersion;
72 72
    private FMapWMSDriver wms = null;
73 73
    private Hashtable onlineResources = null;
74
    
74

  
75 75
    /**
76 76
     * @return Returns the serverVersion.
77 77
     */
......
81 81
    public String getHost(){
82 82
        return wms.getHost();
83 83
    }
84
    
85
    public void setHost(URL host, boolean override) throws DriverException{        
84

  
85
    public void setHost(URL host, boolean override) throws DriverException{
86 86
        try {
87 87
        	wms = FMapWMSDriverFactory.getFMapDriverForURL(host);
88
        	
88

  
89 89
        	// Send a getCapabilities request;
90 90
        	if (!wms.connect(override, null))
91 91
        		throw new DriverException(PluginServices.getText(this, "cant_connect") + host.toString());
92 92
        } catch (ConnectException e) {
93 93
        	JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(), PluginServices.getText(this,"server_timeout"));
94
			e.printStackTrace();
94
//			e.printStackTrace();
95 95
			return;
96 96
		} catch (IOException e) {
97 97
			JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(), PluginServices.getText(this, "cant_connect"));
98
			e.printStackTrace();
98
//			e.printStackTrace();
99 99
			return;
100 100
		}
101 101
        if (wms.getAbstract()  != null)
102 102
            theAbstract = wms.getAbstract();
103
        
104
        Vector f = wms.getFormats(); 
103

  
104
        Vector f = wms.getFormats();
105 105
        ArrayList formatos = new ArrayList();
106 106
        for (int i = 0; i < f.size(); i++) {
107 107
        	formatos.add(f.elementAt(i));
......
111 111
        onlineResources = wms.getOnlineResources();
112 112
        layer = wms.getLayersTree(); // LayersTree as they are defined in the Capabilities document
113 113
    }
114
    
114

  
115 115
    public String getAbstract() {
116 116
        return theAbstract;
117 117
    }
......
140 140
    public Rectangle2D getBoundingBox(String[] layerNames, String srs) {
141 141
        return wms.getLayersExtent(layerNames, srs);
142 142
    }
143
    
143

  
144 144
	public FMapWMSDriver getDriver() {
145 145
		return wms;
146 146
	}
147
	
147

  
148 148
    public boolean isQueryable() {
149 149
    	return wms.isQueryable();
150 150
    }
151
 
151

  
152 152
}

Also available in: Unified diff