Class SingleImageStore.Writable
java.lang.Object
org.apache.sis.storage.DataStore
org.apache.sis.internal.storage.URIDataStore
org.apache.sis.internal.storage.PRJDataStore
org.apache.sis.internal.storage.image.WorldFileStore
org.apache.sis.internal.storage.image.SingleImageStore
org.apache.sis.internal.storage.image.SingleImageStore.Writable
- All Implemented Interfaces:
AutoCloseable
,ResourceOnFileSystem
,StoreResource
,DataSet
,GridCoverageResource
,Resource
,WritableGridCoverageResource
,Localized
- Enclosing class:
- SingleImageStore
static final class SingleImageStore.Writable
extends SingleImageStore
implements WritableGridCoverageResource
The writable variant of
MultiImageStore
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.storage.image.SingleImageStore
SingleImageStore.Writable
Nested classes/interfaces inherited from class org.apache.sis.internal.storage.image.WorldFileStore
WorldFileStore.Components
Nested classes/interfaces inherited from class org.apache.sis.internal.storage.PRJDataStore
PRJDataStore.AuxiliaryContent, PRJDataStore.Provider
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.WorldFileStore
CELL_ANCHOR, identifiers, MAIN_IMAGE, suffix
Fields inherited from class org.apache.sis.internal.storage.PRJDataStore
crs, encoding, PRJ
Fields inherited from class org.apache.sis.internal.storage.URIDataStore
location
-
Constructor Summary
ConstructorsConstructorDescriptionWritable
(FormatFinder format) Creates a new store from the given file, URL or stream. -
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.SingleImageStore
delegate, getEnvelope, getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, isComponentHidden, read, setLoadingStrategy, subset
Methods inherited from class org.apache.sis.internal.storage.image.WorldFileStore
close, components, components, createImageResource, getComponentFiles, getCurrentReader, getGridGeometry, getImageFormat, getMetadata, prepareReader, reader, remove, resources, setGridGeometry
Methods inherited from class org.apache.sis.internal.storage.PRJDataStore
deleteAuxiliaryFile, getOpenParameters, listComponentFiles, readAuxiliaryFile, readPRJ, writeAuxiliaryFile, writePRJ
Methods inherited from class org.apache.sis.internal.storage.URIDataStore
addTitleOrIdentifier, getIdentifier, getOriginator, getSpecifiedPath, location, parameters
Methods inherited from class org.apache.sis.storage.DataStore
addListener, findResource, getDisplayName, getLocale, getNativeMetadata, getProvider, removeListener, setLocale, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
-
Writable
Writable(FormatFinder format) throws DataStoreException, IOException Creates a new store from the given file, URL or stream.- Parameters:
format
- information about the storage (URL, stream, etc) and the reader/writer to use.- Throws:
DataStoreException
- if an error occurred while opening the stream.IOException
- if an error occurred while creating the image reader instance.
-
-
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:
ReadOnlyStorageException
- if the resource is (possibly temporarily) read-only.ResourceAlreadyExistsException
- if a coverage already exists in this resource and noREPLACE
orUPDATE
option have been specified.IncompatibleResourceException
- if the given resource cannot be written, for example because its grid geometry is unsupported by this resource.DataStoreException
- if another error occurred while writing data in the underlying data store.
-