public abstract class AbstractRasterDataStore extends AbstractDisposable implements RasterDataStore, CoverageStoreProviderServices, QueryableRaster, DataStoreInitializer
Modifier and Type | Field and Description |
---|---|
protected DefaultRasterQuery |
currentQuery |
protected RasterDataServerExplorer |
explorer |
protected Metadata |
metadata |
protected double |
nHeight |
protected double |
nWidth
Ancho y alto en pixeles del último buffer asignado
|
protected DataStoreParameters |
parameters |
static String |
PERSISTENT_DESCRIPTION |
static String |
PERSISTENT_NAME |
protected RasterProvider |
provider |
protected BandListImpl |
storeBandList |
ALPHA_BAND, BLUE_BAND, FILE, GREEN_BAND, MOSAIC, POSTGIS, RED_BAND, REMOTE
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
FEATURE_METADATA_DEFINITION_NAME, METADATA_CONTAINERNAME, METADATA_CRS, METADATA_DEFINITION_NAME, METADATA_ENVELOPE, METADATA_FEATURETYPE, METADATA_PROVIDER, SPATIAL_METADATA_DEFINITION_NAME
Constructor and Description |
---|
AbstractRasterDataStore() |
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) |
Extent |
adjustToExtent(Extent e)
Gets an extent adjusted to the bounding box of this raster
|
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
void |
clear() |
void |
close()
Closes this data store
|
CoverageSelection |
createDefaultCoverageSelection() |
DataQuery |
createQuery()
Returns a new instance of a
DataQuery . |
DataSet |
createSelection()
Creates a new selection.
|
Vectorization |
createVectorizeObject()
Gets an object which vectorize a raster
|
void |
delegate(DynObject dynObject) |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
disableNotifications()
Disable the notification of events to registered Observers.
|
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.
|
protected void |
finalize() |
Iterator<?> |
getChildren()
Returns an iterator over this store children
|
CoverageStore |
getCoverageStore() |
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.
|
BandList |
getDefaultBandList()
Gets a default band list for this provider
|
DynClass |
getDynClass() |
Object |
getDynValue(String name) |
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.
|
Buffer |
getLastBuffer()
Returns the last buffer loaded if the flag storeLastBuffer in the query is true
|
DataManager |
getManager() |
Set<?> |
getMetadataChildren()
Returns an unsorted set of child Metadata objects.
|
Object |
getMetadataID()
Returns the unique identifier of the Metadata.
|
DataStoreParameters |
getParameters()
Return the of parameters of this store
|
abstract CoverageStoreProvider |
getProvider()
Gets a provider
|
String |
getProviderName()
Return the provider name that use this store.
|
Render |
getRender()
Builds an render object using this RasterDataStore
|
DataSet |
getSelection()
Returns the selected set of data
|
int |
getSourceType()
Returns the source type (FILE, POSTGIS, REMOTE,...)
|
DataStore |
getStore()
Return the Store instance
|
TimeSeries |
getTimeSerials()
Gets the serial information
|
boolean |
hasDynValue(String name) |
void |
implement(DynClass dynClass) |
void |
initializeBandList() |
void |
intializePhase1(DataManager dataManager,
DataStoreParameters parameters) |
void |
intializePhase2(DataStoreProvider provider) |
Object |
invokeDynMethod(int code,
Object[] args) |
Object |
invokeDynMethod(String name,
Object[] args) |
boolean |
isFileSupported(String fName)
Tipo de fichero soportado.
|
abstract boolean |
loadSerialInfoFromRmf(TimeSeries serialInfo)
Loads information about serials
|
void |
notifyChange(String notification) |
void |
notifyChange(String notification,
Command command) |
void |
notifyChange(String arg0,
Resource arg1) |
Buffer |
query(RasterQuery query)
Makes a request to load a buffer of data.
|
Object[] |
queryArray(RasterQuery query)
Tasks to do in the
Datastore
Check parameters and adjust them to not exceed the window size
Build the band list to draw
Create the buffers (RO or RW) and set them in the RasterQuery object
Calculate steps when supersampling is applied
|
void |
refresh()
Refreshes this store state.
|
static void |
registerMetadataDefinition()
Registers metadata definition
|
abstract void |
saveColorTableToRmf(ColorTable table)
Saves a color table
|
abstract void |
saveGeoPointListToRmf(GeoPointList pointList)
Saves the geo point list to a RMF file
|
abstract void |
saveROIFileListToRmf(List<File> fileList)
Saves a list of files in the RMF file
|
abstract void |
saveSerialInfoToRmf(TimeSeries serialInfo)
Saves information about serials
|
void |
setDynValue(String name,
Object value) |
void |
setExplorer(RasterDataServerExplorer explorer)
Sets the explorer
|
void |
setRender(Render render)
Assigns a render object
|
void |
setSelection(DataSet selection)
Sets the current data selection with the given data set.
|
void |
setTimeSerials(TimeSeries serialInfo)
Sets the serial information
|
dispose, dispose
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFile, cloneDataStore, deleteLayerFromCache, getAffineTransform, getAffineTransformByProvider, getBandCountByProvider, getBands, getData, getDataParametersByProvider, getFileSize, getFileSizeByProvider, getGeoPointList, getHeightByProvider, getInfoByPoint, getInfoByPoint, getInternalParameters, getMetadataByProvider, getOverviewCount, getOverviewCountByProvider, getOverviewHeight, getOverviewSizeByProvider, getOverviewWidth, getOwnAffineTransform, getProviderCount, getROIFileListFromRmf, getRois, getRois, getURIByBand, getURIByProvider, getView, getWidthByProvider, isGeoreferenced, isInside, isMosaic, isMultiFile, isOpen, isRasterEnclosed, isReproyectable, isRotated, isTiled, needEnhanced, newDataStore, newNotTiledDataStore, overviewsSupport, rasterToWorld, reload, removeFile, saveGeoreferencingToRmf, setAffineTransform, setGeoPointList, setNoDataValue, setParameters, setProvider, setRois, setTileServer, worldToRaster
goTo, selectNext, selectPrev, setTime
getCoordsInLevel, getCoordsInTheNearestLevel, getNearestLevel, getZoomLevels
getBandCount, getCellSize, getColorInterpretation, getColorTable, getDataType, getExtent, getExtentWithoutRot, getHeight, getHistogramComputer, getImageLegend, getMetadata, getName, getNoDataValue, getPixelSizeX, getPixelSizeY, getProjection, getStatistics, getTransparency, getWidth, getWktProjection, setColorInterpretation, setProjection, setStatistics
getHistogramComputer
getInterval, getName, getTimes, getTimes
loadFromState, saveToState
getMetadataName
dispose
addDrawableBand, clearDrawableBands, getAffineTransform, getBandCount, getBands, getColorTable, getColorTable, getDataStore, getDrawableBands, getExtent, getHeight, getNoDataValue, getTile, getWidth, rasterToWorld, setDrawableBands, worldToRaster
public static final String PERSISTENT_NAME
public static final String PERSISTENT_DESCRIPTION
protected DefaultRasterQuery currentQuery
protected BandListImpl storeBandList
protected RasterProvider provider
protected Metadata metadata
protected double nWidth
protected double nHeight
protected DataStoreParameters parameters
protected RasterDataServerExplorer explorer
public BandList getDefaultBandList()
RasterDataStore
getDefaultBandList
in interface RasterDataStore
public void initializeBandList()
public Buffer query(RasterQuery query) throws ProcessInterruptedException, QueryException
RasterDataStore
query
in interface RasterDataStore
ProcessInterruptedException
QueryException
public Object[] queryArray(RasterQuery query) throws ProcessInterruptedException, QueryException
Datastore
RasterQuery
objectqueryArray
in interface RasterDataStore
ProcessInterruptedException
QueryException
public Extent adjustToExtent(Extent e)
QueryableRaster
adjustToExtent
in interface QueryableRaster
public String getFullName()
DataStore
getFullName
in interface DataStore
public Buffer getLastBuffer()
RasterDataStore
getLastBuffer
in interface RasterDataStore
public TimeSeries getTimeSerials() throws RmfSerializerException
TRasterStore
getTimeSerials
in interface TRasterStore
RmfSerializerException
public void setTimeSerials(TimeSeries serialInfo) throws RmfSerializerException
TRasterStore
setTimeSerials
in interface TRasterStore
RmfSerializerException
public abstract void saveColorTableToRmf(ColorTable table) throws RmfSerializerException
RasterDataStore
saveColorTableToRmf
in interface RasterDataStore
RmfSerializerException
public abstract void saveGeoPointListToRmf(GeoPointList pointList) throws RmfSerializerException
RasterDataStore
saveGeoPointListToRmf
in interface RasterDataStore
RmfSerializerException
public abstract void saveROIFileListToRmf(List<File> fileList) throws RmfSerializerException
RasterDataStore
saveROIFileListToRmf
in interface RasterDataStore
RmfSerializerException
public abstract void saveSerialInfoToRmf(TimeSeries serialInfo) throws RmfSerializerException
serialInfo
- object to saveRmfSerializerException
public abstract boolean loadSerialInfoFromRmf(TimeSeries serialInfo)
serialInfo
- public Vectorization createVectorizeObject() throws QueryException, ProcessInterruptedException
RasterDataStore
createVectorizeObject
in interface RasterDataStore
ProcessInterruptedException
- When the object Vectorization is built the raster data buffer is loaded.
This operation can be interruptedQueryException
public Render getRender()
RasterDataStore
getRender
in interface RasterDataStore
public void setRender(Render render)
RasterDataStore
setRender
in interface RasterDataStore
public boolean isFileSupported(String fName)
RasterDataStore
isFileSupported
in interface RasterDataStore
fName
- Fichero rasterpublic static void registerMetadataDefinition() throws MetadataException
MetadataException
public int getSourceType()
RasterDataStore
getSourceType
in interface RasterDataStore
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 DataManager getManager()
getManager
in interface CoverageStoreProviderServices
public String getProviderName()
DataStore
getProviderName
in interface DataStore
public void refresh() throws DataException
DataStore
refresh
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, 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 DataSet getSelection() throws DataException
DataStore
getSelection
in interface DataStore
DataException
public void setSelection(DataSet selection) throws DataException
DataStore
setSelection
in interface DataStore
DataException
public DataSet createSelection() throws DataException
DataStore
createSelection
in interface DataStore
DataException
public Iterator<?> getChildren()
DataStore
getChildren
in interface DataStore
public DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException
DataStore
getExplorer
in interface DataStore
null
if this was not accessed through any
DataServerExplorer.DataException
ValidateDataParametersException
public void setExplorer(RasterDataServerExplorer explorer)
setExplorer
in interface RasterDataStore
explorer
- public DataQuery createQuery()
DataStore
DataQuery
.createQuery
in interface DataStore
DataQuery
instance.public Object getMetadataID()
Metadata
getMetadataID
in interface Metadata
public Set<?> getMetadataChildren()
Metadata
getMetadataChildren
in interface Metadata
public void doDispose()
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDisposable
AbstractDisposable.dispose()
public 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 disableNotifications()
ComplexObservable
disableNotifications
in interface ComplexObservable
public void enableNotifications()
ComplexObservable
enableNotifications
in interface ComplexObservable
public void beginComplexNotification()
ComplexObservable
beginComplexNotification
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 DynClass getDynClass()
getDynClass
in interface DynObject
public Object getDynValue(String name) throws DynFieldNotFoundException
getDynValue
in interface DynObject
DynFieldNotFoundException
public void setDynValue(String name, Object value) throws DynFieldNotFoundException
setDynValue
in interface DynObject
DynFieldNotFoundException
public boolean hasDynValue(String name)
hasDynValue
in interface DynObject
public Object invokeDynMethod(String name, Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public Object invokeDynMethod(int code, Object[] args) throws DynMethodException
invokeDynMethod
in interface DynObject
DynMethodException
public DataStoreParameters getParameters()
DataStore
getParameters
in interface DataStore
public CoverageSelection createDefaultCoverageSelection() throws DataException
createDefaultCoverageSelection
in interface CoverageStoreProviderServices
DataException
public CoverageStore getCoverageStore()
getCoverageStore
in interface CoverageStoreProviderServices
public abstract CoverageStoreProvider getProvider()
RasterDataStore
getProvider
in interface RasterDataStore
getProvider
in interface CoverageStoreProviderServices
public void notifyChange(String notification)
notifyChange
in interface CoverageStoreProviderServices
public void notifyChange(String arg0, Resource arg1)
notifyChange
in interface CoverageStoreProviderServices
public void notifyChange(String notification, Command command)
notifyChange
in interface CoverageStoreProviderServices
public DataStore getStore()
DataStoreProviderServices
getStore
in interface DataStoreProviderServices
public void close()
RasterDataStore
close
in interface RasterDataStore