public static final class WmtsDataSource.Builder extends Object implements AutoCloseable
WmtsDataSource
.Constructor and Description |
---|
Builder(WmtsDataSource.Builder other) |
Modifier and Type | Method and Description |
---|---|
WmtsDataSource |
build()
Build the wmts data source.
|
void |
close() |
protected void |
finalize() |
WmtsDataSource.Builder |
format(String format)
Sets the preferred format to request images.
|
WmtsDataSource.Builder |
layer(String layer)
Sets the layer to use within the WMTS data provided by the source.
|
WmtsDataSource.Builder |
style(String style)
Sets the style to use within the WMTS data provided by the source.
|
WmtsDataSource.Builder |
url(String url)
Sets the base URL of the WMTS data source.
|
public Builder(@NotNull WmtsDataSource.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public WmtsDataSource.Builder layer(@NotNull String layer)
An empty layer name will link to the first layer described in the capabilities.
layer
- Layer
to use within the WMTS data provided by the source.@NotNull public WmtsDataSource.Builder style(@NotNull String style)
An empty style name will link to the default layer style.
style
- Style to use within the WMTS data provided by the source.@NotNull public WmtsDataSource.Builder format(@NotNull String format)
If specified and if the layer offers specified format, it will be selected as a preference when requesting images.
format
- Preferred format to request images.@NotNull public WmtsDataSource.Builder url(@NotNull String url)
Calling this function is mandatory.
url
- the base URL of the WMTS data source. Calling this function is mandatory.@NotNull public WmtsDataSource build() throws IllegalStateException
After calling this function, this builder should no longer be used.
IllegalStateException
- If not all mandatory parameters are set.