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_DIMENSIONFields 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 TypeMethodDescriptionvoidwrite(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, storeMethods inherited from class org.apache.sis.storage.AbstractGridCoverageResource
canNotRead, createMetadata, getEnvelope, logReadOperationMethods inherited from class org.apache.sis.storage.AbstractResource
addListener, clearCache, getMetadata, getSynchronizationLock, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sis.storage.DataSet
getEnvelopeMethods inherited from interface org.apache.sis.storage.GridCoverageResource
getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, read, setLoadingStrategy, subsetMethods 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 theTRUNCATEorUPDATEoption is specified.- Specified by:
writein 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.
-