gvsig-geoprocess / org.gvsig.geoprocess / trunk / org.gvsig.geoprocess / org.gvsig.geoprocess.lib / org.gvsig.geoprocess.lib.sextante / src / main / java / org / gvsig / geoprocess / lib / sextante / SextanteGeoProcessLibrary.java @ 649
History | View | Annotate | Download (2.62 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.dal.coverage.RasterLibrary; |
29 |
import org.gvsig.fmap.mapcontext.MapContextLibrary; |
30 |
import org.gvsig.fmap.mapcontrol.MapControlLibrary; |
31 |
import org.gvsig.geoprocess.lib.api.GeoProcessLibrary; |
32 |
import org.gvsig.geoprocess.lib.api.GeoProcessLocator; |
33 |
import org.gvsig.i18n.Messages; |
34 |
import org.gvsig.raster.fmap.FmapRasterLibrary; |
35 |
import org.gvsig.tools.library.AbstractLibrary; |
36 |
import org.gvsig.tools.library.LibraryException; |
37 |
|
38 |
import es.unex.sextante.core.Sextante; |
39 |
|
40 |
/**
|
41 |
* GeoProcess API implementation based on the sextante library.
|
42 |
*
|
43 |
* @author gvSIG Team
|
44 |
* @version $Id$
|
45 |
*/
|
46 |
public class SextanteGeoProcessLibrary extends AbstractLibrary { |
47 |
|
48 |
@Override
|
49 |
public void doRegistration() { |
50 |
registerAsImplementationOf(GeoProcessLibrary.class); |
51 |
require(DALLibrary.class); |
52 |
require(MapContextLibrary.class); |
53 |
require(MapControlLibrary.class); |
54 |
require(FmapRasterLibrary.class); |
55 |
require(RasterLibrary.class); |
56 |
} |
57 |
|
58 |
@Override
|
59 |
protected void doInitialize() throws LibraryException { |
60 |
// Nothing to do
|
61 |
Sextante.initialize(); |
62 |
|
63 |
} |
64 |
|
65 |
@Override
|
66 |
protected void doPostInitialize() throws LibraryException { |
67 |
|
68 |
Messages.addResourceFamily( |
69 |
"org.gvsig.geoprocess.lib.sextante.i18n.text", SextanteGeoProcessLibrary.class
|
70 |
.getClassLoader(), SextanteGeoProcessLibrary.class.getClass().getName()); |
71 |
|
72 |
GeoProcessLocator |
73 |
.registerGeoProcessManager(SextanteGeoProcessManager.class); |
74 |
IconThemeHelper.registerIcon(null, "gvsig-icon16x16", this); |
75 |
} |
76 |
|
77 |
} |