svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extOracleSpatial / src-test / org / gvsig / oraclespatial / TextExportToOracle.java @ 29563
History | View | Annotate | Download (2.46 KB)
1 |
import org.cresques.ProjectionLibrary; |
---|---|
2 |
import org.cresques.impl.CresquesCtsLibrary; |
3 |
import org.gvsig.fmap.dal.DALDbLibrary; |
4 |
import org.gvsig.fmap.dal.index.spatial.jts.JTSIndexLibrary; |
5 |
import org.gvsig.fmap.dal.store.db.DBStoreLibrary; |
6 |
import org.gvsig.fmap.dal.store.jdbc.JDBCLibrary; |
7 |
import org.gvsig.fmap.dal.store.postgresql.PostgreSQLLibrary; |
8 |
import org.gvsig.fmap.geom.impl.DefaultGeometryLibrary; |
9 |
import org.gvsig.fmap.mapcontext.MapContext; |
10 |
import org.gvsig.fmap.mapcontext.MapContextLibrary; |
11 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
12 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
13 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
14 |
import org.gvsig.fmap.mapcontrol.MapControl; |
15 |
import org.gvsig.fmap.mapcontrol.MapControlsLibrary; |
16 |
import org.gvsig.oraclespatial.extension.ExportToOracle; |
17 |
import org.gvsig.tools.ToolsLocator; |
18 |
import org.gvsig.tools.persistence.xmlentity.XMLEntityManager; |
19 |
|
20 |
import junit.framework.TestCase; |
21 |
|
22 |
|
23 |
public class TextExportToOracle extends TestCase { |
24 |
|
25 |
public TextExportToOracle(){
|
26 |
|
27 |
ToolsLocator.registerDefaultPersistenceManager(XMLEntityManager.class); |
28 |
|
29 |
DefaultGeometryLibrary defGeomLib = new DefaultGeometryLibrary();
|
30 |
defGeomLib.initialize(); |
31 |
|
32 |
ProjectionLibrary projLib = new ProjectionLibrary();
|
33 |
projLib.initialize(); |
34 |
|
35 |
CresquesCtsLibrary cresquesLib = new CresquesCtsLibrary();
|
36 |
cresquesLib.initialize(); |
37 |
|
38 |
DALDbLibrary libDb = new DALDbLibrary();
|
39 |
libDb.initialize(); |
40 |
|
41 |
DBStoreLibrary libDbStore = new DBStoreLibrary();
|
42 |
libDbStore.initialize(); |
43 |
|
44 |
JDBCLibrary libJDBC = new JDBCLibrary();
|
45 |
libJDBC.initialize(); |
46 |
|
47 |
JTSIndexLibrary jtsIndex = new JTSIndexLibrary();
|
48 |
jtsIndex.initialize(); |
49 |
|
50 |
MapContextLibrary mapContext = new MapContextLibrary();
|
51 |
mapContext.initialize(); |
52 |
|
53 |
MapControlsLibrary mapControl = new MapControlsLibrary();
|
54 |
mapContext.initialize(); |
55 |
|
56 |
projLib.postInitialize(); |
57 |
cresquesLib.postInitialize(); |
58 |
defGeomLib.postInitialize(); |
59 |
libDb.postInitialize(); |
60 |
libDbStore.postInitialize(); |
61 |
libJDBC.postInitialize(); |
62 |
jtsIndex.postInitialize(); |
63 |
mapContext.postInitialize(); |
64 |
mapControl.postInitialize(); |
65 |
} |
66 |
|
67 |
public void testExportLayer(){ |
68 |
|
69 |
MapControl control = new MapControl();
|
70 |
MapContext context = control.getMapContext(); |
71 |
|
72 |
FLyrVect layer = getLayer(); |
73 |
|
74 |
ExportToOracle exp = new ExportToOracle();
|
75 |
exp.toOracle(context, layer); |
76 |
|
77 |
} |
78 |
|
79 |
|
80 |
private FLyrVect getLayer(){
|
81 |
|
82 |
|
83 |
return null; |
84 |
} |
85 |
} |