Statistics
| Revision:

gvsig-geoprocess / org.gvsig.geoprocess / trunk / org.gvsig.geoprocess / org.gvsig.geoprocess.algorithm / org.gvsig.geoprocess.algorithm.merge / src / main / java / org / gvsig / geoprocess / algorithm / merge / MergeLibrary.java @ 237

History | View | Annotate | Download (4.44 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.merge;
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 MergeLibrary library.
39
 * 
40
 * @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a>
41
 */
42
public class MergeLibrary 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.merge.merge", MergeLibrary.class
53
                .getClassLoader(), MergeLibrary.class.getClass().getName());
54
        registerGeoProcess(MergeAlgorithm.class,
55
            getLanguageStrings("org.gvsig.geoprocess.algorithm.merge.merge"));
56
        SextanteGUI.addAlgorithmProvider(new IAlgorithmProvider() {
57

    
58
            public void update() {
59
                // Nothing to do
60
            }
61

    
62
            public void initialize() {
63
                // Nothing to do
64
            }
65

    
66
            public Setting getSettings() {
67
                return new Setting() {
68

    
69
                    @Override
70
                    public String getName() {
71
                        return "gvSIG.MergeAlgorithm";
72
                    }
73

    
74
                    @Override
75
                    public HashMap<String, String> getInitValues() {
76
                        // TODO Auto-generated method stub
77
                        return null;
78
                    }
79

    
80
                    @Override
81
                    public void createPanel() {
82
                        // TODO Auto-generated method stub
83

    
84
                    }
85
                };
86
            }
87

    
88
            public String getName() {
89
                return "gvSIG.MergeAlgorithm";
90
            }
91

    
92
            public ILogHandler getLogHandler() {
93
                // TODO Auto-generated method stub
94
                return null;
95
            }
96

    
97
            public ImageIcon getIcon() {
98
                // TODO Auto-generated method stub
99
                return null;
100
            }
101

    
102
            public HashMap<String, Class> getCustomParameterPanels() {
103
                HashMap<String, Class> panels = new HashMap<String, Class>(1);
104
                panels.put((new MergeAlgorithm()).getCommandLineName(),
105
                    MergeParametersPanel.class);
106
                return panels;
107
            }
108

    
109
            public HashMap<String, Class> getCustomModelerParameterPanels() {
110
                // TODO Auto-generated method stub
111
                return null;
112
            }
113

    
114
            public HashMap<String, GeoAlgorithm> getAlgorithms() {
115
                HashMap<String, GeoAlgorithm> algs =
116
                    new HashMap<String, GeoAlgorithm>(1);
117
                algs.put(getName(), new MergeAlgorithm());
118
                return algs;
119
            }
120

    
121
            public String getAlgorithmHelpFilename(GeoAlgorithm arg0,
122
                boolean arg1) {
123
                // TODO Auto-generated method stub
124
                return null;
125
            }
126

    
127
            public Object getAlgorithmHelp(GeoAlgorithm arg0) {
128
                // TODO Auto-generated method stub
129
                return null;
130
            }
131

    
132
            public boolean canEditHelp() {
133
                // TODO Auto-generated method stub
134
                return false;
135
            }
136
        });
137

    
138
    }
139

    
140
}