Statistics
| Revision:

root / trunk / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / core / IGeoprocessPlugin.java @ 6054

History | View | Annotate | Download (4 KB)

1
/*
2
 * Created on 20-jun-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: IGeoprocessPlugin.java 6054 2006-06-27 16:10:14Z azabala $
47
* $Log$
48
* Revision 1.2  2006-06-27 16:10:14  azabala
49
* toString() added to interface to force textual representation of geoprocess plugins
50
*
51
* Revision 1.1  2006/06/23 19:01:58  azabala
52
* first version in cvs
53
*
54
* Revision 1.1  2006/06/22 17:46:30  azabala
55
* first version in cvs
56
*
57
*
58
*/
59
package com.iver.cit.gvsig.geoprocess.core;
60

    
61
import java.net.URL;
62

    
63
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel;
64

    
65
/**
66
Ofrece acceso a todo lo necesario para a?adir un geoproceso
67
 al geoprocessmanager:
68
 a) geoproceso en si
69
 b) panel grafico
70
 c) html descriptivo
71
 d) imagen descriptiva
72
 e) controlador, que lee las entradas de la GUI y se las
73
 pasa al geoproceso
74
 
75
 ?Como podemos hacer que cuando un desarrollador externo haga una extension
76
 con nuevos geoprocesos, se cosque el GeoprocessManager?
77
 
78
 IDEA: El geoprocessmanager tendr? asociada una extension, y en esta
79
 extension se construye el componente y se a?aden los geoprocesos del core
80
 (union, diferencia, etc).
81
 Adem?s, construye un punto de extension con el API ExtensionPoints (IverUtiles)
82
 
83
 En el metodo initialize() de la Extension ANDAMI del GeoprocessManager,
84
 se crear?a el punto de extension "GeoprocessManager".
85
 
86
 Si desde otro proyecto se quiere crear un geoproceso, y que se muestre en el geoprocess
87
 manager, solo habr?a que construir una extension de andami, y en su metodo initialize
88
 a?adir cada geoproceso nuevo al punto de extension.
89
 
90
 Luego, desde el GeoprocessManager, en el metodo execute() de la extension
91
 asociada ya se har?a lo siguiente:
92
 ExtensionPoint infoByPoint = (ExtensionPoint)extensionPoints.get("GeoprocessManager"); 
93
 Iterator infoByPoint =infoByPoint.keySet().iterator();
94
 while( i.hasNext() ) { 
95
                 String nombre = (String)i.next(); 
96
  }
97
  Quiz?s sea menos elegante que el mecanismo de los drivers (con su propio 
98
  classloader), pero simplifica la gesti?n. No hay que echar ning?n jar
99
  en ning?n directorio. Solo crear las extensiones Andami encargadas de registrar
100
  los nuevos geoprocesos en el punto de extension.
101
 
102
 * 
103
 * @author azabala
104
 *
105
 */
106

    
107
public interface IGeoprocessPlugin {
108
        public IGeoprocessPanel getGeoprocessPanel();
109
        //        JEditorPane htmlPane = new JEditorPane(url);
110
        // htmlPane.setPage(new URL(url));
111
        public URL getHtmlDescription();
112
        public URL getImgDescription();
113
        public IGeoprocessController getGpController();
114
        /**
115
         * Gives access to the geoprocess namespace. 
116
         * Namespaces are artifacts to identify geoproccesses by a path
117
         * (similar to xpath), and to organize them.
118
         * For example:
119
         * Analysis Tools/Overlay/Union 
120
         * Data Management Tools/Generalization/Dissolve
121
         * Data Management Tools/Generalization/Dissolve by multiple fields
122
         * @return
123
         */
124
        public String getNamespace();
125
        /**
126
         * To give a textual representation of the plugin
127
         * @return
128
         */
129
        public String toString();
130
}
131