public class OGRDataStoreProvider extends AbstractFeatureStoreProvider implements FeatureStoreProvider, ResourceConsumer
AbstractFeatureStoreProvider.FeatureProviderNotFoundException
Modifier and Type | Field and Description |
---|---|
protected DataSource |
dataSource |
static java.lang.String |
DESCRIPTION |
protected static Logger |
LOG |
static java.lang.String |
METADATA_DEFINITION_NAME |
static java.lang.String |
NAME |
protected ResourceProvider |
resourceProvider |
store
Modifier | Constructor and Description |
---|---|
protected |
OGRDataStoreProvider(DataStoreParameters dataParameters,
DataStoreProviderServices storeServices) |
protected |
OGRDataStoreProvider(DataStoreParameters dataParameters,
DataStoreProviderServices storeServices,
DynObject metadata) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowWrite()
Informs that store supports write.
|
boolean |
closeResourceRequested(ResourceProvider resource) |
protected java.lang.String |
compoundSelect(FeatureType type,
Evaluator evaluator,
FeatureQueryOrder featureQueryOrder) |
java.lang.Object |
createNewOID()
Return a new OID valid for a new feature.
|
FeatureSetProvider |
createSet(FeatureQuery query,
FeatureType featureType)
Factory of
FeatureSetProvider . |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
protected DataSource |
getDataSource() |
Envelope |
getEnvelope()
unsupported geometry by default (return
null ), override this
otherwise |
long |
getFeatureCount()
Returns total feature count of this store.
|
java.lang.String |
getFullName()
Returns a more descriptive name for the provider that getName.
|
protected Layer |
getLayer() |
java.lang.String |
getName()
Returns the name associated to the provider.
|
int |
getOIDType()
Return OID data type (from
DataTypes ) of this store. |
java.lang.String |
getProviderName()
Return the name of the provider.
|
ResourceProvider |
getResource()
Returns the
Resource from where the data is being loaded. |
java.lang.Object |
getSourceId()
Returns the unique identifier of the Store
FIXME add examples
|
protected FeatureProvider |
internalGetFeatureProviderByReference(FeatureReferenceProviderServices providerServices,
FeatureType featureType)
Returns a
FeatureProvider by reference, using the provided
FeatureType . |
protected boolean |
loadFeatureType() |
void |
open()
Open store.
|
void |
performChanges(java.util.Iterator deleteds,
java.util.Iterator inserteds,
java.util.Iterator updateds,
java.util.Iterator featureTypesChanged)
unsupported by default, override this otherwise
|
protected void |
repack() |
void |
resourceChanged(ResourceProvider resource) |
abortAppend, allowAutomaticValues, allowGeometry, append, beginAppend, beginAppend, canWriteGeometry, clear, close, createExpression, createFeatureLocks, createFeatureProvider, createFeatureSelection, createResource, createSet, delegate, endAppend, fixFeatureTypeFromParameters, getChildren, getDynClass, getDynValue, getEnvelope, getExplorer, getFeatureProviderByReference, getFeatureProviderByReference, getFeatureStore, getInterval, getParameters, getResourcesStorage, getRetrievedFeaturesLimit, getStoreServices, getStoresRepository, getTimes, getTimes, hasDynMethod, hasDynValue, hasRetrievedFeaturesLimit, implement, internalGetFeatureProviderByReference, invokeDynMethod, invokeDynMethod, isKnownEnvelope, isLocksSupported, isTemporary, passThroughDelete, passThroughDelete, passThroughInsert, passThroughInsertOrUpdate, passThroughUpdate, passThroughUpdate, refresh, savePrjFile, setDynValue, setMetadata, supportsAppendMode, supportsPassThroughMode, toString
setTransaction
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
abortAppend, allowAutomaticValues, allowGeometry, append, beginAppend, beginAppend, canWriteGeometry, createFeatureLocks, createFeatureProvider, createFeatureSelection, createSet, endAppend, fixFeatureTypeFromParameters, getEnvelope, getFeatureProviderByReference, getFeatureProviderByReference, getFeatureStore, getParameters, getRetrievedFeaturesLimit, getStoreServices, hasRetrievedFeaturesLimit, isKnownEnvelope, isLocksSupported, isTemporary, passThroughDelete, passThroughDelete, passThroughInsert, passThroughInsertOrUpdate, passThroughUpdate, passThroughUpdate, supportsAppendMode, supportsPassThroughMode
close, getChildren, getExplorer, getInterval, getResourcesStorage, getStoresRepository, getTimes, getTimes, refresh, setTransaction
hasDynMethod
clear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
protected static final Logger LOG
public static final java.lang.String METADATA_DEFINITION_NAME
public static final java.lang.String NAME
public static final java.lang.String DESCRIPTION
protected DataSource dataSource
protected ResourceProvider resourceProvider
protected OGRDataStoreProvider(DataStoreParameters dataParameters, DataStoreProviderServices storeServices, DynObject metadata) throws InitializeException
InitializeException
protected OGRDataStoreProvider(DataStoreParameters dataParameters, DataStoreProviderServices storeServices) throws InitializeException
InitializeException
protected DataSource getDataSource() throws OGRUnsupportedFormatException
OGRUnsupportedFormatException
protected Layer getLayer() throws OGRUnsupportedFormatException
OGRUnsupportedFormatException
public Envelope getEnvelope() throws DataException
AbstractFeatureStoreProvider
null
), override this
otherwisegetEnvelope
in interface FeatureStoreProvider
getEnvelope
in class AbstractFeatureStoreProvider
null
if
store not have geometry informationDataException
FeatureStoreProvider.getEnvelope()
public java.lang.String getFullName()
DataStoreProvider
public java.lang.String getName()
DataStoreProvider
public java.lang.String getProviderName()
DataStoreProvider
public boolean allowWrite()
FeatureStoreProvider
allowWrite
in interface FeatureStoreProvider
allowWrite
in class AbstractFeatureStoreProvider
public ResourceProvider getResource()
DataStoreProvider
Resource
from where the data is being loaded.Resource
public java.lang.Object getSourceId()
DataStoreProvider
public void open() throws OpenException
DataStoreProvider
OpenException
protected boolean loadFeatureType() throws OGRUnsupportedFormatException, GeometryTypeNotSupportedException, GeometryTypeNotValidException
public void performChanges(java.util.Iterator deleteds, java.util.Iterator inserteds, java.util.Iterator updateds, java.util.Iterator featureTypesChanged) throws DataException
AbstractFeatureStoreProvider
performChanges
in interface FeatureStoreProvider
performChanges
in class AbstractFeatureStoreProvider
deleteds
- iterator of FeatureReferenceProviderServices
inserteds
- iterator of FeatureProvider
updateds
- iterator of FeatureProvider
featureTypesChanged
- iterator of FeatureType.FeatureTypeChanged
DataException
FeatureStoreProvider.performChanges(Iterator,
Iterator, Iterator, Iterator)
protected void repack() throws OGRUnsupportedFormatException
OGRUnsupportedFormatException
public java.lang.Object createNewOID()
FeatureStoreProvider
createNewOID
in interface FeatureStoreProvider
FeatureStoreProvider#getOIDType()}
public FeatureSetProvider createSet(FeatureQuery query, FeatureType featureType) throws DataException
FeatureStoreProvider
FeatureSetProvider
. Create a new
FeatureSetProvider
that represents result of FeatureQuery
.createSet
in interface FeatureStoreProvider
query
- (never will be null)featureType
- (never will be null)DataException
public long getFeatureCount() throws DataException
FeatureStoreProvider
getFeatureCount
in interface FeatureStoreProvider
DataException
public int getOIDType()
FeatureStoreProvider
DataTypes
) of this store.getOIDType
in interface FeatureStoreProvider
FeatureStoreProvider#createNewOID()} {@link DataTypes}
protected FeatureProvider internalGetFeatureProviderByReference(FeatureReferenceProviderServices providerServices, FeatureType featureType) throws DataException
AbstractFeatureStoreProvider
FeatureProvider
by reference, using the provided
FeatureType
. This is the child classes implementation of the
AbstractFeatureStoreProvider.getFeatureProviderByReference(FeatureReferenceProviderServices)
method.internalGetFeatureProviderByReference
in class AbstractFeatureStoreProvider
providerServices
- the reference to the FeatureProvider
featureType
- the type of feature to loadFeatureProvider
being referencedDataException
- if there is an error loading the FeatureProvider
protected java.lang.String compoundSelect(FeatureType type, Evaluator evaluator, FeatureQueryOrder featureQueryOrder)
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractFeatureStoreProvider
BaseException
AbstractDisposable.dispose()
public boolean closeResourceRequested(ResourceProvider resource)
closeResourceRequested
in interface ResourceConsumer
public void resourceChanged(ResourceProvider resource)
resourceChanged
in interface ResourceConsumer