Package com.luciad.formats.wfs
Class WfsModelDecoderOptions.Builder
java.lang.Object
com.luciad.formats.wfs.WfsModelDecoderOptions.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
WfsModelDecoderOptions
Builder for the WFS options.- Since:
- 2026.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the options for the WFS model decoder.voidclose()protected voidfinalize()httpClient(IHttpClient httpClient) Sets the http client to be used for fetching the data.outputFormat(String outputFormat) Sets the output format to request for GetFeature responses.
-
Constructor Details
-
Builder
Copy constructor.- Parameters:
other- the builder to copy.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Builds the options for the WFS model decoder.- Returns:
- the options for the WFS model decoder.
- Throws:
IllegalStateException- If not all mandatory parameters are set.
-
httpClient
Sets the http client to be used for fetching the data.Calling this function is optional.
See related article for an example on how to customize HTTP requests when loading data.
- Parameters:
httpClient- HTTP client implementation to fetch the WFS resources. Whennullthe decoder uses its own HTTP client.- Returns:
- this builder.
-
outputFormat
@NotNull public WfsModelDecoderOptions.Builder outputFormat(@NotNull String outputFormat) throws IllegalArgumentException Sets the output format to request for GetFeature responses.Calling this function is optional. If you leave it unset, no OUTPUTFORMAT query parameter is sent and the server default (GML) is used.
The value is an output format the server advertises, as listed by
WfsFeatureType#getOutputFormats(), for example "application/json". A value that looks like JSON is decoded as GeoJSON. Any other value is decoded as GML. Only GML and GeoJSON responses can be decoded.- Parameters:
outputFormat- the output format to request. Cannot be empty.- Returns:
- this builder.
- Throws:
IllegalArgumentException- ifoutputFormatis empty.- Since:
- 2026.1
-