root / trunk / extensions / extPublish / src / org / gvsig / remoteservices / conf / geoserver / CatalogPOSTGIS.java @ 8966
History | View | Annotate | Download (4.09 KB)
1 |
package org.gvsig.remoteservices.conf.geoserver; |
---|---|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
3 |
*
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
19 |
*
|
20 |
* For more information, contact:
|
21 |
*
|
22 |
* Generalitat Valenciana
|
23 |
* Conselleria d'Infraestructures i Transport
|
24 |
* Av. Blasco Ib??ez, 50
|
25 |
* 46010 VALENCIA
|
26 |
* SPAIN
|
27 |
*
|
28 |
* +34 963862235
|
29 |
* gvsig@gva.es
|
30 |
* www.gvsig.gva.es
|
31 |
*
|
32 |
* or
|
33 |
*
|
34 |
* IVER T.I. S.A
|
35 |
* Salamanca 50
|
36 |
* 46005 Valencia
|
37 |
* Spain
|
38 |
*
|
39 |
* +34 963163400
|
40 |
* dac@iver.es
|
41 |
*/
|
42 |
/* CVS MESSAGES:
|
43 |
*
|
44 |
* $Id$
|
45 |
* $Log$
|
46 |
* Revision 1.2 2006-11-22 14:38:08 dagilgon
|
47 |
* gets y sets de geoserver
|
48 |
*
|
49 |
* Revision 1.1 2006/10/05 16:33:48 jvhigon
|
50 |
* Publica en geoserver. Falta depurar
|
51 |
*
|
52 |
*
|
53 |
*/
|
54 |
/**
|
55 |
* @author Jos? Vicente Hig?n (higon_jos@gva.es)
|
56 |
*/
|
57 |
//creates catalog.xml from a postgis layer
|
58 |
|
59 |
public class CatalogPOSTGIS extends Catalog { |
60 |
|
61 |
String loosebbox;
|
62 |
String abstractC;
|
63 |
String user;
|
64 |
String pass;
|
65 |
String wkb;
|
66 |
String host;
|
67 |
String schema;
|
68 |
String port;
|
69 |
String database;
|
70 |
String dbtype;
|
71 |
|
72 |
public CatalogPOSTGIS(String geopath,String namespace,String name,String id, |
73 |
String enable,String abstractC,String loosebbox, |
74 |
String user,String pass,String wkb,String host,String schema, |
75 |
String port,String database,String dbtype){ |
76 |
super(geopath,namespace,name,id,enable);
|
77 |
this.loosebbox=loosebbox;
|
78 |
this.abstractC=abstractC;
|
79 |
this.user=user;
|
80 |
this.pass=pass;
|
81 |
this.wkb=wkb;
|
82 |
this.host=host;
|
83 |
this.schema=schema;
|
84 |
this.port=port;
|
85 |
this.database=database;
|
86 |
this.dbtype=dbtype;
|
87 |
|
88 |
} |
89 |
|
90 |
void startDatastore(){
|
91 |
writeln("<datastore namespace = \""+namespace+"\" enabled = \""+enabled+ |
92 |
"\" id = \""+id+"\" >",1); |
93 |
} |
94 |
|
95 |
void abstractC(){
|
96 |
writeln("<abstract>"+abstractC+"</abstract>",1); |
97 |
} |
98 |
// writes .xml file
|
99 |
public void toXML(){ |
100 |
startXML(1);
|
101 |
startCatalog(); |
102 |
startDatastores(); |
103 |
startDatastore(); |
104 |
abstractC(); |
105 |
startConnectionParams(); |
106 |
parameter(namespace,name); |
107 |
parameter(loosebbox,"loose bbox");
|
108 |
parameter(user,"user");
|
109 |
parameter(pass,"passwd");
|
110 |
parameter(wkb,"wkb enabled");
|
111 |
parameter(host,"host");
|
112 |
parameter(schema,"schema");
|
113 |
parameter(port,"port");
|
114 |
parameter(database,"database");
|
115 |
parameter(dbtype,"dbtype");
|
116 |
endConnectionParams(); |
117 |
endDatastore(); |
118 |
super.toXML();
|
119 |
|
120 |
} |
121 |
|
122 |
public String getAbstractC() { |
123 |
return abstractC;
|
124 |
} |
125 |
|
126 |
public void setAbstractC(String abstractC) { |
127 |
this.abstractC = abstractC;
|
128 |
} |
129 |
|
130 |
public String getDatabase() { |
131 |
return database;
|
132 |
} |
133 |
|
134 |
public void setDatabase(String database) { |
135 |
this.database = database;
|
136 |
} |
137 |
|
138 |
public String getDbtype() { |
139 |
return dbtype;
|
140 |
} |
141 |
|
142 |
public void setDbtype(String dbtype) { |
143 |
this.dbtype = dbtype;
|
144 |
} |
145 |
|
146 |
public String getHost() { |
147 |
return host;
|
148 |
} |
149 |
|
150 |
public void setHost(String host) { |
151 |
this.host = host;
|
152 |
} |
153 |
|
154 |
public String getLoosebbox() { |
155 |
return loosebbox;
|
156 |
} |
157 |
|
158 |
public void setLoosebbox(String loosebbox) { |
159 |
this.loosebbox = loosebbox;
|
160 |
} |
161 |
|
162 |
public String getPass() { |
163 |
return pass;
|
164 |
} |
165 |
|
166 |
public void setPass(String pass) { |
167 |
this.pass = pass;
|
168 |
} |
169 |
|
170 |
public String getPort() { |
171 |
return port;
|
172 |
} |
173 |
|
174 |
public void setPort(String port) { |
175 |
this.port = port;
|
176 |
} |
177 |
|
178 |
public String getSchema() { |
179 |
return schema;
|
180 |
} |
181 |
|
182 |
public void setSchema(String schema) { |
183 |
this.schema = schema;
|
184 |
} |
185 |
|
186 |
public String getUser() { |
187 |
return user;
|
188 |
} |
189 |
|
190 |
public void setUser(String user) { |
191 |
this.user = user;
|
192 |
} |
193 |
|
194 |
public String getWkb() { |
195 |
return wkb;
|
196 |
} |
197 |
|
198 |
public void setWkb(String wkb) { |
199 |
this.wkb = wkb;
|
200 |
} |
201 |
|
202 |
|
203 |
} |