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 |
/* 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 |
import java.util.Locale; |
25 |
|
26 |
import org.gvsig.educa.thematicmap.ThematicMapLibrary; |
27 |
import org.gvsig.educa.thematicmap.ThematicMapLocator; |
28 |
import org.gvsig.educa.thematicmap.impl.compilation.DefaultThematicMapCompilationInformation; |
29 |
import org.gvsig.educa.thematicmap.impl.map.DefaultThematicMapInformation; |
30 |
import org.gvsig.educa.thematicmap.spi.ThematicMapProviderLocator; |
31 |
import org.gvsig.i18n.Messages; |
32 |
import org.gvsig.tools.library.AbstractLibrary; |
33 |
import org.gvsig.tools.library.LibraryException; |
34 |
|
35 |
/**
|
36 |
* Library for default implementation initialization and configuration.
|
37 |
*
|
38 |
* @author gvSIG team
|
39 |
* @version $Id$
|
40 |
*/
|
41 |
public class ThematicMapDefaultImplLibrary extends AbstractLibrary { |
42 |
|
43 |
@Override
|
44 |
public void doRegistration() { |
45 |
registerAsImplementationOf(ThematicMapLibrary.class); |
46 |
} |
47 |
|
48 |
/** {@inheridDoc} */
|
49 |
@Override
|
50 |
protected void doInitialize() throws LibraryException { |
51 |
ThematicMapLocator.registerManager(DefaultThematicMapManager.class); |
52 |
ThematicMapLocator |
53 |
.registerFileServices(DefaultThematicMapFileServices.class); |
54 |
ThematicMapProviderLocator |
55 |
.registerManager(DefaultThematicMapProviderManager.class); |
56 |
} |
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 |
|
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 |
|
76 |
IconThemeHelper.registerIcon("thematicmap-editor", "thematicmap-editor-wizard", this); |
77 |
} |
78 |
|
79 |
} |