public abstract class AbstractFeatureStoreProvider extends AbstractDisposable implements FeatureStoreProvider
FeatureStoreProvider
Modifier and Type | Class and Description |
---|---|
static class |
AbstractFeatureStoreProvider.FeatureProviderNotFoundException |
FeatureStoreProvider.FeatureTypeChanged
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
|
boolean |
allowWrite()
unsupported by default, override this otherwise
|
void |
append(FeatureProvider featureProvider)
unsupported by default, override this otherwise
|
void |
beginAppend()
unsupported by default, override this otherwise
|
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
|
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(String type,
Object[] params)
|
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
|
Iterator |
getChilds()
unsupported by default (return null), override this otherwise
|
DynClass |
getDynClass() |
Object |
getDynValue(String name) |
Envelope |
getEnvelope()
unsupported geometry by default (return
null ), override this
otherwise |
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() |
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 |
Collection |
getTimes()
Gets all the possible values of time for which the store has data.
|
Collection |
getTimes(Interval interval)
Gets all the possible values of time for which the store has data
and intersects with an interval.
|
boolean |
hasDynValue(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 . |
Object |
invokeDynMethod(int code,
Object[] args) |
Object |
invokeDynMethod(String name,
Object[] args) |
boolean |
isKnownEnvelope()
Return if the provider knows the real envelope of a layer.
|
boolean |
isLocksSupported()
unsupported by default, override this otherwise
|
void |
performChanges(Iterator deleteds,
Iterator inserteds,
Iterator updateds,
Iterator featureTypesChanged)
unsupported by default, override this otherwise
|
void |
refresh()
do nothing by default, override this otherwise
|
protected void |
savePrjFile(File dataFile,
IProjection proj) |
void |
setDynValue(String name,
Object value) |
protected void |
setMetadata(DynObject metadata)
Set metada container if this not set at construction time and only in one
time.
|
boolean |
supportsAppendMode()
unsupported by default, override this otherwise
|
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createNewOID, createSet, getFeatureCount, getOIDType
getFullName, getName, getProviderName, getResource, getSourceId, open
dispose
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()
protected ResourceProvider createResource(String type, Object[] params) throws InitializeException
type
- params
- InitializeException
public FeatureStoreProviderServices getStoreServices()
FeatureStoreProvider
FeatureStoreProviderServices
for this storegetStoreServices
in interface FeatureStoreProvider
public FeatureStore getFeatureStore()
public boolean allowWrite()
allowWrite
in interface FeatureStoreProvider
FeatureStoreProvider.allowWrite()
public void performChanges(Iterator deleteds, Iterator inserteds, Iterator updateds, Iterator featureTypesChanged) throws DataException
performChanges
in interface FeatureStoreProvider
deleteds
- iterator of FeatureReferenceProviderServices
inserteds
- iterator of FeatureProvider
updateds
- iterator of FeatureProvider
featureTypesChanged
- iterator of FeatureStoreProvider.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 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 Object getDynValue(String name) throws DynFieldNotFoundException
getDynValue
in interface DynObject
DynFieldNotFoundException
public boolean hasDynValue(String name)
hasDynValue
in interface DynObject
public Object invokeDynMethod(int code, Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public Object invokeDynMethod(String name, Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public void setDynValue(String name, 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
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 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
FeatureStoreProvider.supportsAppendMode()
public Iterator getChilds()
DataStoreProvider.getChilds()
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 Collection getTimes()
DataStoreProvider
Time
objects.public Collection getTimes(Interval interval)
DataStoreProvider
interval
- the interval of timeTime
objects.protected void savePrjFile(File dataFile, IProjection proj)