svn-gvsig-desktop / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / Servers.java @ 6981
History | View | Annotate | Download (2.92 KB)
1 |
package com.iver.cit.gvsig.publish; |
---|---|
2 |
|
3 |
import java.util.Set; |
4 |
import java.util.TreeMap; |
5 |
|
6 |
import com.iver.cit.gvsig.publish.servers.GenericServer; |
7 |
import com.iver.cit.gvsig.publish.servers.geoserver.Geoserver; |
8 |
import com.iver.cit.gvsig.publish.servers.mapserver.MapServer; |
9 |
import com.iver.cit.gvsig.publish.servers.mapserver.ServiceWMSPanel; |
10 |
|
11 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
12 |
*
|
13 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
14 |
*
|
15 |
* This program is free software; you can redistribute it and/or
|
16 |
* modify it under the terms of the GNU General Public License
|
17 |
* as published by the Free Software Foundation; either version 2
|
18 |
* of the License, or (at your option) any later version.
|
19 |
*
|
20 |
* This program is distributed in the hope that it will be useful,
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
* GNU General Public License for more details.
|
24 |
*
|
25 |
* You should have received a copy of the GNU General Public License
|
26 |
* along with this program; if not, write to the Free Software
|
27 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
28 |
*
|
29 |
* For more information, contact:
|
30 |
*
|
31 |
* Generalitat Valenciana
|
32 |
* Conselleria d'Infraestructures i Transport
|
33 |
* Av. Blasco Ib??ez, 50
|
34 |
* 46010 VALENCIA
|
35 |
* SPAIN
|
36 |
*
|
37 |
* +34 963862235
|
38 |
* gvsig@gva.es
|
39 |
* www.gvsig.gva.es
|
40 |
*
|
41 |
* or
|
42 |
*
|
43 |
* IVER T.I. S.A
|
44 |
* Salamanca 50
|
45 |
* 46005 Valencia
|
46 |
* Spain
|
47 |
*
|
48 |
* +34 963163400
|
49 |
* dac@iver.es
|
50 |
*/
|
51 |
/* CVS MESSAGES:
|
52 |
*
|
53 |
* $Id: Servers.java 6981 2006-09-03 14:34:03Z jorpiell $
|
54 |
* $Log$
|
55 |
* Revision 1.4 2006-09-03 14:34:03 jorpiell
|
56 |
* Se ha cambiado el nombre del servidor a SERVER_BRAND
|
57 |
*
|
58 |
* Revision 1.3 2006/09/03 14:31:00 jorpiell
|
59 |
* Ahora se cargan todos los datos desde el fichero de configuraci?n. Se han a?adido algunos comentarios
|
60 |
*
|
61 |
* Revision 1.2 2006/09/01 13:40:59 jorpiell
|
62 |
* Primer gran commit de la extension
|
63 |
*
|
64 |
* Revision 1.1 2006/08/31 19:19:04 jorpiell
|
65 |
* *** empty log message ***
|
66 |
*
|
67 |
*
|
68 |
*/
|
69 |
/**
|
70 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
71 |
*/
|
72 |
public class Servers { |
73 |
public static final String SERVER_BRAND_MAPSERVER = "Mapserver"; |
74 |
public static final String SERVER_BRAND_GEOSERVER = "Geoserver"; |
75 |
|
76 |
public static final String SERVER_TYPE_WFS = "WFS"; |
77 |
public static final String SERVER_TYPE_WMS = "WMS"; |
78 |
|
79 |
public Servers(){
|
80 |
addGenericServer(SERVER_BRAND_MAPSERVER,new MapServer());
|
81 |
addGenericServer(SERVER_BRAND_GEOSERVER,new Geoserver());
|
82 |
} |
83 |
|
84 |
private TreeMap genericServers = new TreeMap(); |
85 |
|
86 |
public Set getBrands() { |
87 |
return genericServers.keySet();
|
88 |
} |
89 |
/**
|
90 |
* Gets a specific JPanel for each server brand
|
91 |
* @return
|
92 |
*/
|
93 |
public GenericServer getGenericServer(String brand) { |
94 |
try{
|
95 |
return (GenericServer) genericServers.get(brand);
|
96 |
} catch(NullPointerException e){ |
97 |
return null; |
98 |
} |
99 |
} |
100 |
|
101 |
protected void addGenericServer(String brand, GenericServer genericServer) { |
102 |
genericServers.put(brand, genericServer); |
103 |
} |
104 |
} |