gvsig-educa / org.gvsig.educa.thematicmap / trunk / org.gvsig.educa.thematicmap / org.gvsig.educa.thematicmap.lib / org.gvsig.educa.thematicmap.lib.impl / src / main / java / org / gvsig / educa / thematicmap / impl / ThematicMapDefaultImplLibrary.java @ 220
History | View | Annotate | Download (2.93 KB)
1 | 2 | jmvivo | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
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 | */
|
||
22 | package org.gvsig.educa.thematicmap.impl; |
||
23 | |||
24 | 53 | jmvivo | import java.util.Locale; |
25 | |||
26 | 4 | jmvivo | import org.gvsig.educa.thematicmap.ThematicMapLibrary; |
27 | 5 | jmvivo | import org.gvsig.educa.thematicmap.ThematicMapLocator; |
28 | 2 | jmvivo | import org.gvsig.educa.thematicmap.impl.compilation.DefaultThematicMapCompilationInformation; |
29 | import org.gvsig.educa.thematicmap.impl.map.DefaultThematicMapInformation; |
||
30 | 195 | nfrancisco | import org.gvsig.educa.thematicmap.spi.ThematicMapProviderLocator; |
31 | 53 | jmvivo | import org.gvsig.i18n.Messages; |
32 | 2 | jmvivo | import org.gvsig.tools.library.AbstractLibrary; |
33 | import org.gvsig.tools.library.LibraryException; |
||
34 | |||
35 | /**
|
||
36 | * Library for default implementation initialization and configuration.
|
||
37 | 53 | jmvivo | *
|
38 | 2 | jmvivo | * @author gvSIG team
|
39 | * @version $Id$
|
||
40 | */
|
||
41 | public class ThematicMapDefaultImplLibrary extends AbstractLibrary { |
||
42 | |||
43 | 4 | jmvivo | @Override
|
44 | public void doRegistration() { |
||
45 | registerAsImplementationOf(ThematicMapLibrary.class); |
||
46 | } |
||
47 | |||
48 | 2 | jmvivo | /** {@inheridDoc} */
|
49 | @Override
|
||
50 | protected void doInitialize() throws LibraryException { |
||
51 | 5 | jmvivo | ThematicMapLocator.registerManager(DefaultThematicMapManager.class); |
52 | 55 | jmvivo | ThematicMapLocator |
53 | .registerFileServices(DefaultThematicMapFileServices.class); |
||
54 | 195 | nfrancisco | ThematicMapProviderLocator |
55 | .registerManager(DefaultThematicMapProviderManager.class); |
||
56 | 2 | jmvivo | } |
57 | |||
58 | /** {@inheridDoc} */
|
||
59 | @Override
|
||
60 | protected void doPostInitialize() throws LibraryException { |
||
61 | DefaultThematicMapInformation.registerPersistent(); |
||
62 | try {
|
||
63 | DefaultThematicMapCompilationInformation.registerPersistentAlias(); |
||
64 | } catch (Exception e) { |
||
65 | throw new LibraryException(getClass(), e); |
||
66 | } |
||
67 | 53 | jmvivo | |
68 | // Register i18n messages
|
||
69 | Messages.addLocale(Locale.getDefault());
|
||
70 | Messages.addLocale(new Locale(Locale.getDefault().getLanguage())); |
||
71 | Messages.addResourceFamily( |
||
72 | "org.gvsig.educa.thematicmap.impl.i18n.text",
|
||
73 | ThematicMapDefaultImplLibrary.class.getClassLoader(), |
||
74 | ThematicMapDefaultImplLibrary.class.getClass().getName()); |
||
75 | 220 | nfrancisco | |
76 | IconThemeHelper.registerIcon("thematicmap-editor", "thematicmap-editor-wizard", this); |
||
77 | 2 | jmvivo | } |
78 | |||
79 | } |