Commit 3c3fa6ad authored by Noel Alonso's avatar Noel Alonso
Browse files

Reorganiza modelo para poder hacer partial update

parent ca85ee7f
Loading
Loading
Loading
Loading
+57 −127
Original line number Diff line number Diff line
@@ -22,147 +22,77 @@ package es.redmic.atlasview.model.layer;

import java.util.List;

import org.locationtech.jts.geom.Polygon;
import org.joda.time.DateTime;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import es.redmic.elasticsearchlib.common.model.JoinIndex;
import es.redmic.models.es.administrative.model.ActivityCompact;
import es.redmic.atlasview.model.themeinspire.ThemeInspire;
import es.redmic.models.es.common.deserializer.CustomDateTimeDeserializer;
import es.redmic.models.es.common.serializer.CustomDateTimeSerializer;

public class Layer extends LayerModelCompact {
public class Layer extends LayerWMS {

	@JsonIgnore
	public static final String JOIN_INDEX_NAME = "layer";

	private JoinIndex joinIndex;

	private String title;
	private String abstractLayer;
	private List<String> keywords;
	private List<String> srs;
	private List<StyleLayer> stylesLayer;
	private Contact contact;
	private List<ActivityCompact> activities;
	private String description;
	private String alias;
	private Boolean atlas;
	private ThemeInspire themeInspire;
	private Integer refresh;
	private String urlSource;
	private Boolean queryable;
	private List<String> formats;
	private String image;
	private LatLonBoundingBox latLonBoundsImage;
	private List<Protocol> protocols;
	private Polygon geometry;
	private String legend;
	private Attribution attribution;
	private Dimension timeDimension;
	private Dimension elevationDimension;

	public Layer() {

		joinIndex = new JoinIndex();
		joinIndex.setName(JOIN_INDEX_NAME);
	}

	public JoinIndex getJoinIndex() {
		return joinIndex;
	}

	public void setJoinIndex(JoinIndex joinIndex) {
		this.joinIndex = joinIndex;
	}

	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public List<String> getKeywords() {
		return keywords;
	}

	public void setKeywords(List<String> keywords) {
		this.keywords = keywords;
	}

	public List<String> getSrs() {
		return srs;
	}

	public void setSrs(List<String> srs) {
		this.srs = srs;
	}

	public String getAbstractLayer() {
		return abstractLayer;
	}

	public void setAbstractLayer(String abstractLayer) {
		this.abstractLayer = abstractLayer;
	}
	private String image;

	public List<StyleLayer> getStylesLayer() {
		return stylesLayer;
	}
	@JsonSerialize(using = CustomDateTimeSerializer.class)
	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
	private DateTime inserted;

	public void setStylesLayer(List<StyleLayer> stylesLayer) {
		this.stylesLayer = stylesLayer;
	}
	@JsonSerialize(using = CustomDateTimeSerializer.class)
	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
	private DateTime updated;

	public Polygon getGeometry() {
		return geometry;
	}

	public void setGeometry(Polygon geometry) {
		this.geometry = geometry;
	public Layer() {
		super();
	}

	public String getLegend() {
		return legend;
	public String getDescription() {
		return description;
	}

	public void setLegend(String legend) {
		this.legend = legend;
	public void setDescription(String description) {
		this.description = description;
	}

	public Attribution getAttribution() {
		return attribution;
	public String getAlias() {
		return alias;
	}

	public void setAttribution(Attribution attribution) {
		this.attribution = attribution;
	public void setAlias(String alias) {
		this.alias = alias;
	}

	public Dimension getTimeDimension() {
		return timeDimension;
	public Boolean getAtlas() {
		return atlas;
	}

	public void setTimeDimension(Dimension timeDimension) {
		this.timeDimension = timeDimension;
	public void setAtlas(Boolean atlas) {
		this.atlas = atlas;
	}

	public Dimension getElevationDimension() {
		return elevationDimension;
	public ThemeInspire getThemeInspire() {
		return themeInspire;
	}

	public void setElevationDimension(Dimension elevationDimension) {
		this.elevationDimension = elevationDimension;
	public void setThemeInspire(ThemeInspire themeInspire) {
		this.themeInspire = themeInspire;
	}

	public List<ActivityCompact> getActivities() {
		return activities;
	public Integer getRefresh() {
		return refresh;
	}

	public void setActivities(List<ActivityCompact> activities) {
		this.activities = activities;
	public void setRefresh(Integer refresh) {
		this.refresh = refresh;
	}

	public String getUrlSource() {
@@ -173,20 +103,20 @@ public class Layer extends LayerModelCompact {
		this.urlSource = urlSource;
	}

	public Boolean getQueryable() {
		return queryable;
	public LatLonBoundingBox getLatLonBoundsImage() {
		return latLonBoundsImage;
	}

	public void setQueryable(Boolean queryable) {
		this.queryable = queryable;
	public void setLatLonBoundsImage(LatLonBoundingBox latLonBoundsImage) {
		this.latLonBoundsImage = latLonBoundsImage;
	}

	public List<String> getFormats() {
		return formats;
	public List<Protocol> getProtocols() {
		return protocols;
	}

	public void setFormats(List<String> formats) {
		this.formats = formats;
	public void setProtocols(List<Protocol> protocols) {
		this.protocols = protocols;
	}

	public String getImage() {
@@ -197,19 +127,19 @@ public class Layer extends LayerModelCompact {
		this.image = image;
	}

	public LatLonBoundingBox getLatLonBoundsImage() {
		return latLonBoundsImage;
	public DateTime getInserted() {
		return inserted;
	}

	public void setLatLonBoundsImage(LatLonBoundingBox latLonBoundsImage) {
		this.latLonBoundsImage = latLonBoundsImage;
	public void setInserted(DateTime inserted) {
		this.inserted = inserted;
	}

	public List<Protocol> getProtocols() {
		return protocols;
	public DateTime getUpdated() {
		return updated;
	}

	public void setProtocols(List<Protocol> protocols) {
		this.protocols = protocols;
	public void setUpdated(DateTime updated) {
		this.updated = updated;
	}
}
+0 −90
Original line number Diff line number Diff line
package es.redmic.atlasview.model.layer;

/*-
 * #%L
 * Atlas-query-endpoint
 * %%
 * Copyright (C) 2019 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%
 */

import es.redmic.atlasview.model.themeinspire.ThemeInspire;
import es.redmic.models.es.common.model.BaseUpdatableES;

public class LayerModelCompact extends BaseUpdatableES {

	private String name;

	private String description;

	private String alias;

	private Boolean atlas;

	private ThemeInspire themeInspire;

	private Integer refresh;

	public LayerModelCompact() {
	}

	public String getName() {
		return name;
	}

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

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public Boolean getAtlas() {
		return atlas;
	}

	public void setAtlas(Boolean atlas) {
		this.atlas = atlas;
	}

	public ThemeInspire getThemeInspire() {
		return themeInspire;
	}

	public void setThemeInspire(ThemeInspire themeInspire) {
		this.themeInspire = themeInspire;
	}

	public Integer getRefresh() {
		return refresh;
	}

	public void setRefresh(Integer refresh) {
		this.refresh = refresh;
	}
}
+188 −0
Original line number Diff line number Diff line
package es.redmic.atlasview.model.layer;

/*-
 * #%L
 * Atlas-query-endpoint
 * %%
 * Copyright (C) 2019 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%
 */

import java.util.List;

import org.locationtech.jts.geom.Polygon;

import com.fasterxml.jackson.annotation.JsonIgnore;

import es.redmic.elasticsearchlib.common.model.JoinIndex;
import es.redmic.models.es.administrative.model.ActivityCompact;
import es.redmic.models.es.common.model.BaseAbstractStringES;

public class LayerWMS extends BaseAbstractStringES {

	@JsonIgnore
	public static final String JOIN_INDEX_NAME = "layer";

	private JoinIndex joinIndex;

	private String name;
	private String title;
	private Boolean queryable;
	private String abstractLayer;
	private List<String> keywords;
	private List<String> srs;
	private List<StyleLayer> stylesLayer;
	private Contact contact;
	private List<ActivityCompact> activities;
	private List<String> formats;
	private Polygon geometry;
	private String legend;
	private Attribution attribution;
	private Dimension timeDimension;
	private Dimension elevationDimension;

	public LayerWMS() {
		joinIndex = new JoinIndex();
		joinIndex.setName(JOIN_INDEX_NAME);
	}

	public JoinIndex getJoinIndex() {
		return joinIndex;
	}

	public void setJoinIndex(JoinIndex joinIndex) {
		this.joinIndex = joinIndex;
	}

	public String getName() {
		return name;
	}

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

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Boolean getQueryable() {
		return queryable;
	}

	public void setQueryable(Boolean queryable) {
		this.queryable = queryable;
	}

	public String getAbstractLayer() {
		return abstractLayer;
	}

	public void setAbstractLayer(String abstractLayer) {
		this.abstractLayer = abstractLayer;
	}

	public List<String> getKeywords() {
		return keywords;
	}

	public void setKeywords(List<String> keywords) {
		this.keywords = keywords;
	}

	public List<String> getSrs() {
		return srs;
	}

	public void setSrs(List<String> srs) {
		this.srs = srs;
	}

	public List<StyleLayer> getStylesLayer() {
		return stylesLayer;
	}

	public void setStylesLayer(List<StyleLayer> stylesLayer) {
		this.stylesLayer = stylesLayer;
	}

	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public List<ActivityCompact> getActivities() {
		return activities;
	}

	public void setActivities(List<ActivityCompact> activities) {
		this.activities = activities;
	}

	public List<String> getFormats() {
		return formats;
	}

	public void setFormats(List<String> formats) {
		this.formats = formats;
	}

	public Polygon getGeometry() {
		return geometry;
	}

	public void setGeometry(Polygon geometry) {
		this.geometry = geometry;
	}

	public String getLegend() {
		return legend;
	}

	public void setLegend(String legend) {
		this.legend = legend;
	}

	public Attribution getAttribution() {
		return attribution;
	}

	public void setAttribution(Attribution attribution) {
		this.attribution = attribution;
	}

	public Dimension getTimeDimension() {
		return timeDimension;
	}

	public void setTimeDimension(Dimension timeDimension) {
		this.timeDimension = timeDimension;
	}

	public Dimension getElevationDimension() {
		return elevationDimension;
	}

	public void setElevationDimension(Dimension elevationDimension) {
		this.elevationDimension = elevationDimension;
	}
}