svn-gvsig-desktop / tags / v1_1_Build_1015 / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / core / IGeoprocessPlugin.java @ 13679
History | View | Annotate | Download (4.21 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 | 13028 | jmvivo | * 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 | 6106 | azabala | * added comments
|
53 | *
|
||
54 | * Revision 1.2 2006/06/27 16:10:14 azabala
|
||
55 | 6054 | azabala | * toString() added to interface to force textual representation of geoprocess plugins
|
56 | *
|
||
57 | * Revision 1.1 2006/06/23 19:01:58 azabala
|
||
58 | 6018 | azabala | * 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 | 13028 | jmvivo | |
81 | 6018 | azabala | ?Como podemos hacer que cuando un desarrollador externo haga una extension
|
82 | con nuevos geoprocesos, se cosque el GeoprocessManager?
|
||
83 | 13028 | jmvivo | |
84 | 6106 | azabala | El geoprocessmanager tendr? asociada una extension, y en esta
|
85 | 6018 | azabala | 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 | 13028 | jmvivo | |
89 | 6018 | azabala | En el metodo initialize() de la Extension ANDAMI del GeoprocessManager,
|
90 | se crear?a el punto de extension "GeoprocessManager".
|
||
91 | 13028 | jmvivo | |
92 | 6018 | azabala | 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 | 13028 | jmvivo | |
96 | 6018 | azabala | Luego, desde el GeoprocessManager, en el metodo execute() de la extension
|
97 | asociada ya se har?a lo siguiente:
|
||
98 | 13028 | jmvivo | ExtensionPoint infoByPoint = (ExtensionPoint)extensionPoints.get("GeoprocessManager");
|
99 | 6018 | azabala | Iterator infoByPoint =infoByPoint.keySet().iterator();
|
100 | 13028 | jmvivo | while( i.hasNext() ) {
|
101 | String nombre = (String)i.next();
|
||
102 | 6018 | azabala | }
|
103 | 13028 | jmvivo | Quiz?s sea menos elegante que el mecanismo de los drivers (con su propio
|
104 | 6018 | azabala | 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 | 13028 | jmvivo | |
108 | *
|
||
109 | 6018 | azabala | * @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 | 13028 | jmvivo | /**
|
119 | * @deprecated
|
||
120 | */
|
||
121 | 6018 | azabala | public URL getImgDescription(); |
122 | public IGeoprocessController getGpController();
|
||
123 | /**
|
||
124 | 13028 | jmvivo | * Gives access to the geoprocess namespace.
|
125 | 6018 | azabala | * Namespaces are artifacts to identify geoproccesses by a path
|
126 | * (similar to xpath), and to organize them.
|
||
127 | * For example:
|
||
128 | 13028 | jmvivo | * Analysis Tools/Overlay/Union
|
129 | 6018 | azabala | * Data Management Tools/Generalization/Dissolve
|
130 | * Data Management Tools/Generalization/Dissolve by multiple fields
|
||
131 | * @return
|
||
132 | */
|
||
133 | public String getNamespace(); |
||
134 | 6054 | azabala | /**
|
135 | * To give a textual representation of the plugin
|
||
136 | * @return
|
||
137 | */
|
||
138 | public String toString(); |
||
139 | 6018 | azabala | } |