public interface DataStore extends ComplexWeakReferencingObservable, Persistent, Metadata, Disposable, Visitable
This is the basic interface for all data stores. Depending on the context, it can represent a geographic layer, an alphanumeric database table or any data file. DataStore offers generic services like:
Modifier and Type | Field and Description |
---|---|
static String |
FEATURE_METADATA_DEFINITION_NAME |
static String |
METADATA_CONTAINERNAME
Metadata property name for Container name provided by the data provider.
|
static String |
METADATA_CRS
Metadata property name for CRS provided by the data provider.
|
static String |
METADATA_DEFINITION_NAME |
static String |
METADATA_ENVELOPE
Metadata property name for Envelope provided by the data provider
This metadata is only provided by data provider with spatial
information.
|
static String |
METADATA_FEATURETYPE
Metadata property name for the feature type provided by the data provider.
|
static String |
METADATA_PROVIDER
Metadata property name for the provider name provided by the data provider.
|
static String |
SPATIAL_METADATA_DEFINITION_NAME |
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 . |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery . |
DataSet |
createSelection()
Creates a new selection.
|
Iterator |
getChildren()
Returns an iterator over this store children
|
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.
|
DataServerExplorer |
getExplorer()
Returns the DataServerExplorer to which this DataStore belongs, if there
is any.
|
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. |
String |
getName()
Returns the name associated to the store.
|
DataStoreParameters |
getParameters()
Return the of parameters of this store
|
String |
getProviderName()
Return the provider name that use this store.
|
DataSet |
getSelection()
Returns the selected set of data
|
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.
|
void |
refresh()
Refreshes this store state.
|
void |
setSelection(DataSet selection)
Sets the current data selection with the given data set.
|
beginComplexNotification, disableNotifications, enableNotifications, endComplexNotification
addObserver, deleteObserver, deleteObservers
loadFromState, saveToState
getMetadataChildren, getMetadataID, getMetadataName
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
static final String METADATA_DEFINITION_NAME
static final String FEATURE_METADATA_DEFINITION_NAME
static final String SPATIAL_METADATA_DEFINITION_NAME
static final String METADATA_PROVIDER
static final String METADATA_CONTAINERNAME
static final String METADATA_FEATURETYPE
static final String METADATA_CRS
static final String METADATA_ENVELOPE
String getName()
String getFullName()
DataStoreParameters getParameters()
String getProviderName()
void refresh() throws DataException
DataException
DataSet getDataSet() throws DataException
DataException
- if there is any error while loading the dataDataSet getDataSet(DataQuery dataQuery) throws DataException
dataQuery
- defines the properties of the requested dataDataException
- if there is any error while loading the datavoid accept(Visitor visitor) throws BaseException
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 Visitable
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visitvoid accept(Visitor visitor, DataQuery dataQuery) throws BaseException
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.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 visitvoid getDataSet(Observer observer) throws DataException
observer
- to be notified for each block of data loadedDataException
- if there is any error while loading the datavoid getDataSet(DataQuery dataQuery, Observer observer) throws DataException
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 dataDataSet getSelection() throws DataException
DataException
void setSelection(DataSet selection) throws DataException
DataSet
- selectionDataException
DataSet createSelection() throws DataException
DataException
Iterator getChildren()
DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException
null
if this was not accessed through any
DataServerExplorer.DataException
ValidateDataParametersException
DataQuery createQuery()
DataQuery
.DataQuery
instance.DataException
Interval getInterval()
Interval
of the store, that means the temporal
interval where the store has valid data.Collection getTimes()
Time
objects.Collection getTimes(Interval interval)
interval
- the interval of timeTime
objects.