Class SaveToPostGISDataSource
- java.lang.Object
-
- com.vividsolutions.jump.io.datasource.DataSource
-
- com.vividsolutions.jump.workbench.ui.plugin.datastore.DataStoreQueryDataSource
-
- org.openjump.core.ui.plugin.datastore.postgis.SaveToPostGISDataSource
-
- All Implemented Interfaces:
WorkbenchContextReference
public class SaveToPostGISDataSource extends DataStoreQueryDataSource
Add Write capabilities to DataStoreQueryDataSource for PostGIS table.There is now a more poweful way to connect to a postgis table with write access. See
PostGISDataStoreDataSource
andWritableDataStoreDataSource
-
-
Field Summary
Fields Modifier and Type Field Description static String
PRIMARY_KEY
static String
SAVE_METHOD_CREATE
static String
SAVE_METHOD_DELETE
static String
SAVE_METHOD_INSERT
static String
SAVE_METHOD_KEY
static String
SAVE_METHOD_REPLACE
static String
SAVE_METHOD_UPDATE
static String
SRID_KEY
static String
TABLE_KEY
static String
USE_DB_PRIMARY_KEY
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.plugin.datastore.DataStoreQueryDataSource
CONNECTION_DESCRIPTOR_KEY, DATASET_NAME_KEY, PATTERN_FENCE, PATTERN_SELECTION, PATTERN_VIEW, PRIMARY_KEY_KEY, SQL_QUERY_KEY
-
Fields inherited from class com.vividsolutions.jump.io.datasource.DataSource
CHARSET_KEY, COMPRESSED_KEY, COORDINATE_SYSTEM_CODE, COORDINATE_SYSTEM_KEY, COORDINATE_SYSTEM_REGISTRY, FILE_KEY, URI_KEY
-
-
Constructor Summary
Constructors Constructor Description SaveToPostGISDataSource()
SaveToPostGISDataSource(WorkbenchContext context)
Constructor used by the SaveToPostGISPlugIn.SaveToPostGISDataSource(String tableName, String geometryColumnName, ConnectionDescriptor connectionDescriptor, WorkbenchContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
getConnection()
Creates a new Connection to this DataSource.static int
getGeometryDimension(FeatureCollection coll, int defaultDim)
Return 3 if coll contains at least one 3d geometry, 2 if coll contains only 2d geometries and defaultDim if coll is empty.boolean
isWritable()
-
Methods inherited from class com.vividsolutions.jump.workbench.ui.plugin.datastore.DataStoreQueryDataSource
createFeatureCollection, expandQuery, getWorkbenchContext, setWorkbenchContext
-
Methods inherited from class com.vividsolutions.jump.io.datasource.DataSource
getProperties, installCoordinateSystem, isDisabled, isReadable, setDisabled, setProperties
-
-
-
-
Field Detail
-
TABLE_KEY
public static final String TABLE_KEY
- See Also:
- Constant Field Values
-
SAVE_METHOD_KEY
public static final String SAVE_METHOD_KEY
- See Also:
- Constant Field Values
-
SAVE_METHOD_CREATE
public static final String SAVE_METHOD_CREATE
- See Also:
- Constant Field Values
-
SAVE_METHOD_REPLACE
public static final String SAVE_METHOD_REPLACE
- See Also:
- Constant Field Values
-
SAVE_METHOD_INSERT
public static final String SAVE_METHOD_INSERT
- See Also:
- Constant Field Values
-
SAVE_METHOD_UPDATE
public static final String SAVE_METHOD_UPDATE
- See Also:
- Constant Field Values
-
SAVE_METHOD_DELETE
public static final String SAVE_METHOD_DELETE
- See Also:
- Constant Field Values
-
PRIMARY_KEY
public static final String PRIMARY_KEY
- See Also:
- Constant Field Values
-
USE_DB_PRIMARY_KEY
public static final String USE_DB_PRIMARY_KEY
- See Also:
- Constant Field Values
-
SRID_KEY
public static final String SRID_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SaveToPostGISDataSource
public SaveToPostGISDataSource()
-
SaveToPostGISDataSource
public SaveToPostGISDataSource(WorkbenchContext context)
Constructor used by the SaveToPostGISPlugIn.
-
SaveToPostGISDataSource
public SaveToPostGISDataSource(String tableName, String geometryColumnName, ConnectionDescriptor connectionDescriptor, WorkbenchContext context)
-
-
Method Detail
-
isWritable
public boolean isWritable()
- Overrides:
isWritable
in classDataStoreQueryDataSource
-
getConnection
public Connection getConnection()
Description copied from class:DataSource
Creates a new Connection to this DataSource.- Overrides:
getConnection
in classDataStoreQueryDataSource
- Returns:
- a Connection to connect to this DataSource
-
getGeometryDimension
public static int getGeometryDimension(FeatureCollection coll, int defaultDim)
Return 3 if coll contains at least one 3d geometry, 2 if coll contains only 2d geometries and defaultDim if coll is empty.
-
-