Commit 44b1279b authored by Noel Alonso's avatar Noel Alonso
Browse files

Adapta modelo y tests para nuevos campos

parent a3f34e89
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
package es.redmic.atlasview.model.layer;

/*-
 * #%L
 * Atlas-query-endpoint
 * %%
 * Copyright (C) 2019 - 2021 REDMIC Project / Server
 * %%
 * 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
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * 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.
 * #L%
 */

public class Download {

	private String name;

	private String url;

	public Download() {
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
+29 −2
Original line number Diff line number Diff line
@@ -41,7 +41,10 @@ public class Layer extends LayerWMS {
	private String urlSource;
	private LatLonBoundingBox latLonBoundsImage;
	private List<Protocol> protocols;
	private List<Download> downloads;
	private TimeDefinition timeDefinition;
	private String image;
	private String styles;

	@JsonSerialize(using = CustomDateTimeSerializer.class)
	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
@@ -119,6 +122,22 @@ public class Layer extends LayerWMS {
		this.protocols = protocols;
	}

	public List<Download> getDownloads() {
		return this.downloads;
	}

	public void setDownloads(List<Download> downloads) {
		this.downloads = downloads;
	}

	public TimeDefinition getTimeDefinition() {
		return this.timeDefinition;
	}

	public void setTimeDefinition(TimeDefinition timeDefinition) {
		this.timeDefinition = timeDefinition;
	}

	public String getImage() {
		return image;
	}
@@ -127,6 +146,14 @@ public class Layer extends LayerWMS {
		this.image = image;
	}

	public String getStyles() {
		return this.styles;
	}

	public void setStyles(String styles) {
		this.styles = styles;
	}

	public DateTime getInserted() {
		return inserted;
	}
+0 −20
Original line number Diff line number Diff line
@@ -26,10 +26,6 @@ public class Protocol {

	private String url;

	private String style;

	private String version;

	public Protocol() {
	}

@@ -48,20 +44,4 @@ public class Protocol {
	public void setUrl(String url) {
		this.url = url;
	}

	public String getStyle() {
		return this.style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
}
+61 −0
Original line number Diff line number Diff line
package es.redmic.atlasview.model.layer;

import javax.validation.constraints.NotNull;

/*-
 * #%L
 * Atlas-query-endpoint
 * %%
 * Copyright (C) 2019 - 2021 REDMIC Project / Server
 * %%
 * 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
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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.
 * #L%
 */

public class TimeDefinition {

	public TimeDefinition() {

	}

	@NotNull
	private String startDate;

	private String endDate;

	private String interval;

	public String getStartDate() {
		return this.startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return this.endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getInterval() {
		return this.interval;
	}

	public void setInterval(String interval) {
		this.interval = interval;
	}
}
+13 −3
Original line number Diff line number Diff line
@@ -95,11 +95,20 @@
	"protocols": [
		{
			"type": "WMS",
			"url": "https://atlas.redmic.es/geoserver/sd/wms",
			"style": "el:batimetria50mCanarias",
			"version": "1.1.1"
			"url": "https://atlas.redmic.es/geoserver/sd/wms"
		}
	],
	"downloads": [
		{
			"name": "geoserver",
			"url": "https://atlas.redmic.es/geoserver/sd/wms"
		}
	],
	"timeDefinition": {
		"startDate": "2017-05-23T12:35:12.052+00:00",
		"endDate": "2019-05-23T12:35:12.052+00:00",
		"interval": "1h"
	},
	"geometry": {
		"type": "Polygon",
		"coordinates": [
@@ -136,6 +145,7 @@
		"id": "category-333",
		"name": "pepe"
	},
	"styles": "el:batimetria50mCanarias",
	"updated": "2017-05-23T12:35:12.052+00:00",
	"inserted": "2017-05-23T12:35:12.052+00:00"
}
Loading