svn-gvsig-desktop / tags / v1_1_Build_1013 / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / core / IGeoprocessPlugin.java @ 13521
History | View | Annotate | Download (4.21 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 13521 2007-09-04 14:02:46Z $
|
47 |
* $Log$
|
48 |
* Revision 1.3.2.1 2007-08-13 10:55:27 jmvivo
|
49 |
* Extraidas los htm de descripcion de las traducciones a un directorio fuera del jar
|
50 |
*
|
51 |
* Revision 1.3 2006/06/29 17:28:24 azabala
|
52 |
* added comments
|
53 |
*
|
54 |
* Revision 1.2 2006/06/27 16:10:14 azabala
|
55 |
* toString() added to interface to force textual representation of geoprocess plugins
|
56 |
*
|
57 |
* Revision 1.1 2006/06/23 19:01:58 azabala
|
58 |
* first version in cvs
|
59 |
*
|
60 |
* Revision 1.1 2006/06/22 17:46:30 azabala
|
61 |
* first version in cvs
|
62 |
*
|
63 |
*
|
64 |
*/
|
65 |
package com.iver.cit.gvsig.geoprocess.core; |
66 |
|
67 |
import java.net.URL; |
68 |
|
69 |
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel; |
70 |
|
71 |
/**
|
72 |
Ofrece acceso a todo lo necesario para a?adir un geoproceso
|
73 |
al geoprocessmanager:
|
74 |
a) geoproceso en si
|
75 |
b) panel grafico
|
76 |
c) html descriptivo
|
77 |
d) imagen descriptiva
|
78 |
e) controlador, que lee las entradas de la GUI y se las
|
79 |
pasa al geoproceso
|
80 |
|
81 |
?Como podemos hacer que cuando un desarrollador externo haga una extension
|
82 |
con nuevos geoprocesos, se cosque el GeoprocessManager?
|
83 |
|
84 |
El geoprocessmanager tendr? asociada una extension, y en esta
|
85 |
extension se construye el componente y se a?aden los geoprocesos del core
|
86 |
(union, diferencia, etc).
|
87 |
Adem?s, construye un punto de extension con el API ExtensionPoints (IverUtiles)
|
88 |
|
89 |
En el metodo initialize() de la Extension ANDAMI del GeoprocessManager,
|
90 |
se crear?a el punto de extension "GeoprocessManager".
|
91 |
|
92 |
Si desde otro proyecto se quiere crear un geoproceso, y que se muestre en el geoprocess
|
93 |
manager, solo habr?a que construir una extension de andami, y en su metodo initialize
|
94 |
a?adir cada geoproceso nuevo al punto de extension.
|
95 |
|
96 |
Luego, desde el GeoprocessManager, en el metodo execute() de la extension
|
97 |
asociada ya se har?a lo siguiente:
|
98 |
ExtensionPoint infoByPoint = (ExtensionPoint)extensionPoints.get("GeoprocessManager");
|
99 |
Iterator infoByPoint =infoByPoint.keySet().iterator();
|
100 |
while( i.hasNext() ) {
|
101 |
String nombre = (String)i.next();
|
102 |
}
|
103 |
Quiz?s sea menos elegante que el mecanismo de los drivers (con su propio
|
104 |
classloader), pero simplifica la gesti?n. No hay que echar ning?n jar
|
105 |
en ning?n directorio. Solo crear las extensiones Andami encargadas de registrar
|
106 |
los nuevos geoprocesos en el punto de extension.
|
107 |
|
108 |
*
|
109 |
* @author azabala
|
110 |
*
|
111 |
*/
|
112 |
|
113 |
public interface IGeoprocessPlugin { |
114 |
public IGeoprocessPanel getGeoprocessPanel();
|
115 |
// JEditorPane htmlPane = new JEditorPane(url);
|
116 |
// htmlPane.setPage(new URL(url));
|
117 |
public URL getHtmlDescription(); |
118 |
/**
|
119 |
* @deprecated
|
120 |
*/
|
121 |
public URL getImgDescription(); |
122 |
public IGeoprocessController getGpController();
|
123 |
/**
|
124 |
* Gives access to the geoprocess namespace.
|
125 |
* Namespaces are artifacts to identify geoproccesses by a path
|
126 |
* (similar to xpath), and to organize them.
|
127 |
* For example:
|
128 |
* Analysis Tools/Overlay/Union
|
129 |
* Data Management Tools/Generalization/Dissolve
|
130 |
* Data Management Tools/Generalization/Dissolve by multiple fields
|
131 |
* @return
|
132 |
*/
|
133 |
public String getNamespace(); |
134 |
/**
|
135 |
* To give a textual representation of the plugin
|
136 |
* @return
|
137 |
*/
|
138 |
public String toString(); |
139 |
} |
140 |
|