Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / grid / RasterFilter.java @ 210

History | View | Annotate | Download (4.09 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.fmap.dal.coverage.grid;
23

    
24
import java.util.Hashtable;
25
import java.util.TreeMap;
26

    
27
import org.gvsig.fmap.dal.coverage.datastruct.Params;
28
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
29

    
30
/**
31
 * Este interfaz es implementado por el ancestro de cualquier filtro o el propio filtro.
32
 * Contiene las operaciones necesarias para su ejecuci?n a trav?s de la pila de filtros.
33
 *
34
 * @author Nacho Brodin (nachobrodin@gmail.com)
35
 */
36
@SuppressWarnings("unchecked")
37
public interface RasterFilter {
38
                /**
39
                 * Acciones a realizar antes de la ejecuci?n del filtro
40
                 */
41
                public void pre();
42

    
43
                /**
44
                 * Ejecuci?n de la funci?n process de todo el filtro.
45
                 * @throws ProcessInterruptedException
46
                 *
47
                 */
48
                public void execute() throws ProcessInterruptedException;
49

    
50
                /**
51
                 * Procesa la posici?n x,y del raster
52
                 * @param x posici?n X
53
                 * @param y posici?n Y
54
                 */
55
                public void process(int x, int y);
56

    
57
                /**
58
                 * Acciones a realizar despu?s de la ejecuci?n del filtro
59
                 */
60
                public void post();
61

    
62
                /**
63
                 * Par?metros pasados al filtro en forma de nombre de par?metro y objeto que
64
                 * representa al par?metro. Este puede ser cualquier tipo de variable u objeto.
65
                 *
66
                 * Par?metros obligatorios:
67
                 *         inRaster (IRaster)
68
                 * par?metros obligatorios (si se da el caso)
69
                 *         previousFilter (IRasterFilter)
70
                 *
71
                 * @param name
72
                 * @param value
73
                 */
74
                public void addParam(String name, Object value);
75

    
76
                /**
77
                 * Devuelve los resultados despues de la ejecuci?n del filtro.
78
                 * @param name
79
                 * @return
80
                 */
81
                public Object getResult(String name);
82

    
83
                /**
84
                 * Obtiene el tipo de datos de entrada al filtro
85
                 * @return Tipo de dato
86
                 */
87
                public int getInRasterDataType();
88

    
89
                /**
90
                 * Obtiene el tipo de datos de salida del filtro
91
                 * @return Tipo de dato
92
                 */
93
                public int getOutRasterDataType();
94

    
95
                /**
96
                 * Obtiene el grupo del filtro
97
                 * @return
98
                 */
99
                public String getGroup();
100
                
101
                /**
102
                 * Devuelve el nombre interno del filtro
103
                 * @return the fName
104
                 */
105
                public String getName();
106
                
107
                /**
108
                 * @param name the fName to set
109
                 */
110
                public void setName(String name);
111
                
112
                /**
113
                 * Obtiene el TreeMap con los par?metros del entorno
114
                 * @return TreeMap
115
                 */
116
                public TreeMap getEnv();
117

    
118
                /**
119
                 * Asigna el TreeMap con los par?metros del entorno
120
                 * @param env
121
                 */
122
                public void setEnv(TreeMap env);
123
                
124
                /**
125
                 * Obtiene un par?metro a partir de la clave
126
                 * @param name Par?metro
127
                 * @return Par?metro
128
                 */
129
                public Object getParam(String name);
130
                
131
                /**
132
                 * Gets the param list
133
                 * @return
134
                 */
135
                public Hashtable getParams();
136
                
137
                /**
138
                 * Gets the param list
139
                 * @param params
140
                 */
141
                public void setParams(Hashtable params);
142
                
143
                /**
144
                 * Devolver? un booleano indicando si es visible o no en el panel de filtros.
145
                 * @return
146
                 */
147
                public boolean isVisible();
148
                
149
                /**
150
                 * Obtener que datos puede tratar una interfaz con sus valores
151
                 * @param nameFilter. Cada tipo de filtro puede tener parametros distintos
152
                 * @return
153
                 */
154
                public Params getUIParams(String nameFilter);
155
                
156
                /**
157
                 * Gets the list of specific filter names. Each kind of filter can have a list
158
                 * of specific types. This function returns the names of this filters
159
                 * @return
160
                 */
161
                public String[] getNames();
162
}