Revision 2873

View differences:

trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/SearchDialog.java
60 60
	 */
61 61
	public SearchDialog() {
62 62
		super();
63
		/*getSearchButton().addActionListener(new java.awt.event.ActionListener() {
64
            public void actionPerformed(java.awt.event.ActionEvent evt) {
65
            	searchButtonActionPerformed();
66
            }
67
		});*/
68 63
	}
69 64

  
70 65
	public void searchButtonActionPerformed() {
71
        //closeJDialog();
72
		doSearch();
66
        doSearch();
73 67
		if (nodesRecords != null && nodesRecords.length > 1) {
74 68
			showResults(nodesRecords);
75 69
		}
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ChooseResourceDialog.java
84 84
  
85 85
    public void resourceButtonActionPerformed(Resource resource){
86 86
        if (resource.getProtocol().toLowerCase().indexOf("ogc:wcs") >= 0){
87
 		    new WCSLoader().load(resource.getLinkage());
88
 		}			
89
 		
90
 		if (resource.getProtocol().toLowerCase().indexOf("ogc:wms") >= 0){
91
 		    if (!(new WMSLoader().load(resource.getLinkage(),resource.getName()))){
92
 		       JOptionPane.showMessageDialog(this,
93
 		                "Ha ocurrido un error al cargar el mapa:\n" +
94
 		                "Servidor: " + resource.getLinkage() + "\n" +
95
 		                "Capa: " + resource.getName(), "Carga de WMS",
96
 		                JOptionPane.ERROR_MESSAGE);
97
 		    }
98
 		}	
99
 				
100
 		if ((resource.getProtocol().toLowerCase().indexOf("www:link") >= 0) ||
101
 		       (resource.getProtocol().toLowerCase().indexOf("www:download") >= 0)){						
102
 			Browser.init();
103
 			try {
104
 				Browser.displayURL(resource.getLinkage());
105
 			} catch (IOException e1) {
106
 				e1.printStackTrace();
107
 			}
87
 		    loadWCS(resource);
88
 		}else if (resource.getProtocol().toLowerCase().indexOf("ogc:wms") >= 0){
89
 		   loadWMS(resource);
90
 		}else if (resource.getProtocol().toLowerCase().indexOf("ogc:wfs") >= 0){
91
  		   loadWFS(resource);
92
  		}else if (resource.getProtocol().toLowerCase().indexOf("postgis") >= 0){
93
  		   loadPostgis(resource);
94
  		}else if ((resource.getProtocol().toLowerCase().indexOf("www:link") >= 0) ||
95
 		       (resource.getProtocol().toLowerCase().indexOf("www:download") >= 0)){
96
 		   loadLink(resource);
108 97
 		}
109
         System.out.println(resource.getLinkage());
98
 			
110 99
     }
100
    
101
    public void loadWCS(Resource resource){
102
        new WCSLoader().load(resource.getLinkage());
103
    }
104
    
105
    public void loadWMS(Resource resource){
106
        if (!(new WMSLoader().load(resource.getLinkage(),resource.getName()))){
107
		       JOptionPane.showMessageDialog(this,
108
		                "Ha ocurrido un error al cargar el mapa:\n" +
109
		                "Servidor: " + resource.getLinkage() + "\n" +
110
		                "Capa: " + resource.getName(), "Carga de WMS",
111
		                JOptionPane.ERROR_MESSAGE);
112
		    }
113
    }
114
    
115
    public void loadWFS(Resource resource){
116
        
117
    }
118
    
119
    public void loadPostgis(Resource resource){
120
        
121
    }
122
    
123
    public void loadLink(Resource resource){
124
        Browser.init();
125
		try {
126
			Browser.displayURL(resource.getLinkage());
127
		} catch (IOException e1) {
128
			e1.printStackTrace();
129
		}
130
    }
131
     
132
 }
133
    
134
    
135
    
136
    
111 137

  
112
}
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/loaders/WFSLoader.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
*
3
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
*
19
* For more information, contact:
20
*
21
*  Generalitat Valenciana
22
*   Conselleria d'Infraestructures i Transport
23
*   Av. Blasco Ib??ez, 50
24
*   46010 VALENCIA
25
*   SPAIN
26
*
27
*      +34 963862235
28
*   gvsig@gva.es
29
*      www.gvsig.gva.es
30
*
31
*    or
32
*
33
*   IVER T.I. S.A
34
*   Salamanca 50
35
*   46005 Valencia
36
*   Spain
37
*
38
*   +34 963163400
39
*   dac@iver.es
40
*/
41
package es.gva.cit.gvsig.catalogClient.loaders;
42

  
43
/**
44
 * @author Jorge Piera Llodra (piera_jor@gva.es)
45
 */
46
public class WFSLoader extends AbstractLoader{
47

  
48
   
49
}
0 50

  
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/loaders/PostgisLoader.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
*
3
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
*
19
* For more information, contact:
20
*
21
*  Generalitat Valenciana
22
*   Conselleria d'Infraestructures i Transport
23
*   Av. Blasco Ib??ez, 50
24
*   46010 VALENCIA
25
*   SPAIN
26
*
27
*      +34 963862235
28
*   gvsig@gva.es
29
*      www.gvsig.gva.es
30
*
31
*    or
32
*
33
*   IVER T.I. S.A
34
*   Salamanca 50
35
*   46005 Valencia
36
*   Spain
37
*
38
*   +34 963163400
39
*   dac@iver.es
40
*/
41
package es.gva.cit.gvsig.catalogClient.loaders;
42

  
43
/**
44
 * @author Jorge Piera Llodra (piera_jor@gva.es)
45
 */
46
public class PostgisLoader extends AbstractLoader{
47

  
48
    public static void main(String[] args) {
49
    }
50
}
0 51

  

Also available in: Unified diff