svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.sqlite / org.gvsig.sqlite.provider / src / main / java / org / gvsig / sqlite / dal / SQLiteExplorerFactory.java @ 47544
History | View | Annotate | Download (1.45 KB)
1 | 47456 | jjdelcerro | |
---|---|---|---|
2 | package org.gvsig.sqlite.dal; |
||
3 | |||
4 | import org.gvsig.fmap.dal.DataServerExplorerParameters; |
||
5 | import org.gvsig.fmap.dal.exception.InitializeException; |
||
6 | import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices; |
||
7 | import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters; |
||
8 | import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
||
9 | import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
||
10 | import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
||
11 | import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCServerExplorerFactory; |
||
12 | |||
13 | |||
14 | public class SQLiteExplorerFactory extends JDBCServerExplorerFactory { |
||
15 | |||
16 | private static final String NAME = SQLiteLibrary.NAME; |
||
17 | |||
18 | public SQLiteExplorerFactory() {
|
||
19 | super(
|
||
20 | NAME, |
||
21 | "GeoPackage/SQLite (devel)"
|
||
22 | ); |
||
23 | } |
||
24 | |||
25 | @Override
|
||
26 | public JDBCServerExplorer create(
|
||
27 | DataServerExplorerParameters parameters, |
||
28 | DataServerExplorerProviderServices providerServices |
||
29 | ) throws InitializeException {
|
||
30 | JDBCHelper helper = new SQLiteHelper((JDBCConnectionParameters) parameters);
|
||
31 | JDBCServerExplorer server = helper.createServerExplorer( |
||
32 | (JDBCServerExplorerParameters) parameters, |
||
33 | providerServices |
||
34 | ); |
||
35 | return server;
|
||
36 | } |
||
37 | |||
38 | |||
39 | @Override
|
||
40 | public JDBCServerExplorerParameters createParameters() {
|
||
41 | JDBCServerExplorerParameters params = new SQLiteExplorerParameters();
|
||
42 | return params;
|
||
43 | } |
||
44 | |||
45 | } |