public abstract class AbstractFeatureStoreProvider extends AbstractDataStoreProvider implements FeatureStoreProvider_v2
FeatureStoreProvider| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFeatureStoreProvider.FeatureProviderNotFoundException |
| Modifier and Type | Field and Description |
|---|---|
protected FeatureStoreProviderServices |
store |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFeatureStoreProvider(DataStoreParameters params,
DataStoreProviderServices storeServices)
Constructor when cannot create metada in constrution time.
|
protected |
AbstractFeatureStoreProvider(DataStoreParameters params,
DataStoreProviderServices storeServices,
DynObject metadata)
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAppend() |
boolean |
allowAutomaticValues()
unsupported by default, override this otherwise
|
int |
allowGeometry(java.lang.String name,
Geometry geometry) |
boolean |
allowWrite()
Informs that store supports write.
|
void |
append(FeatureProvider featureProvider)
unsupported by default, override this otherwise
|
void |
beginAppend()
unsupported by default, override this otherwise
|
void |
beginAppend(int submode) |
boolean |
canWriteGeometry(int geometryType,
int geometrySubType)
unsupported geometry write by default (return
false),
override this otherwise |
void |
clear() |
void |
close()
do nothing by default, override this otherwise
|
ExpressionBuilder |
createExpression() |
FeatureLocks |
createFeatureLocks()
unsupported by default (return
null), override this
otherwise |
FeatureProvider |
createFeatureProvider(FeatureType type)
Default Factory of
FeatureProvider. |
FeatureSelection |
createFeatureSelection()
Default Factory of
FeatureSelection. |
protected ResourceProvider |
createResource(java.lang.String type,
java.lang.Object[] params)
|
FeatureSetProvider |
createSet(FeatureQuery query,
FeatureType providerFeatureType,
FeatureType storeFeatureType) |
void |
delegate(DynObject dynObject) |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
endAppend()
unsupported by default, override this otherwise
|
void |
fixFeatureTypeFromParameters() |
UnmodifiableBasicMap<java.lang.String,DataStore> |
getChildren()
Returns an UnmodifiableBasicMap with subStores from this store.
|
DynClass |
getDynClass() |
java.lang.Object |
getDynValue(java.lang.String name) |
Envelope |
getEnvelope()
unsupported geometry by default (return
null), override this
otherwise |
Envelope |
getEnvelope(java.lang.String geomname)
Override on providers that allow more than one geometry
|
DataServerExplorer |
getExplorer()
unsupported by default (return null), override this otherwise
|
FeatureProvider |
getFeatureProviderByReference(FeatureReferenceProviderServices reference)
Return
FeatureProvider from a
FeatureReferenceProviderServices using
FeatureStore.getDefaultFeatureType() as FeatureType |
FeatureProvider |
getFeatureProviderByReference(FeatureReferenceProviderServices reference,
FeatureType featureType)
|
FeatureStore |
getFeatureStore() |
Interval |
getInterval()
Gets the
Interval of the store, that means the temporal
interval where the store has valid data. |
DataStoreParameters |
getParameters() |
ResourcesStorage |
getResourcesStorage()
Returns the resource store associated with this provider.
|
int |
getRetrievedFeaturesLimit()
If the
FeatureStoreProvider.hasRetrievedFeaturesLimit() returns true,
it returns the limit of features retrieved from the provider. |
FeatureStoreProviderServices |
getStoreServices()
Return
FeatureStoreProviderServices for this store |
StoresRepository |
getStoresRepository() |
java.util.Collection |
getTimes()
Gets all the possible values of time for which the store has data.
|
java.util.Collection |
getTimes(Interval interval)
Gets all the possible values of time for which the store has data
and intersects with an interval.
|
boolean |
hasDynMethod(java.lang.String name) |
boolean |
hasDynValue(java.lang.String name) |
boolean |
hasRetrievedFeaturesLimit()
Return if the maximum number of features provided by the
provider are limited.
|
void |
implement(DynClass dynClass) |
protected FeatureProvider |
internalGetFeatureProviderByReference(FeatureReferenceProviderServices reference)
Returns a
FeatureProvider by reference, using the default
FeatureType. |
protected abstract FeatureProvider |
internalGetFeatureProviderByReference(FeatureReferenceProviderServices reference,
FeatureType featureType)
Returns a
FeatureProvider by reference, using the provided
FeatureType. |
java.lang.Object |
invokeDynMethod(int code,
java.lang.Object[] args) |
java.lang.Object |
invokeDynMethod(java.lang.String name,
java.lang.Object[] args) |
boolean |
isKnownEnvelope()
Return if the provider knows the real envelope of a layer.
|
boolean |
isLocksSupported()
unsupported by default, override this otherwise
|
boolean |
isTemporary()
Indicates if the storage is temporary.
|
void |
passThroughDelete(Expression filter) |
void |
passThroughDelete(FeatureReferenceProviderServices featureReference) |
void |
passThroughInsert(FeatureProvider featureProvider) |
void |
passThroughInsertOrUpdate(FeatureProvider featureProvider) |
void |
passThroughUpdate(FeatureProvider featureProvider) |
void |
passThroughUpdate(java.lang.Object[] parameters,
Expression filter) |
void |
performChanges(java.util.Iterator deleteds,
java.util.Iterator inserteds,
java.util.Iterator updateds,
java.util.Iterator featureTypesChanged)
unsupported by default, override this otherwise
|
void |
refresh()
do nothing by default, override this otherwise
|
protected void |
savePrjFile(java.io.File dataFile,
IProjection proj) |
void |
setDynValue(java.lang.String name,
java.lang.Object value) |
protected void |
setMetadata(DynObject metadata)
Set metada container if this not set at construction time and only in one
time.
|
boolean |
supportsAppendMode() |
boolean |
supportsPassThroughMode() |
java.lang.String |
toString() |
setTransactiondispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateNewOID, createSet, getFeatureCount, getOIDTypegetFullName, getName, getProviderName, getResource, getSourceId, open, setTransactiondisposeprotected FeatureStoreProviderServices store
protected AbstractFeatureStoreProvider(DataStoreParameters params, DataStoreProviderServices storeServices, DynObject metadata)
params - storeServices - metadata - protected AbstractFeatureStoreProvider(DataStoreParameters params, DataStoreProviderServices storeServices)
setMetadata(DynObject)params - storeServices - public final FeatureProvider getFeatureProviderByReference(FeatureReferenceProviderServices reference) throws DataException
FeatureStoreProviderFeatureProvider from a
FeatureReferenceProviderServices using
FeatureStore.getDefaultFeatureType() as FeatureTypegetFeatureProviderByReference in interface FeatureStoreProviderDataExceptionpublic final FeatureProvider getFeatureProviderByReference(FeatureReferenceProviderServices reference, FeatureType featureType) throws DataException
FeatureStoreProvidergetFeatureProviderByReference in interface FeatureStoreProviderDataExceptionprotected FeatureProvider internalGetFeatureProviderByReference(FeatureReferenceProviderServices reference) throws DataException
FeatureProvider by reference, using the default
FeatureType. This method may be rewritten by the child classes as
an implementation of the
getFeatureProviderByReference(FeatureReferenceProviderServices)
method.reference - the reference to the FeatureProviderFeatureProvider being referencedDataException - if there is an error loading the FeatureProviderprotected void setMetadata(DynObject metadata)
metadata - public DataStoreParameters getParameters()
getParameters in interface FeatureStoreProviderprotected ResourceProvider createResource(java.lang.String type, java.lang.Object[] params) throws InitializeException
type - params - InitializeExceptionpublic FeatureStoreProviderServices getStoreServices()
FeatureStoreProviderFeatureStoreProviderServices for this storegetStoreServices in interface FeatureStoreProviderpublic FeatureStore getFeatureStore()
getFeatureStore in interface FeatureStoreProviderpublic boolean allowWrite()
FeatureStoreProviderallowWrite in interface FeatureStoreProviderpublic void performChanges(java.util.Iterator deleteds,
java.util.Iterator inserteds,
java.util.Iterator updateds,
java.util.Iterator featureTypesChanged)
throws DataException
performChanges in interface FeatureStoreProviderdeleteds - iterator of FeatureReferenceProviderServicesinserteds - iterator of FeatureProviderupdateds - iterator of FeatureProviderfeatureTypesChanged - iterator of FeatureType.FeatureTypeChangedDataExceptionFeatureStoreProvider.performChanges(Iterator,
Iterator, Iterator, Iterator)public boolean isLocksSupported()
isLocksSupported in interface FeatureStoreProviderFeatureStoreProvider.isLocksSupported()public FeatureProvider createFeatureProvider(FeatureType type) throws DataException
FeatureProvider. Create a new default
FeatureProvider instance.FeatureProvider.createFeatureProvider in interface FeatureStoreProviderDataExceptionorg.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#createFeatureProvider(FeatureType)}public FeatureLocks createFeatureLocks() throws DataException
null), override this
otherwisecreateFeatureLocks in interface FeatureStoreProviderFeatureLocks or null if not
FeatureStoreProvider.isLocksSupported()DataExceptionFeatureStoreProvider.createFeatureLocks()public FeatureSelection createFeatureSelection() throws DataException
FeatureSelection. Create a new default
FeatureSelection instance.FeatureSelection.createFeatureSelection in interface FeatureStoreProviderDataExceptionFeatureStoreProvider.createFeatureSelection()public void refresh()
throws OpenException
OpenExceptionDataStoreProvider.refresh()public void close()
throws CloseException
CloseExceptionDataStoreProvider.close()protected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()public Envelope getEnvelope() throws DataException
null), override this
otherwisegetEnvelope in interface FeatureStoreProvidernull if
store not have geometry informationDataExceptionFeatureStoreProvider.getEnvelope()public Envelope getEnvelope(java.lang.String geomname) throws DataException
getEnvelope in interface FeatureStoreProvidergeomname - DataExceptionpublic boolean canWriteGeometry(int geometryType,
int geometrySubType)
throws DataException
false),
override this otherwisecanWriteGeometry in interface FeatureStoreProviderDataExceptionFeatureStoreProvider.canWriteGeometry(int,
int)public DynClass getDynClass()
getDynClass in interface DynObjectpublic java.lang.Object getDynValue(java.lang.String name)
throws DynFieldNotFoundException
getDynValue in interface DynObjectDynFieldNotFoundExceptionpublic boolean hasDynValue(java.lang.String name)
hasDynValue in interface DynObjectpublic boolean hasDynMethod(java.lang.String name)
hasDynMethod in interface DynObject_v2public java.lang.Object invokeDynMethod(int code,
java.lang.Object[] args)
throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic java.lang.Object invokeDynMethod(java.lang.String name,
java.lang.Object[] args)
throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic void setDynValue(java.lang.String name,
java.lang.Object value)
throws DynFieldNotFoundException
setDynValue in interface DynObjectDynFieldNotFoundExceptionpublic boolean allowAutomaticValues()
allowAutomaticValues in interface FeatureStoreProvidertrue if supportedFeatureStoreProvider.allowAutomaticValues()public void append(FeatureProvider featureProvider) throws DataException
append in interface FeatureStoreProviderfeatureProvider - DataExceptionorg.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#append(org.gvsig.
fmap.dal.feature.spi.FeatureProvider)public void beginAppend()
throws DataException
beginAppend in interface FeatureStoreProviderDataExceptionFeatureStoreProvider.beginAppend()public void beginAppend(int submode)
throws DataException
beginAppend in interface FeatureStoreProviderDataExceptionpublic void endAppend()
throws DataException
endAppend in interface FeatureStoreProviderDataExceptionFeatureStoreProvider.endAppend()public void abortAppend()
throws DataException
abortAppend in interface FeatureStoreProviderDataExceptionpublic boolean supportsAppendMode()
supportsAppendMode in interface FeatureStoreProviderpublic UnmodifiableBasicMap<java.lang.String,DataStore> getChildren()
DataStoreProvidergetChildren in class AbstractDataStoreProviderpublic StoresRepository getStoresRepository()
getStoresRepository in class AbstractDataStoreProviderpublic ResourcesStorage getResourcesStorage()
DataStoreProvidergetResourcesStorage in class AbstractDataStoreProviderpublic DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
ReadExceptionValidateDataParametersExceptionDataStoreProvider.getExplorer()protected abstract FeatureProvider internalGetFeatureProviderByReference(FeatureReferenceProviderServices reference, FeatureType featureType) throws DataException
FeatureProvider by reference, using the provided
FeatureType. This is the child classes implementation of the
getFeatureProviderByReference(FeatureReferenceProviderServices)
method.reference - the reference to the FeatureProviderfeatureType - the type of feature to loadFeatureProvider being referencedDataException - if there is an error loading the FeatureProviderpublic boolean isKnownEnvelope()
FeatureStoreProviderFeatureStoreProvider.getEnvelope() method doesn't return
the full envelope.isKnownEnvelope in interface FeatureStoreProviderpublic boolean hasRetrievedFeaturesLimit()
FeatureStoreProviderhasRetrievedFeaturesLimit in interface FeatureStoreProviderpublic int getRetrievedFeaturesLimit()
FeatureStoreProviderFeatureStoreProvider.hasRetrievedFeaturesLimit() returns true,
it returns the limit of features retrieved from the provider.getRetrievedFeaturesLimit in interface FeatureStoreProviderpublic Interval getInterval()
DataStoreProviderInterval of the store, that means the temporal
interval where the store has valid data.public java.util.Collection getTimes()
DataStoreProviderTime objects.public java.util.Collection getTimes(Interval interval)
DataStoreProviderinterval - the interval of timeTime objects.public ExpressionBuilder createExpression()
createExpression in interface FeatureStoreProvider_v2protected void savePrjFile(java.io.File dataFile,
IProjection proj)
public boolean isTemporary()
FeatureStoreProviderisTemporary in interface FeatureStoreProviderpublic void fixFeatureTypeFromParameters()
fixFeatureTypeFromParameters in interface FeatureStoreProviderpublic boolean supportsPassThroughMode()
supportsPassThroughMode in interface FeatureStoreProviderpublic void passThroughInsert(FeatureProvider featureProvider) throws DataException
passThroughInsert in interface FeatureStoreProviderDataExceptionpublic void passThroughInsertOrUpdate(FeatureProvider featureProvider) throws DataException
passThroughInsertOrUpdate in interface FeatureStoreProviderDataExceptionpublic void passThroughUpdate(FeatureProvider featureProvider) throws DataException
passThroughUpdate in interface FeatureStoreProviderDataExceptionpublic void passThroughDelete(FeatureReferenceProviderServices featureReference) throws DataException
passThroughDelete in interface FeatureStoreProviderDataExceptionpublic void passThroughDelete(Expression filter) throws DataException
passThroughDelete in interface FeatureStoreProviderDataExceptionpublic void passThroughUpdate(java.lang.Object[] parameters,
Expression filter)
passThroughUpdate in interface FeatureStoreProviderpublic java.lang.String toString()
toString in class java.lang.Objectpublic FeatureSetProvider createSet(FeatureQuery query, FeatureType providerFeatureType, FeatureType storeFeatureType) throws DataException
createSet in interface FeatureStoreProviderDataExceptionpublic int allowGeometry(java.lang.String name,
Geometry geometry)
allowGeometry in interface FeatureStoreProvider