public class DefaultRasterStore extends AbstractDisposable implements DataStoreInitializer2, RasterStoreProviderServices, RasterStore, Observer
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_NAMEDYNMETHOD_GETCOLORINTERPRETATION_NAME, DYNMETHOD_GETCOLORTABLE_NAME, DYNMETHOD_GETLEGEND_NAMECSV_PROVIDER_NAME, DBASE_PROVIDER_NAME, FEATURE_METADATA_DEFINITION_NAME, GEOPACKAGE_PROVIDER_NAME, H2SPATIAL_PROVIDER_NAME, MDB_PROVIDER_NAME, METADATA_CONTAINERNAME, METADATA_CRS, METADATA_ENVELOPE, METADATA_FEATURETYPE, METADATA_PROVIDER, SHAPE_PROVIDER_NAME, SPATIAL_METADATA_DEFINITION_NAME| Constructor and Description |
|---|
DefaultRasterStore() |
| 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 |
addBand(RasterStore store,
int band)
Add a band from other store.
|
void |
addBands(RasterStore store,
java.util.List<java.lang.Integer> bands)
Add a list of bands from other store.
|
void |
addObserver(Observer observer) |
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
void |
clear() |
void |
clearAdditionalBands()
Remove any band that does not belong to itself.
|
java.lang.Object |
clone()
Creates a copy of the object.
|
BandAttributeDescriptor |
createBandAttributeDescriptor(int band,
java.lang.String name,
java.lang.Object value,
java.lang.String description,
java.util.List<java.lang.Object> values,
java.lang.String units)
Creates a
BandAttributeDescriptor. |
BandAttributeDescriptor |
createBandAttributeDescriptor(int band,
java.lang.String name,
java.lang.String description,
java.util.List<java.lang.Object> values)
Creates a
BandAttributeDescriptor. |
BandAttributeDescriptor |
createBandAttributeDescriptor(int band,
java.lang.String name,
java.lang.String description,
java.util.List<java.lang.Object> values,
java.lang.String units)
Creates a
BandAttributeDescriptor. |
BandDescriptor |
createBandDescriptor(int band,
java.util.List<BandAttributeDescriptor> attributes)
Creates a
BandDescriptor object. |
BandQuery |
createBandQuery(int band)
Creates a
BandQuery from band received as parameter. |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery. |
RasterQuery |
createRasterQuery()
Returns a new
RasterQuery associated to this store. |
DataSet |
createSelection()
Creates a new selection.
|
void |
delegate(DynObject dynObject) |
void |
deleteObserver(Observer observer) |
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.
|
BandDescriptor |
getBandDescriptor(int band)
Gets
BandsDescriptor of band received as parameter. |
java.util.List<BandDescriptor> |
getBandDescriptors() |
int |
getBands()
Gets number of total bands
|
RasterCache |
getCache() |
UnmodifiableBasicMap<java.lang.String,DataStore> |
getChildren()
Returns an UnmodifiableBasicMap with 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.
|
BufferDimensions |
getDimensions()
Return the buffer dimensions of the complete store.
|
DynClass |
getDynClass() |
java.lang.Object |
getDynValue(java.lang.String name) |
Envelope |
getEnvelope()
Returns the envelope associated to this store buffer
|
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
|
RasterStoreProvider |
getProvider()
Gets this provider
|
DataStoreProviderFactory |
getProviderFactory() |
java.lang.String |
getProviderName()
Return the provider name that use this store.
|
RasterSet |
getRasterSet()
Returns all available data in the store
|
void |
getRasterSet(Observer observer)
Adds an observer to the DataSet
|
RasterSet |
getRasterSet(RasterQuery rasterQuery)
Returns a subset of data taking into account the properties and
restrictions of the RasterQuery.
|
void |
getRasterSet(RasterQuery rasterQuery,
Observer observer)
Adds an observer to the queried DataSet
|
RasterStore |
getRasterStore() |
ResourcesStorage |
getResourcesStorage() |
DataSet |
getSelection()
Returns the selected set of data
|
DataStore |
getStore()
Return the Store instance
|
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) |
void |
implement(DynClass dynClass) |
void |
intialize(DataManager dataManager,
DataStoreParameters parameters) |
java.lang.Object |
invokeDynMethod(int code,
java.lang.Object[] args) |
java.lang.Object |
invokeDynMethod(java.lang.String name,
java.lang.Object[] args) |
boolean |
isOwnBand(int band)
Return true if the band is own.
|
boolean |
isTiled() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifyChange(DefaultRasterStoreNotification storeNotification)
Notifies change
|
void |
notifyChange(java.lang.String notification)
Notifies change
|
void |
notifyChange(java.lang.String notification,
Resource resource)
Call this to send a notification to observers of this store relative to
Resources
|
void |
notifyChange(java.lang.String notification,
ResourceProvider data)
Call this to send a notification to observers of this store
|
void |
refresh()
Refreshes this store state.
|
static void |
registerMetadataDefinition()
Registers metadata
|
static void |
registerPersistenceDefinition()
Registers persistence
|
void |
removeBand(int band)
Remove a band.
|
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 |
setProvider(DataStoreProvider provider) |
void |
setSelection(DataSet selection)
Sets the current data selection with the given data set.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
void |
useCache(java.lang.String providerName,
DynObject parameters) |
dispose, disposeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullNameQuietly, getNameQuietlydisposecloneQuietly, cloneQuietlypublic static void registerPersistenceDefinition()
public static void registerMetadataDefinition()
throws MetadataException
MetadataExceptionpublic DataManager getManager()
getManager in interface RasterStoreProviderServicespublic java.lang.String getName()
DataStoregetName in interface DataStoregetName in interface RasterStoreProviderServicespublic java.lang.String getFullName()
DataStoregetFullName in interface DataStorepublic DataStoreParameters getParameters()
DataStoregetParameters in interface DataStoregetParameters in interface RasterStorepublic java.lang.String getProviderName()
DataStoregetProviderName in interface DataStorepublic void refresh()
throws DataException
DataStorerefresh in interface DataStoreDataExceptionpublic DataSet getDataSet() throws DataException
DataStoregetDataSet in interface DataStoreDataException - if there is any error while loading the datapublic DataSet getDataSet(DataQuery dataQuery) throws DataException
DataStoregetDataSet in interface DataStoredataQuery - defines the properties of the requested dataDataException - if there is any error while loading the datapublic void getDataSet(Observer observer) throws DataException
DataStoregetDataSet in interface DataStoreobserver - 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
DataStoregetDataSet in interface DataStoredataQuery - 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 RasterSet getRasterSet(RasterQuery rasterQuery) throws DataException
RasterStoregetRasterSet in interface RasterStoreDataExceptionpublic RasterSet getRasterSet() throws DataException
RasterStoregetRasterSet in interface RasterStoreDataExceptionpublic void getRasterSet(Observer observer) throws DataException
getRasterSet in interface RasterStoreobserver - DataExceptionpublic void getRasterSet(RasterQuery rasterQuery, Observer observer) throws DataException
getRasterSet in interface RasterStorerasterQuery - observer - DataExceptionpublic void accept(Visitor visitor) throws BaseException
DataStoreVisitor.
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 DataStoreaccept in interface Visitablevisitor - 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
DataStoreVisitor.
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 DataStorevisitor - 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 DataSet getSelection() throws DataException
DataStoregetSelection in interface DataStoreDataExceptionpublic void setSelection(DataSet selection) throws DataException
DataStoresetSelection in interface DataStoreDataExceptionpublic DataSet createSelection() throws DataException
DataStorecreateSelection in interface DataStoreDataExceptionpublic UnmodifiableBasicMap<java.lang.String,DataStore> getChildren()
DataStoregetChildren in interface DataStorepublic DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException
DataStoregetExplorer in interface DataStorenull if this was not accessed through any
DataServerExplorer.DataExceptionValidateDataParametersExceptionpublic DataQuery createQuery()
DataStoreDataQuery.createQuery in interface DataStoreDataQuery instance.public Interval getInterval()
DataStoreInterval of the store, that means the temporal
interval where the store has valid data.getInterval in interface DataStorepublic java.util.Collection<?> getTimes()
DataStorepublic java.util.Collection<?> getTimes(Interval interval)
DataStorepublic void disableNotifications()
ComplexObservabledisableNotifications in interface ComplexObservablepublic void enableNotifications()
ComplexObservableenableNotifications in interface ComplexObservablepublic void beginComplexNotification()
ComplexObservablebeginComplexNotification in interface ComplexObservablepublic 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 ComplexObservablepublic void addObserver(Observer observer)
addObserver in interface Observablepublic void deleteObserver(Observer observer)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic java.util.Set<?> getMetadataChildren()
throws MetadataException
MetadatagetMetadataChildren in interface MetadataMetadataExceptionpublic java.lang.Object getMetadataID()
throws MetadataException
MetadatagetMetadataID in interface MetadataMetadataExceptionpublic java.lang.String getMetadataName()
throws MetadataException
MetadatagetMetadataName in interface MetadataMetadataExceptionpublic DynClass getDynClass()
getDynClass in interface DynObjectpublic java.lang.Object getDynValue(java.lang.String name)
throws DynFieldNotFoundException
getDynValue in interface DynObjectDynFieldNotFoundExceptionpublic void setDynValue(java.lang.String name,
java.lang.Object value)
throws DynFieldNotFoundException
setDynValue in interface DynObjectDynFieldNotFoundExceptionpublic boolean hasDynValue(java.lang.String name)
hasDynValue in interface DynObjectpublic java.lang.Object invokeDynMethod(java.lang.String name,
java.lang.Object[] args)
throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic java.lang.Object invokeDynMethod(int code,
java.lang.Object[] args)
throws DynMethodException
invokeDynMethod in interface DynObjectDynMethodExceptionpublic RasterQuery createRasterQuery()
RasterStoreRasterQuery associated to this store.createRasterQuery in interface RasterStorepublic DataStore getStore()
DataStoreProviderServicesgetStore in interface DataStoreProviderServicespublic void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
protected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.public void notifyChange(java.lang.String notification)
notification - public void notifyChange(java.lang.String notification,
ResourceProvider data)
RasterStoreProviderServicesnotifyChange in interface RasterStoreProviderServicespublic void notifyChange(DefaultRasterStoreNotification storeNotification)
storeNotification - public RasterStoreProvider getProvider()
getProvider in interface RasterStoreProviderServicespublic Envelope getEnvelope() throws DataException, LocatorException, CreateEnvelopeException
RasterStoregetEnvelope in interface RasterStoreDataExceptionLocatorExceptionCreateEnvelopeExceptionpublic java.util.List<BandDescriptor> getBandDescriptors()
getBandDescriptors in interface RasterStorepublic BandDescriptor getBandDescriptor(int band)
RasterStoreBandsDescriptor of band received as parameter. If band does
not have BandDescriptor, this method will return an
empty BandsDescriptor.getBandDescriptor in interface RasterStoreband - Band to get its BandsDescriptorpublic BandQuery createBandQuery(int band)
RasterStoreBandQuery from band received as parameter.createBandQuery in interface RasterStoreband - Band to create BandQuerypublic int getBands()
RasterStoregetBands in interface RasterStorepublic BandDescriptor createBandDescriptor(int band, java.util.List<BandAttributeDescriptor> attributes)
RasterStoreProviderServicesBandDescriptor object.createBandDescriptor in interface RasterStoreProviderServicesband - BandDescriptor bandattributes - A list with available BandAttributeDescriptor.public BandAttributeDescriptor createBandAttributeDescriptor(int band, java.lang.String name, java.lang.String description, java.util.List<java.lang.Object> values, java.lang.String units)
RasterStoreProviderServicesBandAttributeDescriptor.createBandAttributeDescriptor in interface RasterStoreProviderServicesband - Band of attribute descriptor.name - Name of attributedescription - Descriptor of attributevalues - Values of band attribute descriptorunits - String unitsBandAttributeDescriptorpublic BandAttributeDescriptor createBandAttributeDescriptor(int band, java.lang.String name, java.lang.Object value, java.lang.String description, java.util.List<java.lang.Object> values, java.lang.String units)
RasterStoreProviderServicesBandAttributeDescriptor.createBandAttributeDescriptor in interface RasterStoreProviderServicesband - Band of attribute descriptor.name - Name of attributedescription - Descriptor of attributevalues - Values of band attribute descriptorunits - String unitsBandAttributeDescriptorpublic BandAttributeDescriptor createBandAttributeDescriptor(int band, java.lang.String name, java.lang.String description, java.util.List<java.lang.Object> values)
RasterStoreProviderServicesBandAttributeDescriptor.createBandAttributeDescriptor in interface RasterStoreProviderServicesband - Band of attribute descriptor.name - Name of attributedescription - Descriptor of attributevalues - Values of band attribute descriptorBandAttributeDescriptorpublic void notifyChange(java.lang.String notification,
Resource resource)
RasterStoreProviderServicesnotifyChange in interface RasterStoreProviderServicespublic RasterStore getRasterStore()
getRasterStore in interface RasterStoreProviderServicespublic void useCache(java.lang.String providerName,
DynObject parameters)
throws DataException
useCache in interface DataStoreDataExceptionpublic RasterCache getCache()
getCache in interface DataStoregetCache in interface RasterStorepublic void intialize(DataManager dataManager, DataStoreParameters parameters) throws InitializeException
intialize in interface DataStoreInitializer2InitializeExceptionpublic void setProvider(DataStoreProvider provider)
setProvider in interface DataStoreInitializer2public void addBand(RasterStore store, int band) throws DataException
RasterStoreaddBand in interface RasterStoreDataExceptionpublic void addBands(RasterStore store, java.util.List<java.lang.Integer> bands) throws DataException
RasterStoreaddBands in interface RasterStoreDataExceptionpublic void clearAdditionalBands()
RasterStoreclearAdditionalBands in interface RasterStorepublic void removeBand(int band)
RasterStoreremoveBand in interface RasterStorepublic boolean isOwnBand(int band)
RasterStoreisOwnBand in interface RasterStorepublic DataStoreProviderFactory getProviderFactory()
getProviderFactory in interface DataStorepublic BufferDimensions getDimensions() throws InitializeException
RasterStoregetDimensions in interface RasterStoreInitializeExceptionpublic boolean isTiled()
isTiled in interface RasterStorepublic boolean hasDynMethod(java.lang.String name)
hasDynMethod in interface DynObject_v2public StoresRepository getStoresRepository()
getStoresRepository in interface DataStorepublic ResourcesStorage getResourcesStorage()
getResourcesStorage in interface DataStore