Class DuckDBDataStore
- All Implemented Interfaces:
Wrapper,DataAccess<SimpleFeatureType,,SimpleFeature> DataStore,Wrapper
-
Field Summary
Fields inherited from class ForwardingDataStore
delegate -
Constructor Summary
ConstructorsConstructorDescriptionDuckDBDataStore(JDBCDataStore delegate) DuckDBDataStore(JDBCDataStore delegate, boolean readOnly) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSchema(SimpleFeatureType featureType) Creates storage for a newfeatureType.getFeatureSource(String typeName) Gets aSimpleFeatureSourcefor features of the specified type.getFeatureSource(Name typeName) Gets aSimpleFeatureSourcefor features of the type specified by a qualified name (namespace plus type name).getFeatureWriter(String typeName, Transaction transaction) Gets aFeatureWriterto modify features in thisDataStore.getFeatureWriter(String typeName, Filter filter, Transaction transaction) Gets aFeatureWriterto modify features in thisDataStore.getFeatureWriterAppend(String typeName, Transaction transaction) Gets aFeatureWriterthat can add new features to theDataStore.booleanvoidremoveSchema(String typeName) Used to permanently remove a schema from the underlying storagevoidremoveSchema(Name typeName) Used to permanently remove a schema from the underlying storagevoidupdateSchema(String typeName, SimpleFeatureType featureType) Applies a new schema to the given feature type.voidupdateSchema(Name typeName, SimpleFeatureType featureType) Used to update a schema in place.Methods inherited from class ForwardingDataStore
dispose, getFeatureReader, getInfo, getLockingManager, getNames, getSchema, getSchema, getTypeNames, isWrapperFor, unwrap
-
Constructor Details
-
DuckDBDataStore
-
DuckDBDataStore
-
-
Method Details
-
isReadOnly
public boolean isReadOnly() -
getFeatureSource
Description copied from interface:DataStoreGets aSimpleFeatureSourcefor features of the specified type.SimpleFeatureSourceprovides a high-level API for feature operations.The resulting
SimpleFeatureSourcemay implment more functionality as in this example:SimpleFeatureSource fsource = dataStore.getFeatureSource("roads"); if (fsource instanceof SimpleFeatureStore) { // we have write access to the feature data SimpleFeatureStore fstore = (SimpleFeatureStore) fs; } else { // System.out.println("We do not have write access to roads"); }- Specified by:
getFeatureSourcein interfaceDataStore- Overrides:
getFeatureSourcein classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- the feature type- Returns:
- a
SimpleFeatureSource(or possibly a subclass) providing operations for features of the specified type - Throws:
IOException- if data access errors occur- See Also:
-
getFeatureSource
Description copied from interface:DataStoreGets aSimpleFeatureSourcefor features of the type specified by a qualified name (namespace plus type name).- Specified by:
getFeatureSourcein interfaceDataAccess<SimpleFeatureType,SimpleFeature> - Specified by:
getFeatureSourcein interfaceDataStore- Overrides:
getFeatureSourcein classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- the qualified name of the feature type- Returns:
- a
SimpleFeatureSource(or possibly a subclass) providing operations for features of the specified type - Throws:
IOException- if data access errors occur- See Also:
-
createSchema
Description copied from interface:DataAccessCreates storage for a newfeatureType.The provided
featureTypewe be accessable by the typeName provided by featureType.getTypeName().- Specified by:
createSchemain interfaceDataAccess<SimpleFeatureType,SimpleFeature> - Overrides:
createSchemain classForwardingDataStore<JDBCDataStore>- Parameters:
featureType- FetureType to add to DataStore- Throws:
IOException- If featureType cannot be created
-
updateSchema
Description copied from interface:DataStoreApplies a new schema to the given feature type. This can be used to add or remove properties. The resulting update will be persistent.- Specified by:
updateSchemain interfaceDataStore- Overrides:
updateSchemain classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- name of the feature type to updatefeatureType- the new schema to apply- Throws:
IOException- on error
-
updateSchema
Description copied from interface:DataAccessUsed to update a schema in place.This functionality is similar to an "alter table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
- Specified by:
updateSchemain interfaceDataAccess<SimpleFeatureType,SimpleFeature> - Overrides:
updateSchemain classForwardingDataStore<JDBCDataStore>- Throws:
IOException- if the operation failed
-
removeSchema
Description copied from interface:DataAccessUsed to permanently remove a schema from the underlying storageThis functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
- Specified by:
removeSchemain interfaceDataAccess<SimpleFeatureType,SimpleFeature> - Overrides:
removeSchemain classForwardingDataStore<JDBCDataStore>- Throws:
IOException- if the operation failed
-
removeSchema
Description copied from interface:DataStoreUsed to permanently remove a schema from the underlying storageThis functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
- Specified by:
removeSchemain interfaceDataStore- Overrides:
removeSchemain classForwardingDataStore<JDBCDataStore>- Throws:
IOException- if the operation failed
-
getFeatureWriter
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException Description copied from interface:DataStoreGets aFeatureWriterto modify features in thisDataStore.FeatureWriterprovides an iterator style API to features.The returned writer does not allow features to be added.
- Specified by:
getFeatureWriterin interfaceDataStore- Overrides:
getFeatureWriterin classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- the type name for features that will be accessiblefilter- defines additional constraints on the features that will be accessibletransaction- the transaction that the returned writer operates against- Returns:
- an instance of
FeatureWriter - Throws:
IOException- if data access errors occur- See Also:
-
getFeatureWriter
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(String typeName, Transaction transaction) throws IOException Description copied from interface:DataStoreGets aFeatureWriterto modify features in thisDataStore.FeatureWriterprovides an iterator style API to features.The returned writer does not allow features to be added.
- Specified by:
getFeatureWriterin interfaceDataStore- Overrides:
getFeatureWriterin classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- the type name for features that will be accessibletransaction- the transaction that the returned writer operates against- Returns:
- an instance of
FeatureWriter - Throws:
IOException- if data access errors occur- See Also:
-
getFeatureWriterAppend
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException Description copied from interface:DataStoreGets aFeatureWriterthat can add new features to theDataStore.The
FeatureWriterwill returnfalsewhen itshasNext()method is called, butnext()can be used to acquire new features.- Specified by:
getFeatureWriterAppendin interfaceDataStore- Overrides:
getFeatureWriterAppendin classForwardingDataStore<JDBCDataStore>- Parameters:
typeName- name of the feature type for which features will be addedtransaction- the transaction to operate against- Returns:
- an instance of
FeatureWriterthat can only be used to append new features - Throws:
IOException- if data access errors occur
-