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