Statistics
| Revision:

gvsig-geoprocess / org.gvsig.sextante / trunk / org.gvsig.sextante.app / org.gvsig.sextante.app.algorithm / org.gvsig.sextante.app.algorithm.dissolve / src / main / java / org / gvsig / sextante / app / algorithm / dissolve / DissolveLibrary.java @ 172

History | View | Annotate | Download (4.73 KB)

1
/*
2
 * gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2010 Generalitat Valenciana.
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 */
21
package org.gvsig.sextante.app.algorithm.dissolve;
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.core.Sextante;
29
import es.unex.sextante.gui.core.IAlgorithmProvider;
30
import es.unex.sextante.gui.core.ILogHandler;
31
import es.unex.sextante.gui.core.SextanteGUI;
32
import es.unex.sextante.gui.settings.Setting;
33

    
34
import org.gvsig.i18n.Messages;
35
import org.gvsig.sextante.app.algorithm.base.core.AlgorithmAbstractLibrary;
36
import org.gvsig.tools.library.LibraryException;
37

    
38
/**
39
 * Initialization of DissolveLibrary library. 
40
 * 
41
 * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
42
 */
43
public class DissolveLibrary extends AlgorithmAbstractLibrary {
44

    
45
        @Override
46
        protected void doInitialize() throws LibraryException {
47
                
48
        }
49

    
50
        @Override
51
        protected void doPostInitialize() throws LibraryException {
52
                Messages.addResourceFamily(
53
                                "org.gvsig.sextante.app.algorithm.dissolve.dissolve",
54
                                DissolveLibrary.class.getClassLoader(),
55
                                DissolveLibrary.class.getClass().getName());
56
                setLanguageStrings("org.gvsig.sextante.app.algorithm.dissolve.dissolve");
57
        Sextante.addGeoalgorithm("gvSIG", DissolveAlgorithm.class, text);
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.DissolveAlgorithm";
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.DissolveAlgorithm";
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 DissolveAlgorithm()).getCommandLineName(),
107
                    DissolveParametersPanel.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 DissolveAlgorithm());
120
                return algs;
121
            }
122
            
123
            public String getAlgorithmHelpFilename(GeoAlgorithm arg0, boolean arg1) {
124
                // TODO Auto-generated method stub
125
                return null;
126
            }
127
            
128
            public Object getAlgorithmHelp(GeoAlgorithm arg0) {
129
                // TODO Auto-generated method stub
130
                return null;
131
            }
132
            
133
            public boolean canEditHelp() {
134
                // TODO Auto-generated method stub
135
                return false;
136
            }
137
        });
138
        }
139

    
140
}