Commit 2fb1ecf1 authored by Noel Alonso's avatar Noel Alonso
Browse files

Elimina modelos y dto del servicio topónimos

Actualmente no se está usando este servicio propio
parent 52eac3de
Loading
Loading
Loading
Loading
+0 −60
Original line number Diff line number Diff line
package es.redmic.models.es.geojson.toponym.dto;

/*-
 * #%L
 * Models
 * %%
 * 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 com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaIgnore;
import org.locationtech.jts.geom.Point;

import es.redmic.models.es.common.DataPrefixType;
import es.redmic.models.es.geojson.GeoJSONFeatureType;
import es.redmic.models.es.geojson.common.dto.MetaDataFeatureDTO;
import es.redmic.models.es.geojson.common.dto.MetaFeatureDTO;

@JsonIgnoreProperties(value = { "uuid" })
public class ToponymDTO extends MetaFeatureDTO<ToponymPropertiesDTO, Point> {

	public ToponymDTO() {
		super();
		this._meta = new MetaDataFeatureDTO();
		this.setType(GeoJSONFeatureType.FEATURE);
		this.get_meta().setCategory(DataPrefixType.TOPONYM);
	}

	@JsonSchemaIgnore
	private MetaDataFeatureDTO _meta;

	public MetaDataFeatureDTO get_meta() {
		return _meta;
	}

	public void set_meta(MetaDataFeatureDTO _meta) {
		this._meta = _meta;
	}

	public void setProperties(ToponymPropertiesDTO properties) {
		super.setProperties(properties);
	}

	public ToponymPropertiesDTO getProperties() {
		return super.getProperties();
	}
}
+0 −88
Original line number Diff line number Diff line
package es.redmic.models.es.geojson.toponym.dto;

/*-
 * #%L
 * Models
 * %%
 * 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 javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaDefault;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaNotNull;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaUrl;

import es.redmic.models.es.common.deserializer.CustomRelationDeserializer;
import es.redmic.models.es.geojson.common.dto.PropertiesDTO;
import es.redmic.models.es.maintenance.toponym.dto.ToponymTypeDTO;

@JsonSchemaNotNull
@JsonIgnoreProperties(value = { "activityId" })
public class ToponymPropertiesDTO extends PropertiesDTO {

	@NotNull
	@Size(min = 1, max = 250)
	private String name;

	@Size(min = 0, max = 1500)
	private String description;

	private Integer zoomLevel;

	@JsonIgnoreProperties(value = { "_meta" })
	@Valid
	@JsonDeserialize(using = CustomRelationDeserializer.class)
	@JsonSchemaUrl(value = "controller.mapping.TOPONYM_TYPE")
	@JsonSchemaDefault(value = "1")
	private ToponymTypeDTO toponymType;

	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 Integer getZoomLevel() {
		return zoomLevel;
	}

	public void setZoomLevel(Integer zoomLevel) {
		this.zoomLevel = zoomLevel;
	}

	public ToponymTypeDTO getToponymType() {
		return toponymType;
	}

	public void setToponymType(ToponymTypeDTO toponymType) {
		this.toponymType = toponymType;
	}
}
+0 −35
Original line number Diff line number Diff line
package es.redmic.models.es.geojson.toponym.model;

/*-
 * #%L
 * Models
 * %%
 * 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 org.locationtech.jts.geom.Point;

import es.redmic.models.es.geojson.GeoJSONFeatureType;
import es.redmic.models.es.geojson.common.model.Feature;

public class Toponym extends Feature<ToponymProperties, Point> {

	public Toponym() {
		super();
		this.setType(GeoJSONFeatureType.FEATURE);
	}
}
+0 −97
Original line number Diff line number Diff line
package es.redmic.models.es.geojson.toponym.model;

/*-
 * #%L
 * Models
 * %%
 * 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 org.joda.time.DateTime;

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

import es.redmic.models.es.common.deserializer.CustomDateTimeDeserializer;
import es.redmic.models.es.common.model.DomainES;
import es.redmic.models.es.common.serializer.CustomDateTimeSerializer;
import es.redmic.models.es.geojson.common.model.Properties;

public class ToponymProperties extends Properties {

	private DateTime inserted;
	private DateTime updated;
	
	private String name;
	
	private String description;
	
	private Integer zoomLevel;

	private DomainES toponymType;
	
	@JsonSerialize(using = CustomDateTimeSerializer.class)
	public DateTime getInserted() {
		return inserted;
	}

	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
	public void setInserted(DateTime inserted) {
		this.inserted = inserted;
	}

	@JsonSerialize(using = CustomDateTimeSerializer.class)
	public DateTime getUpdated() {
		return updated;
	}

	@JsonDeserialize(using = CustomDateTimeDeserializer.class)
	public void setUpdated(DateTime updated) {
		this.updated = updated;
	}

	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 Integer getZoomLevel() {
		return zoomLevel;
	}

	public void setZoomLevel(Integer zoomLevel) {
		this.zoomLevel = zoomLevel;
	}

	public DomainES getToponymType() {
		return toponymType;
	}

	public void setToponymType(DomainES toponymType) {
		this.toponymType = toponymType;
	}
}