Statistics
| Revision:

root / tags / v1_1_Build_1001 / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / core / fmap / IGeoprocess.java @ 11984

History | View | Annotate | Download (4.41 KB)

1
/*
2
 * Created on 01-feb-2006
3
 *
4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 *
6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
21
 *
22
 * For more information, contact:
23
 *
24
 *  Generalitat Valenciana
25
 *   Conselleria d'Infraestructures i Transport
26
 *   Av. Blasco Ib??ez, 50
27
 *   46010 VALENCIA
28
 *   SPAIN
29
 *
30
 *      +34 963862235
31
 *   gvsig@gva.es
32
 *      www.gvsig.gva.es
33
 *
34
 *    or
35
 *
36
 *   IVER T.I. S.A
37
 *   Salamanca 50
38
 *   46005 Valencia
39
 *   Spain
40
 *
41
 *   +34 963163400
42
 *   dac@iver.es
43
 */
44
/* CVS MESSAGES:
45
*
46
* $Id: IGeoprocess.java 5795 2006-06-12 19:15:38Z azabala $
47
* $Log$
48
* Revision 1.2  2006-06-12 19:15:38  azabala
49
* cambios para poder trabajar en geoprocessing con capas MULTI (dxf, jdbc, etc)
50
*
51
* Revision 1.1  2006/05/24 21:12:16  azabala
52
* primera version en cvs despues de refactoring orientado a crear un framework extensible de geoprocessing
53
*
54
* Revision 1.4  2006/03/15 18:34:50  azabala
55
* *** empty log message ***
56
*
57
* Revision 1.3  2006/03/14 18:32:46  fjp
58
* Cambio con LayerDefinition para que sea compatible con la definici?n de tablas tambi?n.
59
*
60
* Revision 1.2  2006/02/13 17:55:25  azabala
61
* *** empty log message ***
62
*
63
* Revision 1.1  2006/02/12 21:03:25  azabala
64
* *** empty log message ***
65
*
66
* Revision 1.3  2006/02/06 19:05:26  azabala
67
* Changes in creation of layer result
68
*
69
* Revision 1.2  2006/02/02 19:47:57  azabala
70
* Added method setResult
71
*
72
* Revision 1.1  2006/02/01 19:40:59  azabala
73
* First version in CVS
74
*
75
*
76
*/
77
package com.iver.cit.gvsig.geoprocess.core.fmap;
78

    
79
import java.util.Map;
80

    
81
import com.iver.cit.gvsig.fmap.drivers.ILayerDefinition;
82
import com.iver.cit.gvsig.fmap.edition.ISchemaManager;
83
import com.iver.cit.gvsig.fmap.edition.IWriter;
84
import com.iver.cit.gvsig.fmap.layers.FLayer;
85
import com.iver.utiles.swing.threads.IBackgroundExecution;
86

    
87
/**
88
 * 
89
 * Spatial process which operates with one or more
90
 * vectorial layers to produce a new vectorial layer.
91
 * So geoprocesses could be costly task, extends IBackgroundExecution
92
 * interface that offers a method to run in background.
93
 * 
94
 * @author azabala
95
 * 
96
 * TODO Migrate to libGeoprocess all geoprocessing logic,
97
 * and GUIS in extGeoprocessing
98
 * 
99
 * 
100
 *
101
 */
102
public interface IGeoprocess extends IBackgroundExecution{
103
        
104
        /**
105
         * It sets geoprocess parameters
106
         * @param params
107
         * @throws geoprocess exception for invalid params
108
         */
109
        public void setParameters(Map params) throws GeoprocessException;
110
        
111
        /**
112
         * Many geoprocess has to verify some preconditions
113
         * to run. If these checks doesnt pass, the geoprocess
114
         * wont run.
115
         * @return if entry params verify preconditions to run geoprocess
116
         */
117
        public void checkPreconditions() throws GeoprocessException;
118
        
119
        /**
120
         * process spatial layers to generate a new layer
121
         */
122
        public void process() throws GeoprocessException;
123
        
124
        /**
125
         * Allows to cancel large and computatinal costly proccesses.
126
         */
127
        public void cancel();
128
        
129
        /**
130
         * Creates a new layer from geoprocess results
131
         * @return a new vectorial layer
132
         */
133
        public FLayer getResult() throws GeoprocessException;
134
        
135
        /**
136
         * Allows "clients" of this geoprocess to set persistent datastore
137
         * properties to save results
138
         * @param adapter editable adapter to manage geometries' operations
139
         * @param writer has the responsability to save final results
140
         * @param schemaManager knows how to create datastore schema
141
         */
142
        public void setResultLayerProperties( IWriter writer,
143
                                                                        ISchemaManager schemaManager);
144
        
145
        /**
146
         * Geoprocess' result layer will be a function of geoprocess
147
         * inputs layer, user selection (params) and geoprocess itself
148
         * (data transforms that geoprocess will do). This method
149
         * offers a LayerDefinition that is function of all of this
150
         * causes.
151
         * 
152
         * @return LayerDefinition that describes result layer.
153
         */
154

    
155
        public ILayerDefinition createLayerDefinition();
156
}
157