root / branches / v2_0_0_prep / libraries / libGPE / src / org / gvsig / gpe / writer / IGPEWriterHandlerImplementor.java @ 27836
History | View | Annotate | Download (9.12 KB)
1 |
package org.gvsig.gpe.writer; |
---|---|
2 |
|
3 |
import java.io.OutputStream; |
4 |
|
5 |
import org.gvsig.gpe.parser.GPEErrorHandler; |
6 |
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 |
*
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or (at your option) any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
24 |
*
|
25 |
* For more information, contact:
|
26 |
*
|
27 |
* Generalitat Valenciana
|
28 |
* Conselleria d'Infraestructures i Transport
|
29 |
* Av. Blasco Ib??ez, 50
|
30 |
* 46010 VALENCIA
|
31 |
* SPAIN
|
32 |
*
|
33 |
* +34 963862235
|
34 |
* gvsig@gva.es
|
35 |
* www.gvsig.gva.es
|
36 |
*
|
37 |
* or
|
38 |
*
|
39 |
* IVER T.I. S.A
|
40 |
* Salamanca 50
|
41 |
* 46005 Valencia
|
42 |
* Spain
|
43 |
*
|
44 |
* +34 963163400
|
45 |
* dac@iver.es
|
46 |
*/
|
47 |
/* CVS MESSAGES:
|
48 |
*
|
49 |
* $Id: IGPEWriterHandlerImplementor.java 203 2007-12-03 09:36:17Z jpiera $
|
50 |
* $Log$
|
51 |
* Revision 1.1 2007/06/28 13:04:33 jorpiell
|
52 |
* The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
|
53 |
*
|
54 |
* Revision 1.7 2007/06/20 09:35:37 jorpiell
|
55 |
* Add the javadoc comments
|
56 |
*
|
57 |
* Revision 1.6 2007/06/07 14:52:28 jorpiell
|
58 |
* Add the schema support
|
59 |
*
|
60 |
* Revision 1.5 2007/05/16 12:06:22 jorpiell
|
61 |
* Add Deafult methods
|
62 |
*
|
63 |
* Revision 1.4 2007/05/07 12:57:55 jorpiell
|
64 |
* Add some methods to manage the multigeometries
|
65 |
*
|
66 |
* Revision 1.3 2007/04/26 14:29:15 jorpiell
|
67 |
* Add a getStringProperty method to the GEPDeafults
|
68 |
*
|
69 |
* Revision 1.2 2007/04/13 13:14:55 jorpiell
|
70 |
* Created the base tests and add some methods to the content handler
|
71 |
*
|
72 |
* Revision 1.1 2007/04/13 07:17:54 jorpiell
|
73 |
* Add the writting tests for the simple geometries
|
74 |
*
|
75 |
* Revision 1.2 2007/04/12 17:06:42 jorpiell
|
76 |
* First GML writing tests
|
77 |
*
|
78 |
* Revision 1.1 2007/04/12 10:20:40 jorpiell
|
79 |
* Add the writer
|
80 |
*
|
81 |
*
|
82 |
*/
|
83 |
/**
|
84 |
* This interface defines the writing process methods. To write
|
85 |
* a new concrete format it is necessary to create a class that
|
86 |
* implements this methods and creates the output file whereas
|
87 |
* the consumer application is invoking these methods.
|
88 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
89 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
|
90 |
*/
|
91 |
public interface IGPEWriterHandlerImplementor { |
92 |
|
93 |
/**
|
94 |
* @return the writer name
|
95 |
*/
|
96 |
public String getName(); |
97 |
|
98 |
/**
|
99 |
* @return the writer description
|
100 |
*/
|
101 |
public String getDescription(); |
102 |
|
103 |
/**
|
104 |
* Sets the outputstream
|
105 |
*/
|
106 |
public void setOutputStream(OutputStream os); |
107 |
|
108 |
/**
|
109 |
* @return the supported format
|
110 |
*/
|
111 |
public String getFormat(); |
112 |
|
113 |
/**
|
114 |
* @return the default file extension
|
115 |
*/
|
116 |
public String getFileExtension(); |
117 |
|
118 |
// /**
|
119 |
// * @return the schema document
|
120 |
// */
|
121 |
// public IXSSchemaDocument getSchemaDocument();
|
122 |
|
123 |
// /**
|
124 |
// * @param schemaDocument the schemaDocument to set
|
125 |
// */
|
126 |
// public void setSchemaDocument(IXSSchemaDocument schemaDocument);
|
127 |
|
128 |
/**
|
129 |
* @return the error handler
|
130 |
*/
|
131 |
public GPEErrorHandler getErrorHandler();
|
132 |
|
133 |
/**
|
134 |
* @param errorHandler the errorHandler to set
|
135 |
*/
|
136 |
public void setErrorHandler(GPEErrorHandler errorHandler); |
137 |
|
138 |
/**
|
139 |
* It must be invoked before to start the reading process.
|
140 |
* It is used just to indicate to the writer that the
|
141 |
* writing process is going to start.
|
142 |
*/
|
143 |
public void initialize(); |
144 |
|
145 |
/**
|
146 |
* It indicates that the writing process has finished.
|
147 |
* The writer can close the file.
|
148 |
*/
|
149 |
public void close(); |
150 |
|
151 |
/**
|
152 |
* It is thrown by the consumer application to indicate
|
153 |
* that it has to write a layer.
|
154 |
* @param id
|
155 |
* Layer identifier
|
156 |
* @param namespace
|
157 |
* Layer namespace
|
158 |
* @param name
|
159 |
* Layer name
|
160 |
* @param description
|
161 |
* Layer description
|
162 |
* @param srs
|
163 |
* Layer spatial reference system
|
164 |
*/
|
165 |
public void startLayer(String id, String namespace, String name, String description, String srs); |
166 |
|
167 |
/**
|
168 |
* It means that the current layer has finished
|
169 |
* to be written.
|
170 |
*/
|
171 |
public void endLayer(); |
172 |
|
173 |
/**
|
174 |
* It is thrown by the consumer application to indicate
|
175 |
* that it has to write a bounding box.
|
176 |
* @param id
|
177 |
* Bounding box identifier
|
178 |
* @param coords
|
179 |
* A coordinates iterator
|
180 |
* @param srs
|
181 |
* Spatial reference system
|
182 |
*/
|
183 |
public void startBbox(String id, ICoordinateSequence coords, String srs); |
184 |
|
185 |
/**
|
186 |
* It means that the current bounding box has finished to
|
187 |
* be written.
|
188 |
*/
|
189 |
public void endBbox(); |
190 |
|
191 |
/**
|
192 |
* It is thrown by the consumer application to indicate
|
193 |
* that it has to write a feature.
|
194 |
* @param id
|
195 |
* Feature identifier
|
196 |
* @param namespace
|
197 |
* Feature namespace
|
198 |
* @param name
|
199 |
* Feature name
|
200 |
*/
|
201 |
public void startFeature(String id, String namespace, String name); |
202 |
|
203 |
/**
|
204 |
* It means that the current feature has finished
|
205 |
* to be written.
|
206 |
*/
|
207 |
public void endFeature(); |
208 |
|
209 |
/**
|
210 |
* It is thrown by the consumer application to indicate that
|
211 |
* it has to write a element.
|
212 |
* @param namespace
|
213 |
* Element namespace
|
214 |
* @param name
|
215 |
* Element name
|
216 |
* @param value
|
217 |
* Element value
|
218 |
*/
|
219 |
public void startElement(String namespace, String name, Object value); |
220 |
|
221 |
/**
|
222 |
* It means that the current element has finished
|
223 |
* to be written.
|
224 |
*/
|
225 |
public void endElement(); |
226 |
|
227 |
/**
|
228 |
* It is thrown by the consumer application to
|
229 |
* indicate that it has to write a point.
|
230 |
* @param id
|
231 |
* Point identifier
|
232 |
* @param coords
|
233 |
* A coordinates iterator
|
234 |
* @param srs
|
235 |
* Spatial reference system
|
236 |
*/
|
237 |
public void startPoint(String id, ICoordinateSequence coords, String srs); |
238 |
|
239 |
/**
|
240 |
* It means that the current point has finished
|
241 |
* to be written.
|
242 |
*/
|
243 |
public void endPoint(); |
244 |
|
245 |
/**
|
246 |
* It is thrown by the consumer application to
|
247 |
* indicate that it has to write a multiPoint.
|
248 |
* @param id
|
249 |
* Geometry identifier
|
250 |
* @param srs
|
251 |
* Spatial reference system
|
252 |
*/
|
253 |
public void startMultiPoint(String id, String srs); |
254 |
|
255 |
/**
|
256 |
* It means that the current multiPoint has finished
|
257 |
* to be written.
|
258 |
*/
|
259 |
public void endMultiPoint(); |
260 |
|
261 |
/**
|
262 |
* It is thrown by the consumer application to
|
263 |
* indicate that it has to write a lineString.
|
264 |
* @param id
|
265 |
* LineString identifier
|
266 |
* @param coords
|
267 |
* A coordinates iterator
|
268 |
* @param srs
|
269 |
* Spatial reference system
|
270 |
*/
|
271 |
public void startLineString(String id, ICoordinateSequence coords, String srs); |
272 |
|
273 |
/**
|
274 |
* It means that the current lineString has finished
|
275 |
* to be written.
|
276 |
*/
|
277 |
public void endLineString(); |
278 |
|
279 |
/**
|
280 |
* It is thrown by the consumer application to
|
281 |
* indicate that it has to write a multiLineString.
|
282 |
* @param id
|
283 |
* Geometry identifier
|
284 |
* @param srs
|
285 |
* Spatial reference system
|
286 |
*/
|
287 |
public void startMultiLineString(String id, String srs); |
288 |
|
289 |
/**
|
290 |
* It means that the current multiLineString has finished
|
291 |
* to be written.
|
292 |
*/
|
293 |
public void endMultiLineString(); |
294 |
|
295 |
/**
|
296 |
* It is thrown by the consumer application to
|
297 |
* indicate that it has to write a linearRing.
|
298 |
* @param id
|
299 |
* LineString identifier
|
300 |
* @param coords
|
301 |
* A coordinates iterator
|
302 |
* @param srs
|
303 |
* Spatial reference system
|
304 |
*/
|
305 |
public void startLinearRing(String id, ICoordinateSequence coords, String srs); |
306 |
|
307 |
/**
|
308 |
* It means that the current linearRing has finished
|
309 |
* to be written.
|
310 |
*/
|
311 |
public void endLinearRing(); |
312 |
|
313 |
/**
|
314 |
* It is thrown by the consumer application to
|
315 |
* indicate that it has to write a polygon.
|
316 |
* @param id
|
317 |
* LineString identifier
|
318 |
* @param coords
|
319 |
* A coordinates iterator
|
320 |
* @param srs
|
321 |
* Spatial reference system
|
322 |
*/
|
323 |
public void startPolygon(String id, ICoordinateSequence coords, String srs); |
324 |
|
325 |
/**
|
326 |
* It means that the current polygon has finished
|
327 |
* to be written.
|
328 |
*/
|
329 |
public void endPolygon(); |
330 |
|
331 |
/**
|
332 |
* It is thrown by the consumer application to
|
333 |
* indicate that it has to write a multiPolygon.
|
334 |
* @param id
|
335 |
* Geometry identifier
|
336 |
* @param srs
|
337 |
* Spatial reference system
|
338 |
*/
|
339 |
public void startMultiPolygon(String id, String srs); |
340 |
|
341 |
/**
|
342 |
* It means that the current multiPolygon has finished
|
343 |
* to be written.
|
344 |
*/
|
345 |
public void endMultiPolygon(); |
346 |
|
347 |
/**
|
348 |
* It is thrown by the consumer application to
|
349 |
* indicate that it has to write a multiGeometry.
|
350 |
* @param id
|
351 |
* Geometry identifier
|
352 |
* @param srs
|
353 |
* Spatial reference system
|
354 |
*/
|
355 |
public void startMultiGeometry(String id, String srs); |
356 |
|
357 |
/**
|
358 |
* It means that the current multiGeometry has finished
|
359 |
* to be written.
|
360 |
*/
|
361 |
public void endMultiGeometry(); |
362 |
|
363 |
/**
|
364 |
* It is thrown by the consumer application to
|
365 |
* indicate that it has to write a innerPolygon.
|
366 |
* @param id
|
367 |
* LineString identifier
|
368 |
* @param coords
|
369 |
* A coordinates iterator
|
370 |
* @param srs
|
371 |
* Spatial reference system
|
372 |
*/
|
373 |
public void startInnerBoundary(String id, ICoordinateSequence coords, String srs); |
374 |
|
375 |
/**
|
376 |
* It means that the current innerPolygon has finished to
|
377 |
* be written.
|
378 |
*/
|
379 |
public void endInnerBoundary(); |
380 |
} |