svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dalfile / src / org / gvsig / fmap / dal / store / dxf / DXFLibrary.java @ 30757
History | View | Annotate | Download (2.87 KB)
1 | 24452 | 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 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2008 IVER T.I. S.A. {{Task}}
|
||
26 | */
|
||
27 | |||
28 | 24498 | jmvivo | package org.gvsig.fmap.dal.store.dxf; |
29 | 24452 | jmvivo | |
30 | 30717 | jpiera | import org.gvsig.fmap.dal.DALFileLibrary; |
31 | 24893 | jmvivo | import org.gvsig.fmap.dal.DALFileLocator; |
32 | 24498 | jmvivo | import org.gvsig.fmap.dal.DALLocator; |
33 | 30757 | jpiera | import org.gvsig.fmap.dal.impl.DALDefaultImplLibrary; |
34 | 24498 | jmvivo | import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
35 | 25789 | jmvivo | import org.gvsig.tools.ToolsLocator; |
36 | import org.gvsig.tools.dynobject.DynClass; |
||
37 | import org.gvsig.tools.dynobject.DynField; |
||
38 | import org.gvsig.tools.dynobject.DynObjectManager; |
||
39 | 30633 | cordinyana | import org.gvsig.tools.library.AbstractLibrary; |
40 | 30580 | cordinyana | import org.gvsig.tools.library.LibraryException; |
41 | 24452 | jmvivo | |
42 | 30633 | cordinyana | public class DXFLibrary extends AbstractLibrary { |
43 | 25924 | jmvivo | |
44 | 30580 | cordinyana | @Override
|
45 | protected void doInitialize() throws LibraryException { |
||
46 | } |
||
47 | 25548 | cordinyana | |
48 | 30580 | cordinyana | @Override
|
49 | protected void doPostInitialize() throws LibraryException { |
||
50 | 30757 | jpiera | new DALDefaultImplLibrary().postInitialize();
|
51 | 30717 | jpiera | new DALFileLibrary().postInitialize();
|
52 | 30712 | cordinyana | |
53 | 25924 | jmvivo | DXFStoreParameters.registerDynClass(); |
54 | // DXFNewStoreParameters.registerDynClass();
|
||
55 | DXFStoreProvider.registerDynClass(); |
||
56 | |||
57 | 25551 | cordinyana | // DynObjectManager dynObjectManager =
|
58 | 25924 | jmvivo | // ToolsLocator.getDynObjectManager();
|
59 | //
|
||
60 | // DynClass dynClass = dynObjectManager.add("DXFStoreParameters",
|
||
61 | // "DXF File Store parameters");
|
||
62 | // dynClass.addDynField("srsid");
|
||
63 | // dynClass.addDynField("filepath");
|
||
64 | 25548 | cordinyana | |
65 | DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator |
||
66 | 24452 | jmvivo | .getDataManager(); |
67 | |||
68 | if (!dataman.getStoreProviders().contains(DXFStoreProvider.NAME)) {
|
||
69 | dataman.registerStoreProvider(DXFStoreProvider.NAME, |
||
70 | DXFStoreProvider.class, DXFStoreParameters.class); |
||
71 | } |
||
72 | |||
73 | 24916 | jmvivo | DALFileLocator.getFilesystemServerExplorerManager().registerProvider( |
74 | 24959 | jmvivo | DXFStoreProvider.NAME, DXFStoreProvider.DESCRIPTION, |
75 | 24916 | jmvivo | DXFFilesystemServerProvider.class); |
76 | 25789 | jmvivo | |
77 | DynObjectManager dynMan = ToolsLocator.getDynObjectManager(); |
||
78 | DynClass dynClass = dynMan.get( |
||
79 | DXFStoreProvider.DYNCLASS_NAME); |
||
80 | DynField field; |
||
81 | if (dynClass == null) { |
||
82 | dynClass = dynMan.add( |
||
83 | DXFStoreProvider.DYNCLASS_NAME); |
||
84 | |||
85 | } |
||
86 | 24452 | jmvivo | } |
87 | 30580 | cordinyana | } |