root / trunk / org.gvsig.postgresql / org.gvsig.postgresql.app / org.gvsig.postgresql.app.export / src / main / java / org / gvsig / postgresql / exportto / ExporttoPostgreSQLProviderFactory.java @ 61
History | View | Annotate | Download (2.21 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.postgresql.exportto; |
25 |
|
26 |
import org.cresques.cts.IProjection; |
27 |
|
28 |
import org.gvsig.exportto.swing.ExporttoSwingManager; |
29 |
import org.gvsig.exportto.swing.spi.AbstractExporttoProviderFactory; |
30 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
31 |
import org.gvsig.tools.dynobject.DynObject; |
32 |
import org.gvsig.tools.service.ServiceException; |
33 |
import org.gvsig.tools.service.spi.Provider; |
34 |
import org.gvsig.tools.service.spi.ProviderServices; |
35 |
|
36 |
/**
|
37 |
* Factory of file {@link ExportoProvider} objects.
|
38 |
*
|
39 |
* @author gvSIG Team
|
40 |
* @version $Id$
|
41 |
*/
|
42 |
public class ExporttoPostgreSQLProviderFactory extends |
43 |
AbstractExporttoProviderFactory { |
44 |
|
45 |
private static final String PROVIDER_NAME = "PostgreSQLv2"; |
46 |
|
47 |
public ExporttoPostgreSQLProviderFactory() {
|
48 |
super(new int[] { |
49 |
ExporttoSwingManager.VECTORIAL_TABLE_WITHOUT_GEOMETRY, |
50 |
ExporttoSwingManager.VECTORIAL_TABLE_WITH_GEOMETRY }); |
51 |
} |
52 |
|
53 |
public Provider create(DynObject parameters, ProviderServices services) |
54 |
throws ServiceException {
|
55 |
return new ExporttoPostgreSQLProvider(services, |
56 |
(FeatureStore) parameters.getDynValue(PARAMETER_FEATURESTORE), |
57 |
(IProjection) parameters.getDynValue(PARAMETER_PROJECTION)); |
58 |
} |
59 |
|
60 |
public String getName() { |
61 |
return PROVIDER_NAME;
|
62 |
} |
63 |
} |