From 5387b367a38d0ee409835fce0daf62ad67600e24 Mon Sep 17 00:00:00 2001 From: Lukas Lohoff Date: Thu, 13 Oct 2022 18:31:34 +0200 Subject: [PATCH] feat: introduce downloadConfig --- .../jsonb/layer/DefaultLayerClientConfig.java | 5 ++ .../lib/model/jsonb/layer/DownloadConfig.java | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DownloadConfig.java diff --git a/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DefaultLayerClientConfig.java b/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DefaultLayerClientConfig.java index 2a646c89f..1aef2288d 100644 --- a/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DefaultLayerClientConfig.java +++ b/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DefaultLayerClientConfig.java @@ -59,6 +59,11 @@ public class DefaultLayerClientConfig implements LayerClientConfig { ) private Boolean searchable; + @Schema( + description = "List of download configurations." + ) + private ArrayList downloadConfig; + @Schema( description = "The search configuration." ) diff --git a/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DownloadConfig.java b/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DownloadConfig.java new file mode 100644 index 000000000..4a2c6510f --- /dev/null +++ b/shogun-lib/src/main/java/de/terrestris/shogun/lib/model/jsonb/layer/DownloadConfig.java @@ -0,0 +1,47 @@ +/* SHOGun, https://terrestris.github.io/shogun/ + * + * Copyright © 2022-present terrestris GmbH & Co. KG + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package de.terrestris.shogun.lib.model.jsonb.layer; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.io.Serializable; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@ToString +@EqualsAndHashCode +public class DownloadConfig implements Serializable { + + @Schema( + description = "URL which allows to download the layer data.", + example = "https://example.com/geoserver/SHOGUN/ows?service=WFS&version=1.0.0&request=GetFeature&outputFormat=application%2Fjson", + required = true + ) + private String downloadUrl; + + @Schema( + description = "The displayed format name for the given downloadUrl.", + example = "GeoJSON" + ) + private String formatName; + +} +