Revision 187 org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/OutputFactory.java

View differences:

OutputFactory.java
24 24
/**
25 25
 * An OutputFactory defines how new data objects (layers and tables) are created. Method in this class are called from
26 26
 * geoalgorithms to create output objects
27
 * 
27
 *
28 28
 * @author Victor Olaya volaya@unex.es
29
 * 
29
 *
30 30
 */
31 31
public abstract class OutputFactory {
32 32

  
......
36 36

  
37 37
   /**
38 38
    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
39
    * 
39
    *
40 40
    * @param sName
41 41
    *                the name of the layer
42 42
    * @param iShapeType
......
58 58
                                                  IOutputChannel channel,
59 59
                                                  Object crs) throws UnsupportedOutputChannelException;
60 60

  
61
   /**
62
    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
63
    *
64
    * @param sName
65
    *                the name of the layer
66
    * @param iShapeType
67
    *                the type of shapes in the layer
68
    * @param types
69
    *                the data type of the fields
70
    * @param sFields
71
    *                the name of the fields in the attributes table
72
    * @param channel
73
    *                the output channel associated to the output layer
74
    * @param crs
75
    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
76
    * @param subtype
77
    *                the subtype of the geometries in the layer
78
    * @return an empty vector layer
79
 * @throws UnsupportedOutputChannelException
80
    */
81
   public abstract IVectorLayer getNewVectorLayer(String sName,
82
                                                  int iShapeType,
83
                                                  Class[] types,
84
                                                  String[] sFields,
85
                                                  IOutputChannel channel,
86
                                                  Object crs, int subtype) throws UnsupportedOutputChannelException;
61 87

  
88

  
62 89
   /**
63 90
    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
64
    * 
91
    *
65 92
    * @param sName
66 93
    *                the name of the layer
67 94
    * @param iShapeType
......
86 113
                                                  Object crs,
87 114
                                                  int[] fieldSize) throws UnsupportedOutputChannelException;
88 115

  
116
   /**
117
    * Use this method to create a new IVectorLayer that can be used to generate new vector layers as output from the geo-algorithm
118
    *
119
    * @param sName
120
    *                the name of the layer
121
    * @param iShapeType
122
    *                the type of shapes in the layer
123
    * @param types
124
    *                the data type of the fields
125
    * @param sFields
126
    *                the name of the fields in the attributes table
127
    * @param channel
128
    *                the output channel associated to the output layer
129
    * @param crs
130
    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
131
    * @param fieldSize
132
    *                A list of integers. Each value represents the size of a table field.
133
    * @param subtype
134
    *                the subtype of the geometries in the layer
135
    * @return an empty vector layer
136
 * @throws UnsupportedOutputChannelException
137
    */
138
   public abstract IVectorLayer getNewVectorLayer(String sName,
139
                                                  int iShapeType,
140
                                                  Class[] types,
141
                                                  String[] sFields,
142
                                                  IOutputChannel channel,
143
                                                  Object crs,
144
                                                  int[] fieldSize, int subtype) throws UnsupportedOutputChannelException;
89 145

  
90 146
   /**
91 147
    * Use this method to create a new raster layer as output from the geo-algorithm. The characteristics of the raster layer
92 148
    * (extent and cellsize) are taken from the extent parameter.
93
    * 
149
    *
94 150
    * @param sName
95 151
    *                the name of the layer
96 152
    * @param iDataType
......
104 160
    * @param crs
105 161
    *                An object with information to set the CRS of this layer (i.e. a string with a EPSG code)
106 162
    * @return a raster layer
163
    * @throws UnsupportedOutputChannelException
107 164
    */
108 165
   public abstract IRasterLayer getNewRasterLayer(String sName,
109 166
                                                  int iDataType,
......
116 173
   /**
117 174
    * Use this method to create a new 3D raster layer as output from the geo-algorithm. The characteristics of the raster layer
118 175
    * (extent and cellsizes) are taken from the extent parameter.
119
    * 
176
    *
120 177
    * A default implementation is given, which uses the Default3dRasterLayer class. This way, 3D algorithms can be executed within
121 178
    * the context of a GIS that does not support 3D layer, and there is no need to overwrite this method in the corresponding
122 179
    * binding
123
    * 
180
    *
124 181
    * @param sName
125 182
    *                the name of the layer
126 183
    * @param iDataType
......
155 212

  
156 213
   /**
157 214
    * Use this method to create a new table.
158
    * 
215
    *
159 216
    * @param sName
160 217
    *                the name of the table
161 218
    * @param types
......
173 230

  
174 231

  
175 232
   /**
176
    * 
233
    *
177 234
    * @return A temporary filename with the default file extension for vector layers
178 235
    */
179 236
   public String getTempVectorLayerFilename() {
......
184 241

  
185 242

  
186 243
   /**
187
    * 
244
    *
188 245
    * @return A temporary filename with the default file extension for raster layers
189 246
    */
190 247
   public String getTempRasterLayerFilename() {
......
195 252

  
196 253

  
197 254
   /**
198
    * 
255
    *
199 256
    * @return A temporary filename with the default file extension for 3D raster layers
200 257
    */
201 258
   public String getTemp3DRasterLayerFilename() {
......
206 263

  
207 264

  
208 265
   /**
209
    * 
266
    *
210 267
    * @return A temporary filename with the default file extension for tables
211 268
    */
212 269
   public String getTempTableFilename() {
......
216 273

  
217 274

  
218 275
   /**
219
    * 
276
    *
220 277
    * @return A temporary folder name
221 278
    */
222 279
   public String getTempFoldername() {
......
226 283

  
227 284

  
228 285
   /**
229
    * 
286
    *
230 287
    * @param out
231 288
    *                an Output object
232 289
    * @return A temporary filename with the default file extension for the specified type of output
......
255 312

  
256 313
   /**
257 314
    * Returns a temporary filename with no extension
258
    * 
315
    *
259 316
    * @returns a temporary filename with no extension.
260 317
    */
261 318
   public String getTempFilenameWithoutExtension() {
......
268 325
   /**
269 326
    * Returns the temporary folder. This will be used to store outputs when they do not have an associated filename an it is
270 327
    * needed
271
    * 
328
    *
272 329
    * @return a temporary folder
273 330
    */
274 331
   public abstract String getTempFolder();
......
278 335
    * Returns the extensions supported by this factory for creating raster layers. If a filename with an extension not found in
279 336
    * this list of extensions is used to create a raster layer, the default extension (the first one of the list) will be added to
280 337
    * the filename when creating that layer.
281
    * 
338
    *
282 339
    * @return the list of supported extensions for raster layers
283 340
    */
284 341
   public abstract String[] getRasterLayerOutputExtensions();
......
288 345
    * Returns the extensions supported by this factory for creating 3d raster layers. If a filename with an extension not found in
289 346
    * this list of extensions is used to create a 3d raster layer, the default extension (the first one of the list) will be added
290 347
    * to the filename when creating that layer.
291
    * 
348
    *
292 349
    * A default implementation is given, which returns just the "asc" extension used by the default implementation of the
293 350
    * getNew3DRasterLayer method, which uses the Default3DRasterLayer class
294
    * 
351
    *
295 352
    * @return the list of supported extensions for 3d raster layers
296 353
    */
297 354
   public String[] get3DRasterLayerOutputExtensions() {
......
305 362
    * Returns the extensions supported by this factory for creating vector layers. If a filename with an extension not found in
306 363
    * this list of extensions is used to create a vector layer, the default extension (the first one of the list) will be added to
307 364
    * the filename when creating that layer.
308
    * 
365
    *
309 366
    * @return the list of supported extensions for vector layers
310 367
    */
311 368
   public abstract String[] getVectorLayerOutputExtensions();
......
315 372
    * Returns the extensions supported by this factory for creating raster layers. If a filename with an extension not found in
316 373
    * this list of extensions is used to create a raster layer, the default extension (the first one of the list) will be added to
317 374
    * the filename when creating that layer.
318
    * 
375
    *
319 376
    * @return the list of supported extensions for raster layers
320 377
    */
321 378
   public abstract String[] getTableOutputExtensions();
......
323 380

  
324 381
   /**
325 382
    * Returns the task monitor that will be used to monitor algorithm execution
326
    * 
383
    *
327 384
    * @param sTitle
328 385
    *                a String used to identify the monitor. This will be used, for instance, as the title string of a progress
329 386
    *                dialog.
......
340 397
   /**
341 398
    * Returns the default CRS for new layers. This will be used when the geoalgorithm generates new layers but does not take any
342 399
    * other layer as input, so the CRS cannot be defined from the inputs
343
    * 
400
    *
344 401
    * @return an object containing information about the default CRS (i.e. a String with the EPSG code of the CRS)
345 402
    */
346 403
   public abstract Object getDefaultCRS();
......
348 405

  
349 406
   /**
350 407
    * Returns the default no data value for raster layers created by this output factory
351
    * 
408
    *
352 409
    * @return the default no data value for raster layers created by this output factory
353 410
    */
354 411
   public double getDefaultNoDataValue() {
......
360 417

  
361 418
   /**
362 419
    * Sets the default no data value to use when this output factory cretes a new raster layer
363
    * 
420
    *
364 421
    * @param dValue
365 422
    *                the default no data value to use when this output factory cretes a new raster layer
366 423
    */

Also available in: Unified diff