public class DefaultCoverageStore extends AbstractDataStore implements CoverageStore, CoverageStoreProviderServices, DataStoreInitializer
ignoreDALResource, LOGGER
BASE_NEWPARAMETERS_PROVIDER_DEFINITION_FULLNAME, BASE_NEWPARAMETERS_PROVIDER_DEFINITION_NAME, BASE_PARAMETERS_PROVIDER_DEFINITION_FULLNAME, BASE_PARAMETERS_PROVIDER_DEFINITION_NAME, PROVIDER_PARAMTER_FULLNAME, PROVIDER_PARAMTER_NAME
CSV_PROVIDER_NAME, DBASE_PROVIDER_NAME, FEATURE_METADATA_DEFINITION_NAME, GEOPACKAGE_PROVIDER_NAME, H2SPATIAL_PROVIDER_NAME, MDB_PROVIDER_NAME, METADATA_CONTAINERNAME, METADATA_CRS, METADATA_DEFINITION_NAME, METADATA_ENVELOPE, METADATA_FEATURETYPE, METADATA_PROVIDER, SHAPE_PROVIDER_NAME, SPATIAL_METADATA_DEFINITION_NAME
Constructor and Description |
---|
DefaultCoverageStore() |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this Store to the provided
Visitor . |
void |
accept(Visitor visitor,
DataQuery dataQuery)
Provides each value of this Store to the provided
Visitor . |
void |
addObserver(Observer o) |
boolean |
allowWrite() |
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
void |
clear() |
void |
close() |
CoverageSelection |
createDefaultCoverageSelection() |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery . |
DataSet |
createSelection()
Creates a new selection.
|
void |
delegate(DynObject dynObject) |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
disableNotifications()
Disable the notification of events to registered Observers.
|
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
enableNotifications()
Enable (default) the notification of events to registered Observers.
|
void |
endComplexNotification()
Ends the complex notification mode.
|
DataCache |
getCache() |
CoverageStore |
getCoverageStore() |
protected DataManager |
getDataManager() |
DataSet |
getDataSet()
Returns all available data.
|
DataSet |
getDataSet(DataQuery dataQuery)
Returns a subset of data taking into account the properties and
restrictions of the DataQuery.
|
void |
getDataSet(DataQuery dataQuery,
Observer observer)
Loads a subset of data taking into account the properties and
restrictions of the DataQuery.
|
void |
getDataSet(Observer observer)
Loads all available data and notifies the observer for each loaded block of data.
|
DynClass |
getDynClass() |
java.lang.Object |
getDynValue(java.lang.String name) |
DataServerExplorer |
getExplorer()
Returns the DataServerExplorer to which this DataStore belongs, if there
is any.
|
java.lang.String |
getFullName()
Returns a more descriptive name for the store that getName.
|
Interval |
getInterval()
Gets the
Interval of the store, that means the temporal
interval where the store has valid data. |
DataManager |
getManager() |
java.util.Set |
getMetadataChildren()
Returns an unsorted set of child Metadata objects.
|
java.lang.Object |
getMetadataID()
Returns the unique identifier of the Metadata.
|
java.lang.String |
getMetadataName()
Returns the name of the Metadata, which allows to identify the type in
the Metadata registry.
|
java.lang.String |
getName()
Returns the name associated to the store.
|
DataStoreParameters |
getParameters()
Return the of parameters of this store
|
CoverageStoreProvider |
getProvider() |
DataStoreProviderFactory |
getProviderFactory() |
java.lang.String |
getProviderName()
Return the provider name that use this store.
|
DataSet |
getSelection()
Returns the selected set of data
|
PersistentState |
getState() |
DataStore |
getStore()
Return the Store instance
|
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) |
void |
implement(DynClass dynClass) |
void |
intializePhase1(DataManager dataManager,
DataStoreParameters parameters) |
void |
intializePhase2(DataStoreProvider provider) |
java.lang.Object |
invokeDynMethod(int code,
java.lang.Object[] args) |
java.lang.Object |
invokeDynMethod(java.lang.String name,
java.lang.Object[] args) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifyChange(java.lang.String notification) |
void |
notifyChange(java.lang.String notification,
Command command) |
void |
notifyChange(java.lang.String notification,
Resource resource) |
void |
open() |
void |
refresh()
Refreshes this store state.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setDynValue(java.lang.String name,
java.lang.Object value) |
void |
setSelection(DataSet selection)
Sets the current data selection with the given data set.
|
void |
useCache(java.lang.String providerName,
DynObject parameters) |
getChildren, getResourcesStorage, getStoresRepository, setIgnoreDALResource
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getFullNameQuietly, getNameQuietly, getResourcesStorage, getStoresRepository
dispose
protected DataManager getDataManager()
getDataManager
in class AbstractDataStore
public void intializePhase1(DataManager dataManager, DataStoreParameters parameters) throws InitializeException
intializePhase1
in interface DataStoreInitializer
InitializeException
public void intializePhase2(DataStoreProvider provider) throws InitializeException
intializePhase2
in interface DataStoreInitializer
InitializeException
public DataSet createSelection() throws DataException
DataStore
createSelection
in interface DataStore
DataException
public DataSet getDataSet() throws DataException
DataStore
getDataSet
in interface DataStore
DataException
- if there is any error while loading the datapublic DataSet getDataSet(DataQuery dataQuery) throws DataException
DataStore
getDataSet
in interface DataStore
dataQuery
- defines the properties of the requested dataDataException
- if there is any error while loading the datapublic void accept(Visitor visitor) throws BaseException
DataStore
Visitor
.
The values received through the Visitor.visit(Object)
method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object)
method execution, create a copy or clone
the received value in order to be stored.accept
in interface DataStore
accept
in interface Visitable
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visitpublic void accept(Visitor visitor, DataQuery dataQuery) throws BaseException
DataStore
Visitor
.
The values received through the Visitor.visit(Object)
method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object)
method execution, create a copy or clone
the received value in order to be stored.accept
in interface DataStore
visitor
- the visitor to apply to each value.dataQuery
- defines the properties of the data to visitBaseException
- if there is an error while performing the visitpublic void getDataSet(Observer observer) throws DataException
DataStore
getDataSet
in interface DataStore
observer
- to be notified for each block of data loadedDataException
- if there is any error while loading the datapublic void getDataSet(DataQuery dataQuery, Observer observer) throws DataException
DataStore
getDataSet
in interface DataStore
dataQuery
- defines the properties of the requested dataobserver
- to be notified for each block of data loadedDataException
- if there is any error while loading the datapublic DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException
DataStore
getExplorer
in interface DataStore
null
if this was not accessed through any
DataServerExplorer.DataException
ValidateDataParametersException
public DataStoreParameters getParameters()
DataStore
getParameters
in interface DataStore
public DataSet getSelection() throws DataException
DataStore
getSelection
in interface DataStore
DataException
public void refresh() throws DataException
DataStore
refresh
in interface DataStore
DataException
public void setSelection(DataSet selection) throws DataException
DataStore
setSelection
in interface DataStore
DataException
public void beginComplexNotification()
ComplexObservable
beginComplexNotification
in interface ComplexObservable
public void disableNotifications()
ComplexObservable
disableNotifications
in interface ComplexObservable
public void enableNotifications()
ComplexObservable
enableNotifications
in interface ComplexObservable
public void endComplexNotification()
ComplexObservable
If a observer is a ComplexObserver
, it will be notified with a
single DefaultComplexNotification
instead of each of the notifications.
Some important notes to take into account when calling this method.
Observer
is processing a notification another Observer
is
registered to the source Observable
, it won't get any of the
notifications currently being notified, but future ones.endComplexNotification
in interface ComplexObservable
public void addObserver(Observer o)
addObserver
in interface Observable
public void deleteObserver(Observer o)
deleteObserver
in interface Observable
public void deleteObservers()
deleteObservers
in interface Observable
public PersistentState getState() throws PersistenceException
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public java.lang.Object getMetadataID()
Metadata
getMetadataID
in interface Metadata
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(java.lang.String name, java.lang.Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public java.lang.Object invokeDynMethod(int code, 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 java.util.Set getMetadataChildren()
Metadata
getMetadataChildren
in interface Metadata
public java.lang.String getMetadataName()
Metadata
getMetadataName
in interface Metadata
public CoverageSelection createDefaultCoverageSelection() throws DataException
createDefaultCoverageSelection
in interface CoverageStoreProviderServices
DataException
public DataManager getManager()
getManager
in interface CoverageStoreProviderServices
public CoverageStoreProvider getProvider()
getProvider
in interface CoverageStoreProviderServices
public void notifyChange(java.lang.String notification)
notifyChange
in interface CoverageStoreProviderServices
public void notifyChange(java.lang.String notification, Command command)
notifyChange
in interface CoverageStoreProviderServices
public void notifyChange(java.lang.String notification, Resource resource)
notifyChange
in interface CoverageStoreProviderServices
public void open() throws OpenException
OpenException
public void close() throws CloseException
CloseException
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDisposable
BaseException
AbstractDisposable.dispose()
public boolean allowWrite()
public DataQuery createQuery()
DataStore
DataQuery
.createQuery
in interface DataStore
DataQuery
instance.public DataStore getStore()
DataStoreProviderServices
getStore
in interface DataStoreProviderServices
public CoverageStore getCoverageStore()
getCoverageStore
in interface CoverageStoreProviderServices
public java.lang.String getProviderName()
DataStore
getProviderName
in interface DataStore
public java.lang.String getName()
DataStore
public java.lang.String getFullName()
DataStore
getFullName
in interface DataStore
public Interval getInterval()
DataStore
Interval
of the store, that means the temporal
interval where the store has valid data.getInterval
in interface DataStore
public java.util.Collection getTimes()
DataStore
public java.util.Collection getTimes(Interval interval)
DataStore
public void useCache(java.lang.String providerName, DynObject parameters) throws DataException
useCache
in interface DataStore
DataException
public DataStoreProviderFactory getProviderFactory()
getProviderFactory
in interface DataStore