Interface WritableTiledResource
- All Superinterfaces:
Resource, TiledResource
A
TiledResource that can write and delete tile matrix sets.
All methods in this interface expect non-null arguments are return non-null values.
- Since:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface Resource
Resource.FileSetModifier and TypeInterfaceDescriptionstatic classPaths to the files potentially used by the enclosing resource. -
Method Summary
Modifier and TypeMethodDescriptionAdds the given tile matrix set to this resource and returns a writable instance for later completion.voiddeleteTileMatrixSet(String identifier) Deletes aTileMatrixSetidentified by the given name.Collection<? extends WritableTileMatrixSet> Returns the collection of all available tile matrix sets in this resource.Methods inherited from interface Resource
addListener, getFileSet, getIdentifier, getMetadata, removeListenerModifier and TypeMethodDescriptiondefault <T extends StoreEvent>
voidaddListener(Class<T> eventType, StoreListener<? super T> listener) Registers a listener to notify when the specified kind of event occurs in this resource or in children.default Optional<Resource.FileSet> Gets the paths to the files potentially used by this resource.default Optional<GenericName> Returns the resource persistent identifier.Returns information about this resource.default <T extends StoreEvent>
voidremoveListener(Class<T> eventType, StoreListener<? super T> listener) Unregisters a listener previously added to this resource for the given type of events.
-
Method Details
-
getTileMatrixSets
Returns the collection of all available tile matrix sets in this resource. The returned collection is unmodifiable but live: additions or removals of tile matrix sets in this resource are reflected in the returned collection.- Specified by:
getTileMatrixSetsin interfaceTiledResource- Returns:
- an unmodifiable view of all
TileMatrixSetinstances in this resource. - Throws:
DataStoreException- if an error occurred while fetching the tile matrix sets.
-
createTileMatrixSet
Adds the given tile matrix set to this resource and returns a writable instance for later completion. Typically the givenTileMatrixSetinstance contains no tile and is used only as a template. If theTileMatrixSetis not empty, then the tiles that it contains are written immediately.This method returns a writable tile matrix set with the same tiles as the given
TileMatrixSet. The identifier and the envelope of the returned set may be different, but the CRS and tiling scheme shall be equivalent with a tolerance for rounding errors.- Parameters:
tiles- the (potentially empty) tile matrix set to create.- Returns:
- a writable tile matrix set to use for adding more tiles.
- Throws:
ReadOnlyStorageException- if this resource is not writable. It may be caused by insufficient credentials.IncompatibleResourceException- if the given tile matrix set is incompatible with this resource.DataStoreException- if creating the tile matrix set failed for another reason.
-
deleteTileMatrixSet
Deletes aTileMatrixSetidentified by the given name. The given identifier shall be theTileMatrixSet.getIdentifier().toString()value of the set to delete.- Parameters:
identifier- identifier of theTileMatrixSetto delete.- Throws:
NoSuchDataException- if there is no tile matrix set associated with the given identifier in this resource.ReadOnlyStorageException- if this resource is not writable. It may be caused by insufficient credentials.DataStoreException- if deleting the tile matrix set failed for another reason.
-