Statistics
| Revision:

gvsig-geoprocess / org.gvsig.geoprocess / branches / refactor-2018 / org.gvsig.geoprocess / org.gvsig.geoprocess.lib / org.gvsig.geoprocess.lib.sextante / src / main / java / org / gvsig / geoprocess / lib / sextante / SextanteGeoProcessLibrary.java @ 1059

History | View | Annotate | Download (2.53 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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.geoprocess.lib.sextante;
25

    
26
import org.gvsig.andami.IconThemeHelper;
27
import org.gvsig.fmap.dal.DALLibrary;
28
import org.gvsig.fmap.mapcontext.MapContextLibrary;
29
import org.gvsig.fmap.mapcontrol.MapControlLibrary;
30
import org.gvsig.geoprocess.lib.api.GeoProcessLibrary;
31
import org.gvsig.geoprocess.lib.api.GeoProcessLocator;
32
import org.gvsig.i18n.Messages;
33
import org.gvsig.tools.library.AbstractLibrary;
34
import org.gvsig.tools.library.LibraryException;
35

    
36
import es.unex.sextante.core.Sextante;
37

    
38
/**
39
 * GeoProcess API implementation based on the sextante library.
40
 *
41
 * @author gvSIG Team
42
 * @version $Id$
43
 */
44
public class SextanteGeoProcessLibrary extends AbstractLibrary {
45

    
46
    @Override
47
    public void doRegistration() {
48
        registerAsImplementationOf(GeoProcessLibrary.class);
49
        require(DALLibrary.class);
50
        require(MapContextLibrary.class);
51
        require(MapControlLibrary.class);
52
        //require(FmapRasterLibrary.class);
53
        //require(RasterLibrary.class);
54
    }
55

    
56
    @Override
57
    protected void doInitialize() throws LibraryException {
58
        // Nothing to do
59
        Sextante.initialize();
60

    
61
    }
62

    
63
    @Override
64
    protected void doPostInitialize() throws LibraryException {
65

    
66
        Messages.addResourceFamily(
67
                "org.gvsig.geoprocess.lib.sextante.i18n.text", SextanteGeoProcessLibrary.class
68
                    .getClassLoader(), SextanteGeoProcessLibrary.class.getClass().getName());
69

    
70
        GeoProcessLocator
71
            .registerGeoProcessManager(SextanteGeoProcessManager.class);
72
        IconThemeHelper.registerIcon(null, "gvsig-icon16x16", this);
73
    }
74

    
75
}