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() |
setTransaction
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createNewOID, createSet, getFeatureCount, getOIDType
getFullName, getName, getProviderName, getResource, getSourceId, open, setTransaction
dispose
protected 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
FeatureStoreProvider
FeatureProvider
from a
FeatureReferenceProviderServices
using
FeatureStore.getDefaultFeatureType()
as FeatureType
getFeatureProviderByReference
in interface FeatureStoreProvider
DataException
public final FeatureProvider getFeatureProviderByReference(FeatureReferenceProviderServices reference, FeatureType featureType) throws DataException
FeatureStoreProvider
getFeatureProviderByReference
in interface FeatureStoreProvider
DataException
protected 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 FeatureProvider
FeatureProvider
being referencedDataException
- if there is an error loading the FeatureProvider
protected void setMetadata(DynObject metadata)
metadata
- public DataStoreParameters getParameters()
getParameters
in interface FeatureStoreProvider
protected ResourceProvider createResource(java.lang.String type, java.lang.Object[] params) throws InitializeException
type
- params
- InitializeException
public FeatureStoreProviderServices getStoreServices()
FeatureStoreProvider
FeatureStoreProviderServices
for this storegetStoreServices
in interface FeatureStoreProvider
public FeatureStore getFeatureStore()
getFeatureStore
in interface FeatureStoreProvider
public boolean allowWrite()
FeatureStoreProvider
allowWrite
in interface FeatureStoreProvider
public void performChanges(java.util.Iterator deleteds, java.util.Iterator inserteds, java.util.Iterator updateds, java.util.Iterator featureTypesChanged) throws DataException
performChanges
in interface FeatureStoreProvider
deleteds
- iterator of FeatureReferenceProviderServices
inserteds
- iterator of FeatureProvider
updateds
- iterator of FeatureProvider
featureTypesChanged
- iterator of FeatureType.FeatureTypeChanged
DataException
FeatureStoreProvider.performChanges(Iterator,
Iterator, Iterator, Iterator)
public boolean isLocksSupported()
isLocksSupported
in interface FeatureStoreProvider
FeatureStoreProvider.isLocksSupported()
public FeatureProvider createFeatureProvider(FeatureType type) throws DataException
FeatureProvider
. Create a new default
FeatureProvider
instance.FeatureProvider
.createFeatureProvider
in interface FeatureStoreProvider
DataException
org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#createFeatureProvider(FeatureType)}
public FeatureLocks createFeatureLocks() throws DataException
null
), override this
otherwisecreateFeatureLocks
in interface FeatureStoreProvider
FeatureLocks
or null
if not
FeatureStoreProvider.isLocksSupported()
DataException
FeatureStoreProvider.createFeatureLocks()
public FeatureSelection createFeatureSelection() throws DataException
FeatureSelection
. Create a new default
FeatureSelection
instance.FeatureSelection
.createFeatureSelection
in interface FeatureStoreProvider
DataException
FeatureStoreProvider.createFeatureSelection()
public void refresh() throws OpenException
OpenException
DataStoreProvider.refresh()
public void close() throws CloseException
CloseException
DataStoreProvider.close()
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDisposable
BaseException
AbstractDisposable.dispose()
public Envelope getEnvelope() throws DataException
null
), override this
otherwisegetEnvelope
in interface FeatureStoreProvider
null
if
store not have geometry informationDataException
FeatureStoreProvider.getEnvelope()
public Envelope getEnvelope(java.lang.String geomname) throws DataException
getEnvelope
in interface FeatureStoreProvider
geomname
- DataException
public boolean canWriteGeometry(int geometryType, int geometrySubType) throws DataException
false
),
override this otherwisecanWriteGeometry
in interface FeatureStoreProvider
DataException
FeatureStoreProvider.canWriteGeometry(int,
int)
public DynClass getDynClass()
getDynClass
in interface DynObject
public java.lang.Object getDynValue(java.lang.String name) throws DynFieldNotFoundException
getDynValue
in interface DynObject
DynFieldNotFoundException
public boolean hasDynValue(java.lang.String name)
hasDynValue
in interface DynObject
public boolean hasDynMethod(java.lang.String name)
hasDynMethod
in interface DynObject_v2
public java.lang.Object invokeDynMethod(int code, java.lang.Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public java.lang.Object invokeDynMethod(java.lang.String name, java.lang.Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public void setDynValue(java.lang.String name, java.lang.Object value) throws DynFieldNotFoundException
setDynValue
in interface DynObject
DynFieldNotFoundException
public boolean allowAutomaticValues()
allowAutomaticValues
in interface FeatureStoreProvider
true
if supportedFeatureStoreProvider.allowAutomaticValues()
public void append(FeatureProvider featureProvider) throws DataException
append
in interface FeatureStoreProvider
featureProvider
- DataException
org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#append(org.gvsig.
fmap.dal.feature.spi.FeatureProvider)
public void beginAppend() throws DataException
beginAppend
in interface FeatureStoreProvider
DataException
FeatureStoreProvider.beginAppend()
public void beginAppend(int submode) throws DataException
beginAppend
in interface FeatureStoreProvider
DataException
public void endAppend() throws DataException
endAppend
in interface FeatureStoreProvider
DataException
FeatureStoreProvider.endAppend()
public void abortAppend() throws DataException
abortAppend
in interface FeatureStoreProvider
DataException
public boolean supportsAppendMode()
supportsAppendMode
in interface FeatureStoreProvider
public UnmodifiableBasicMap<java.lang.String,DataStore> getChildren()
DataStoreProvider
getChildren
in class AbstractDataStoreProvider
public StoresRepository getStoresRepository()
getStoresRepository
in class AbstractDataStoreProvider
public ResourcesStorage getResourcesStorage()
DataStoreProvider
getResourcesStorage
in class AbstractDataStoreProvider
public DataServerExplorer getExplorer() throws ReadException, ValidateDataParametersException
ReadException
ValidateDataParametersException
DataStoreProvider.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 FeatureProvider
featureType
- the type of feature to loadFeatureProvider
being referencedDataException
- if there is an error loading the FeatureProvider
public boolean isKnownEnvelope()
FeatureStoreProvider
FeatureStoreProvider.getEnvelope()
method doesn't return
the full envelope.isKnownEnvelope
in interface FeatureStoreProvider
public boolean hasRetrievedFeaturesLimit()
FeatureStoreProvider
hasRetrievedFeaturesLimit
in interface FeatureStoreProvider
public int getRetrievedFeaturesLimit()
FeatureStoreProvider
FeatureStoreProvider.hasRetrievedFeaturesLimit()
returns true,
it returns the limit of features retrieved from the provider.getRetrievedFeaturesLimit
in interface FeatureStoreProvider
public Interval getInterval()
DataStoreProvider
Interval
of the store, that means the temporal
interval where the store has valid data.public java.util.Collection getTimes()
DataStoreProvider
Time
objects.public java.util.Collection getTimes(Interval interval)
DataStoreProvider
interval
- the interval of timeTime
objects.public ExpressionBuilder createExpression()
createExpression
in interface FeatureStoreProvider_v2
protected void savePrjFile(java.io.File dataFile, IProjection proj)
public boolean isTemporary()
FeatureStoreProvider
isTemporary
in interface FeatureStoreProvider
public void fixFeatureTypeFromParameters()
fixFeatureTypeFromParameters
in interface FeatureStoreProvider
public boolean supportsPassThroughMode()
supportsPassThroughMode
in interface FeatureStoreProvider
public void passThroughInsert(FeatureProvider featureProvider) throws DataException
passThroughInsert
in interface FeatureStoreProvider
DataException
public void passThroughInsertOrUpdate(FeatureProvider featureProvider) throws DataException
passThroughInsertOrUpdate
in interface FeatureStoreProvider
DataException
public void passThroughUpdate(FeatureProvider featureProvider) throws DataException
passThroughUpdate
in interface FeatureStoreProvider
DataException
public void passThroughDelete(FeatureReferenceProviderServices featureReference) throws DataException
passThroughDelete
in interface FeatureStoreProvider
DataException
public void passThroughDelete(Expression filter) throws DataException
passThroughDelete
in interface FeatureStoreProvider
DataException
public void passThroughUpdate(java.lang.Object[] parameters, Expression filter)
passThroughUpdate
in interface FeatureStoreProvider
public java.lang.String toString()
toString
in class java.lang.Object
public FeatureSetProvider createSet(FeatureQuery query, FeatureType providerFeatureType, FeatureType storeFeatureType) throws DataException
createSet
in interface FeatureStoreProvider
DataException
public int allowGeometry(java.lang.String name, Geometry geometry)
allowGeometry
in interface FeatureStoreProvider