Class WritableResource
java.lang.Object
org.apache.sis.storage.AbstractResource
org.apache.sis.storage.AbstractGridCoverageResource
org.apache.sis.internal.storage.image.WorldFileResource
org.apache.sis.internal.storage.image.WritableResource
- All Implemented Interfaces:
StoreResource
,DataSet
,GridCoverageResource
,Resource
,WritableGridCoverageResource
An image which can be replaced or updated.
- Since:
- 1.2
- Version:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sis.storage.WritableGridCoverageResource
WritableGridCoverageResource.CommonOption, WritableGridCoverageResource.Option
-
Field Summary
Fields inherited from class org.apache.sis.internal.storage.image.WorldFileResource
X_DIMENSION, Y_DIMENSION
Fields inherited from class org.apache.sis.storage.AbstractResource
listeners
-
Constructor Summary
ConstructorsConstructorDescriptionWritableResource
(WritableStore store, StoreListeners parent, int imageIndex, GridGeometry gridGeometry) Creates a new resource. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(GridCoverage coverage, WritableGridCoverageResource.Option... options) Writes a new coverage in the data store for this resource.Methods inherited from class org.apache.sis.internal.storage.image.WorldFileResource
decrementImageIndex, dispose, getGridGeometry, getIdentifier, getImageIndex, getOriginator, getSampleDimensions, read, setGridCoverage, store
Methods inherited from class org.apache.sis.storage.AbstractGridCoverageResource
canNotRead, createMetadata, getEnvelope, logReadOperation
Methods inherited from class org.apache.sis.storage.AbstractResource
addListener, clearCache, getMetadata, getSynchronizationLock, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sis.storage.DataSet
getEnvelope
Methods inherited from interface org.apache.sis.storage.GridCoverageResource
getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, read, setLoadingStrategy, subset
Methods inherited from interface org.apache.sis.storage.Resource
addListener, getIdentifier, getMetadata, removeListener
-
Constructor Details
-
WritableResource
WritableResource(WritableStore store, StoreListeners parent, int imageIndex, GridGeometry gridGeometry) throws DataStoreException Creates a new resource.- Throws:
DataStoreException
-
-
Method Details
-
write
public void write(GridCoverage coverage, WritableGridCoverageResource.Option... options) throws DataStoreException Writes a new coverage in the data store for this resource. If a coverage already exists for this resource, then it will be overwritten only if theTRUNCATE
orUPDATE
option is specified.- Specified by:
write
in interfaceWritableGridCoverageResource
- Parameters:
coverage
- new data to write in the data store for this resource.options
- configuration of the write operation.- Throws:
DataStoreException
- if an error occurred while writing data in the underlying data store.
-