Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libGPE / src / org / gvsig / gpe / writers / IGPEWriterHandlerImplementor.java @ 18770

History | View | Annotate | Download (10.5 KB)

1
package org.gvsig.gpe.writers;
2

    
3
import java.io.File;
4
import java.io.OutputStream;
5

    
6
import org.gvsig.gpe.GPEErrorHandler;
7
import org.gvsig.xmlschema.som.IXSSchemaDocument;
8

    
9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10
 *
11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
26
 *
27
 * For more information, contact:
28
 *
29
 *  Generalitat Valenciana
30
 *   Conselleria d'Infraestructures i Transport
31
 *   Av. Blasco Ib??ez, 50
32
 *   46010 VALENCIA
33
 *   SPAIN
34
 *
35
 *      +34 963862235
36
 *   gvsig@gva.es
37
 *      www.gvsig.gva.es
38
 *
39
 *    or
40
 *
41
 *   IVER T.I. S.A
42
 *   Salamanca 50
43
 *   46005 Valencia
44
 *   Spain
45
 *
46
 *   +34 963163400
47
 *   dac@iver.es
48
 */
49
/* CVS MESSAGES:
50
 *
51
 * $Id: IGPEWriterHandlerImplementor.java 203 2007-12-03 09:36:17Z jpiera $
52
 * $Log$
53
 * Revision 1.1  2007/06/28 13:04:33  jorpiell
54
 * The Qname has been updated to the 1.5 JVM machine. The schema validation is made in the GPEWriterHandlerImplementor class
55
 *
56
 * Revision 1.7  2007/06/20 09:35:37  jorpiell
57
 * Add the javadoc comments
58
 *
59
 * Revision 1.6  2007/06/07 14:52:28  jorpiell
60
 * Add the schema support
61
 *
62
 * Revision 1.5  2007/05/16 12:06:22  jorpiell
63
 * Add Deafult methods
64
 *
65
 * Revision 1.4  2007/05/07 12:57:55  jorpiell
66
 * Add some methods to manage the multigeometries
67
 *
68
 * Revision 1.3  2007/04/26 14:29:15  jorpiell
69
 * Add a getStringProperty method to the GEPDeafults
70
 *
71
 * Revision 1.2  2007/04/13 13:14:55  jorpiell
72
 * Created the base tests and add some methods to the content handler
73
 *
74
 * Revision 1.1  2007/04/13 07:17:54  jorpiell
75
 * Add the writting tests for the simple geometries
76
 *
77
 * Revision 1.2  2007/04/12 17:06:42  jorpiell
78
 * First GML writing tests
79
 *
80
 * Revision 1.1  2007/04/12 10:20:40  jorpiell
81
 * Add the writer
82
 *
83
 *
84
 */
85
/**
86
 * This interface defines the writing process methods. To write
87
 * a new concrete format it is necessary to create a class that
88
 * implements this methods and creates the output file whereas
89
 * the consumer application is invoking these methods.
90
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
91
 * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
92
 */
93
public interface IGPEWriterHandlerImplementor {
94
        
95
        /**
96
         * @return the writer name
97
         */
98
        public String getName();
99
        
100
        /**
101
         * @return the writer description
102
         */
103
        public String getDescription();
104

    
105
        /**
106
         * @return the default version that the writer
107
         * supports.
108
         */
109
        public String getDefaultVersion();
110

    
111
        /**
112
         * @return the dafault format that the writer 
113
         * supports
114
         */
115
        public String getDefaultFormat();
116

    
117
        /**
118
         * @return the output file that the writer has
119
         * created.
120
         */
121
        public File getOutputFile();
122
        
123
        /**
124
         * Sets the outputstream
125
         */
126
        public void setOutputStream(OutputStream os);
127

    
128
        /**
129
         * @return the fileName
130
         */
131
        public String getFileName();
132
                
133

    
134
        /**
135
         * @param fileName the fileName to set
136
         */
137
        public void setFileName(String fileName);
138
                
139

    
140
        /**
141
         * @return the supported formats
142
         */
143
        public String[] getFormats();
144
        
145
        /**
146
         * @return the format
147
         */
148
        public String getFormat();
149

    
150
        /**
151
         * @param format the format to set
152
         */
153
        public void setFormat(String format);
154

    
155
        /**
156
         * @return the supported versions
157
         */
158
        public String[] getVersions();
159
        
160
        /**
161
         * @return the version
162
         */
163
        public String getVersion();
164

    
165
        /**
166
         * @param version the version to set
167
         */
168
        public void setVersion(String version);
169
        
170
        /**
171
         * @return the schema document
172
         */
173
        public IXSSchemaDocument getSchemaDocument();
174

    
175
        /**
176
         * @param schemaDocument the schemaDocument to set
177
         */
178
        public void setSchemaDocument(IXSSchemaDocument schemaDocument);
179
        
180
        /**
181
         * @return the error handler
182
         */
183
        public GPEErrorHandler getErrorHandler();
184
                
185
        /**
186
         * @param errorHandler the errorHandler to set
187
         */
188
        public void setErrorHandler(GPEErrorHandler errorHandler);
189
        
190
        /**
191
         * It must be invoked before to start the reading process.
192
         * It is used just to indicate to the writer that the
193
         * writing process is going to start.
194
         */
195
        public void initialize();
196
        
197
        /**
198
         * It indicates that the writing process has finished. 
199
         * The writer can close the file.
200
         */
201
        public void close();
202
        
203
        /**
204
         * It is thrown by the consumer application to indicate 
205
         * that it has to write a layer.
206
         * @param id
207
         * Layer identifier
208
         * @param name
209
         * Layer name
210
         * @param description
211
         * Layer description
212
         * @param srs
213
         * Layer spatial reference system
214
         * @param xsElementName
215
         * XML Schema element name
216
         */
217
        public void startLayer(String id, String name, String description, String srs, String xsElementName);
218
        
219
        /**
220
         * It means that the current layer has finished 
221
         * to be written.
222
         */
223
        public void endLayer();
224
        
225
        /**
226
         * It is thrown by the consumer application to indicate
227
         * that it has to write a bounding box.
228
         * @param id
229
         * Bounding box identifier
230
         * @param x
231
         * X coordinate (minimum and maximum values)
232
         * @param y
233
         * Y coordinate (minimum and maximum values)
234
         * @param z
235
         * Z coordinate (minimum and maximum values)
236
         * @param srs
237
         * Spatial reference system
238
         */
239
        public void startBbox(String id,double[] x, double[] y, double[] z,String srs);
240
        
241
        /**
242
         * It means that the current bounding box has finished to 
243
         * be written.
244
         */
245
        public void endBbox();
246
        
247
        /**
248
         * It is thrown by the consumer application to indicate 
249
         * that it has to write a feature.
250
         * @param id
251
         * Feature identifier
252
         * @param name
253
         * Feature name
254
         * @param xsElementName
255
         * XML Schema element name
256
         */
257
        public void startFeature(String id, String name, String xsElementName);
258
        
259
        /**
260
         * It means that the current feature has finished 
261
         * to be written.
262
         */
263
        public void endFeature();
264
        
265
        /**
266
         * It is thrown by the consumer application to indicate that
267
         * it has to write a element.
268
         * @param name
269
         * Element name
270
         * @param value
271
         * Element value
272
         * @param xsElementName
273
         * XML Schema element name
274
         */
275
        public void startElement(String name, Object value, String xsElementName);
276
        
277
        /**
278
         * It means that the current element has finished 
279
         * to be written.
280
         */
281
        public void endElement();
282
        
283
        /**
284
         * It is thrown by the consumer application to 
285
         * indicate that it has to write a point.
286
         * @param id
287
         * Point identifier
288
         * @param x
289
         * X coordinate
290
         * @param y
291
         * Y coordinate
292
         * @param z
293
         * Z coordinate
294
         * @param srs
295
         * Spatial reference system
296
         */
297
        public void startPoint(String id,double x, double y, double z, String srs);
298
        
299
        /**
300
         * It means that the current point has finished 
301
         * to be written.
302
         */
303
        public void endPoint();
304
        
305
        /**
306
         * It is thrown by the consumer application to
307
         * indicate that it has to write a multiPoint. 
308
         * @param id
309
         * Geometry identifier
310
         * @param srs
311
         * Spatial reference system
312
         */
313
        public void startMultiPoint(String id, String srs);
314
        
315
        /**
316
         * It means that the current multiPoint has finished 
317
         * to be written.
318
         */
319
        public void endMultiPoint();
320
        
321
        /**
322
         * It is thrown by the consumer application to 
323
         * indicate that it has to write a lineString.
324
         * @param id
325
         * LineString identifier
326
         * @param x
327
         * X coordinate (n dimensions)
328
         * @param y
329
         * Y coordinate (n dimensions)
330
         * @param z
331
         * Z coordinate (n dimensions)
332
         * @param srs
333
         * Spatial reference system
334
         */
335
        public void startLineString(String id,double[] x, double[] y, double[] z, String srs);
336
        
337
        /**
338
         * It means that the current lineString has finished 
339
         * to be written.
340
         */
341
        public void endLineString();
342
        
343
        /**
344
         * It is thrown by the consumer application to
345
         * indicate that it has to write a multiLineString. 
346
         * @param id
347
         * Geometry identifier
348
         * @param srs
349
         * Spatial reference system
350
         */
351
        public void startMultiLineString(String id, String srs);
352
        
353
        /**
354
         * It means that the current multiLineString has finished 
355
         * to be written.
356
         */
357
        public void endMultiLineString();
358
        
359
        /**
360
         * It is thrown by the consumer application to 
361
         * indicate that it has to write a linearRing.
362
         * @param id
363
         * LineString identifier
364
         * @param x
365
         * X coordinate (n dimensions).
366
         * @param y
367
         * Y coordinate (n dimensions)
368
         * @param z
369
         * Z coordinate (n dimensions)
370
         * @param srs
371
         * Spatial reference system
372
         */
373
        public void startLinearRing(String id,double[] x, double[] y, double[] z, String srs);
374
        
375
        /**
376
         * It means that the current linearRing has finished
377
         *  to be written.
378
         */
379
        public void endLinearRing();
380
        
381
        /**
382
         * It is thrown by the consumer application to 
383
         * indicate that it has to write a polygon.
384
         * @param id
385
         * LineString identifier
386
         * @param x
387
         * X coordinate (n dimensions)
388
         * @param y
389
         * Y coordinate (n dimensions)
390
         * @param z
391
         * Z coordinate (n dimensions)
392
         * @param srs
393
         * Spatial reference system
394
         */
395
        public void startPolygon(String id,double[] x, double[] y, double[] z, String srs);
396
        
397
        /**
398
         * It means that the current polygon has finished 
399
         * to be written.
400
         */
401
        public void endPolygon();
402
        
403
        /**
404
         * It is thrown by the consumer application to
405
         * indicate that it has to write a multiPolygon. 
406
         * @param id
407
         * Geometry identifier
408
         * @param srs
409
         * Spatial reference system
410
         */
411
        public void startMultiPolygon(String id, String srs);
412
        
413
        /**
414
         * It means that the current multiPolygon has finished
415
         *  to be written.
416
         */
417
        public void endMultiPolygon();
418
        
419
        /**
420
         * It is thrown by the consumer application to
421
         * indicate that it has to write a multiGeometry. 
422
         * @param id
423
         * Geometry identifier
424
         * @param srs
425
         * Spatial reference system
426
         */
427
        public void startMultiGeometry(String id, String srs);
428
        
429
        /**
430
         * It means that the current multiGeometry has finished 
431
         * to be written.
432
         */
433
        public void endMultiGeometry();
434
        
435
        /**
436
         * It is thrown by the consumer application to 
437
         * indicate that it has to write a innerPolygon.
438
         * @param id
439
         * LineString identifier
440
         * @param x
441
         * X coordinate (n dimensions)
442
         * @param y
443
         * Y coordinate (n dimensions)
444
         * @param z
445
         * Z coordinate (n dimensions)
446
         * @param srs
447
         * Spatial reference system
448
         */
449
        public void startInnerBoundary(String id,double[] x, double[] y, double[] z, String srs);
450
        
451
        /**
452
         * It means that the current innerPolygon has finished to 
453
         * be written.
454
         */
455
        public void endInnerBoundary();
456
}