gvsig-geoprocess / org.gvsig.geoprocess / trunk / org.gvsig.geoprocess / org.gvsig.geoprocess.algorithm / org.gvsig.geoprocess.algorithm.spatialjoin / src / main / java / org / gvsig / geoprocess / algorithm / spatialjoin / SpatialJoinLibrary.java @ 237
History | View | Annotate | Download (4.55 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007,2012 gvSIG Association.
|
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 |
package org.gvsig.geoprocess.algorithm.spatialjoin; |
22 |
|
23 |
import java.util.HashMap; |
24 |
|
25 |
import javax.swing.ImageIcon; |
26 |
|
27 |
import es.unex.sextante.core.GeoAlgorithm; |
28 |
import es.unex.sextante.gui.core.IAlgorithmProvider; |
29 |
import es.unex.sextante.gui.core.ILogHandler; |
30 |
import es.unex.sextante.gui.core.SextanteGUI; |
31 |
import es.unex.sextante.gui.settings.Setting; |
32 |
|
33 |
import org.gvsig.geoprocess.algorithm.base.core.AlgorithmAbstractLibrary; |
34 |
import org.gvsig.i18n.Messages; |
35 |
import org.gvsig.tools.library.LibraryException; |
36 |
|
37 |
/**
|
38 |
* Initialization of SpatialJoinLibrary library.
|
39 |
*
|
40 |
* @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
|
41 |
*/
|
42 |
public class SpatialJoinLibrary extends AlgorithmAbstractLibrary { |
43 |
|
44 |
@Override
|
45 |
protected void doInitialize() throws LibraryException { |
46 |
|
47 |
} |
48 |
|
49 |
@Override
|
50 |
protected void doPostInitialize() throws LibraryException { |
51 |
Messages.addResourceFamily( |
52 |
"org.gvsig.geoprocess.algorithm.spatialjoin.spatialjoin",
|
53 |
SpatialJoinLibrary.class.getClassLoader(), SpatialJoinLibrary.class |
54 |
.getClass().getName()); |
55 |
registerGeoProcess( |
56 |
SpatialJoinAlgorithm.class, |
57 |
getLanguageStrings("org.gvsig.geoprocess.algorithm.spatialjoin.spatialjoin"));
|
58 |
SextanteGUI.addAlgorithmProvider(new IAlgorithmProvider() {
|
59 |
|
60 |
public void update() { |
61 |
// Nothing to do
|
62 |
} |
63 |
|
64 |
public void initialize() { |
65 |
// Nothing to do
|
66 |
} |
67 |
|
68 |
public Setting getSettings() {
|
69 |
return new Setting() { |
70 |
|
71 |
@Override
|
72 |
public String getName() { |
73 |
return "gvSIG.SpatialJoinAlgorithm"; |
74 |
} |
75 |
|
76 |
@Override
|
77 |
public HashMap<String, String> getInitValues() { |
78 |
// TODO Auto-generated method stub
|
79 |
return null; |
80 |
} |
81 |
|
82 |
@Override
|
83 |
public void createPanel() { |
84 |
// TODO Auto-generated method stub
|
85 |
|
86 |
} |
87 |
}; |
88 |
} |
89 |
|
90 |
public String getName() { |
91 |
return "gvSIG.SpatialJoinAlgorithm"; |
92 |
} |
93 |
|
94 |
public ILogHandler getLogHandler() {
|
95 |
// TODO Auto-generated method stub
|
96 |
return null; |
97 |
} |
98 |
|
99 |
public ImageIcon getIcon() { |
100 |
// TODO Auto-generated method stub
|
101 |
return null; |
102 |
} |
103 |
|
104 |
public HashMap<String, Class> getCustomParameterPanels() { |
105 |
HashMap<String, Class> panels = new HashMap<String, Class>(1); |
106 |
panels.put((new SpatialJoinAlgorithm()).getCommandLineName(),
|
107 |
SpatialJoinParametersPanel.class); |
108 |
return panels;
|
109 |
} |
110 |
|
111 |
public HashMap<String, Class> getCustomModelerParameterPanels() { |
112 |
// TODO Auto-generated method stub
|
113 |
return null; |
114 |
} |
115 |
|
116 |
public HashMap<String, GeoAlgorithm> getAlgorithms() { |
117 |
HashMap<String, GeoAlgorithm> algs = |
118 |
new HashMap<String, GeoAlgorithm>(1); |
119 |
algs.put(getName(), new SpatialJoinAlgorithm());
|
120 |
return algs;
|
121 |
} |
122 |
|
123 |
public String getAlgorithmHelpFilename(GeoAlgorithm arg0, |
124 |
boolean arg1) {
|
125 |
// TODO Auto-generated method stub
|
126 |
return null; |
127 |
} |
128 |
|
129 |
public Object getAlgorithmHelp(GeoAlgorithm arg0) { |
130 |
// TODO Auto-generated method stub
|
131 |
return null; |
132 |
} |
133 |
|
134 |
public boolean canEditHelp() { |
135 |
// TODO Auto-generated method stub
|
136 |
return false; |
137 |
} |
138 |
}); |
139 |
} |
140 |
|
141 |
} |