Class DataStoreQueryDataSource
- java.lang.Object
-
- com.vividsolutions.jump.io.datasource.DataSource
-
- com.vividsolutions.jump.workbench.ui.plugin.datastore.DataStoreQueryDataSource
-
- All Implemented Interfaces:
WorkbenchContextReference
- Direct Known Subclasses:
DataStoreDataSource
,SaveToPostGISDataSource
public class DataStoreQueryDataSource extends DataSource implements WorkbenchContextReference
Implements the DataSource interface in order to persist a query issued from RunDatastoreQueryPlugIn.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONNECTION_DESCRIPTOR_KEY
static String
DATASET_NAME_KEY
static Pattern
PATTERN_FENCE
static Pattern
PATTERN_SELECTION
static Pattern
PATTERN_VIEW
static String
PRIMARY_KEY_KEY
static String
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 DataStoreQueryDataSource()
DataStoreQueryDataSource(WorkbenchContext context)
Constructor used by the SaveToPostGISPlugIn.DataStoreQueryDataSource(String datasetName, String query, ConnectionDescriptor connectionDescriptor, WorkbenchContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FeatureCollection
createFeatureCollection()
protected static String
expandQuery(String query, PlugInContext context)
Connection
getConnection()
Creates a new Connection to this DataSource.protected WorkbenchContext
getWorkbenchContext()
boolean
isWritable()
void
setWorkbenchContext(WorkbenchContext context)
-
Methods inherited from class com.vividsolutions.jump.io.datasource.DataSource
getProperties, installCoordinateSystem, isDisabled, isReadable, setDisabled, setProperties
-
-
-
-
Field Detail
-
DATASET_NAME_KEY
public static final String DATASET_NAME_KEY
- See Also:
- Constant Field Values
-
SQL_QUERY_KEY
public static final String SQL_QUERY_KEY
- See Also:
- Constant Field Values
-
CONNECTION_DESCRIPTOR_KEY
public static final String CONNECTION_DESCRIPTOR_KEY
- See Also:
- Constant Field Values
-
PRIMARY_KEY_KEY
public static final String PRIMARY_KEY_KEY
- See Also:
- Constant Field Values
-
PATTERN_FENCE
public static final Pattern PATTERN_FENCE
-
PATTERN_SELECTION
public static final Pattern PATTERN_SELECTION
-
PATTERN_VIEW
public static final Pattern PATTERN_VIEW
-
-
Constructor Detail
-
DataStoreQueryDataSource
public DataStoreQueryDataSource()
-
DataStoreQueryDataSource
public DataStoreQueryDataSource(WorkbenchContext context)
Constructor used by the SaveToPostGISPlugIn.
-
DataStoreQueryDataSource
public DataStoreQueryDataSource(String datasetName, String query, ConnectionDescriptor connectionDescriptor, WorkbenchContext context)
-
-
Method Detail
-
getWorkbenchContext
protected WorkbenchContext getWorkbenchContext()
-
isWritable
public boolean isWritable()
- Overrides:
isWritable
in classDataSource
-
getConnection
public Connection getConnection()
Description copied from class:DataSource
Creates a new Connection to this DataSource.- Specified by:
getConnection
in classDataSource
- Returns:
- a Connection to connect to this DataSource
-
createFeatureCollection
protected FeatureCollection createFeatureCollection() throws Exception
- Throws:
Exception
-
setWorkbenchContext
public void setWorkbenchContext(WorkbenchContext context)
- Specified by:
setWorkbenchContext
in interfaceWorkbenchContextReference
-
expandQuery
protected static String expandQuery(String query, PlugInContext context)
-
-