Commit 41115174 authored by Noel Alonso's avatar Noel Alonso
Browse files

Elimina referencias a atlas

parent 781d33f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
	<groupId>es.redmic.lib</groupId>
	<artifactId>models</artifactId>
	<packaging>jar</packaging>
	<version>0.10.0</version>
	<version>0.10.0-feature-cleanAtlasComponents</version>
	<name>Models</name>
	<description>Input-output classes and models</description>

+0 −161
Original line number Diff line number Diff line
package es.redmic.models.es.atlas;

/*-
 * #%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.opengis.metadata.citation.Address;
import org.opengis.metadata.citation.ResponsibleParty;
import org.opengis.metadata.citation.Telephone;

import com.fasterxml.jackson.annotation.JsonSetter;

public class Contact {

	private String name;
	private String email;
	private String phone;
	private String fax;
	private String address;
	private String organization;
	private String contactPosition;

	public Contact() {
	}

	public Contact(ResponsibleParty contactInfo) {

		setName(contactInfo.getIndividualName());

		if (contactInfo.getOrganisationName() != null)
			setOrganization(contactInfo.getOrganisationName().toString());

		if (contactInfo.getContactInfo() != null) {
			setPhone(contactInfo.getContactInfo().getPhone());
			setFax(contactInfo.getContactInfo().getPhone());
			setEmail(contactInfo.getContactInfo().getAddress());
			setAddress(contactInfo.getContactInfo().getAddress());
		}

		if (contactInfo.getPositionName() != null)
			setContactPosition(contactInfo.getPositionName().toString());
	}

	public String getName() {
		return name;
	}

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

	public String getEmail() {
		return email;
	}

	@JsonSetter("email")
	public void setEmail(String email) {
		this.email = email;
	}

	public void setEmail(Address address) {
		if (address != null && !address.getElectronicMailAddresses().isEmpty())
			this.email = address.getElectronicMailAddresses().toArray()[0].toString();
	}

	public String getOrganization() {
		return organization;
	}

	public void setOrganization(String organization) {
		this.organization = organization;
	}

	public String getAddress() {
		return address;
	}

	@JsonSetter("address")
	public void setAddress(String address) {
		this.address = address;
	}

	public void setAddress(Address address) {
		if (address != null) {
			String addressAux = null;
			if (!address.getDeliveryPoints().isEmpty())
				addressAux = address.getDeliveryPoints().toArray()[0].toString() + " ";

			if (address.getCity() != null)
				addressAux += address.getCity() + " ";

			if (address.getPostalCode() != null)
				addressAux += address.getPostalCode() + " ";

			if (address.getCountry() != null)
				addressAux += address.getCountry() + " ";

			if (addressAux != null)
				this.address = addressAux;
		}
	}

	public String getPhone() {
		return phone;
	}

	@JsonSetter("phone")
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setPhone(Telephone phone) {
		if (phone != null && !phone.getVoices().isEmpty())
			this.phone = phone.getVoices().toArray()[0].toString();
	}

	public String getFax() {
		return fax;
	}

	@JsonSetter("fax")
	public void setFax(String fax) {
		this.fax = fax;
	}

	public void setFax(Telephone fax) {
		if (phone != null && !fax.getFacsimiles().isEmpty())
			this.fax = fax.getFacsimiles().toArray()[0].toString();
	}

	public String getContactPosition() {
		return contactPosition;
	}

	public void setContactPosition(String contactPosition) {
		this.contactPosition = contactPosition;
	}

	public String toString() {

		return "Name: " + getName() + "\nEmail: " + getEmail() + "\nOrganization: " + getOrganization() + "\nPhone: "
				+ getPhone() + "\nFax: " + getFax() + "\nAddress: " + getAddress() + "\nContact position: "
				+ getContactPosition();
	}
}
+0 −91
Original line number Diff line number Diff line
package es.redmic.models.es.atlas;

/*-
 * #%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.constraints.NotNull;

import org.geotools.data.ows.CRSEnvelope;

public class LatLonBoundingBox {

	@NotNull
	private Double minX;
	@NotNull
	private Double minY;
	@NotNull
	private Double maxX;
	@NotNull
	private Double maxY;

	public LatLonBoundingBox() {
	}

	public LatLonBoundingBox(CRSEnvelope latLonBoundingBox) {

		setMinX(latLonBoundingBox.getMinX());
		setMinY(latLonBoundingBox.getMinY());
		setMaxX(latLonBoundingBox.getMaxX());
		setMaxY(latLonBoundingBox.getMaxY());
	}

	public Double getMinX() {
		return minX;
	}

	public void setMinX(Double minX) {
		this.minX = minX;
	}

	public Double getMinY() {
		return minY;
	}

	public void setMinY(Double minY) {
		this.minY = minY;
	}

	public Double getMaxX() {
		return maxX;
	}

	public void setMaxX(Double maxX) {
		this.maxX = maxX;
	}

	public Double getMaxY() {
		return maxY;
	}

	public void setMaxY(Double maxY) {
		this.maxY = maxY;
	}

	@Override
	public boolean equals(Object obj) {

		if (!(obj instanceof LatLonBoundingBox))
			return false;

		LatLonBoundingBox b = getClass().cast(obj);
		return this.minX.equals(b.getMinX()) && this.minY.equals(b.getMinY()) && this.maxX.equals(b.getMaxX())
				&& this.maxY.equals(b.getMaxY());
	}
}
+0 −106
Original line number Diff line number Diff line
package es.redmic.models.es.atlas;

/*-
 * #%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.geotools.data.ows.StyleImpl;
import org.opengis.util.InternationalString;

import com.fasterxml.jackson.annotation.JsonSetter;

public class StyleLayer {

	private String name;
	private String title;
	private String abstractStyle;
	private String format;
	private String url;

	public StyleLayer() {
	}

	public StyleLayer(StyleImpl style) {
		setName(style.getName());
		setTitle(style.getAbstract());
		setabstractStyle(style.getAbstract());
		if (style.getLegendURLs() != null && style.getLegendURLs().size() > 0)
			setUrl(style.getLegendURLs().get(0).toString());

		if (getUrl() != null)
			setFormat(getUrl().replaceAll(".*&format=(\\w*)%2F(\\w*)&.*", "$1/$2"));
	}

	public String getName() {
		return name;
	}

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

	public String getTitle() {
		return title;
	}

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

	public void setTitle(InternationalString title) {
		if (title != null)
			this.title = title.toString();
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getabstractStyle() {
		return abstractStyle;
	}

	@JsonSetter("abstractStyle")
	public void setabstractStyle(String abstractStyle) {
		this.abstractStyle = abstractStyle;
	}

	public void setabstractStyle(InternationalString abstractStyle) {
		if (abstractStyle != null)
			this.abstractStyle = abstractStyle.toString();
	}

	public String toString() {
		return "Name: " + getName() + ", Title: " + getTitle() + ", Abstract: " + getabstractStyle() + ", URL: "
				+ getUrl();
	}
}
+0 −49
Original line number Diff line number Diff line
package es.redmic.models.es.atlas.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%
 */

public class HierarchyLayerRelationDTO {

	private Long id;

	private Long parentId;
	
	public HierarchyLayerRelationDTO() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	
	
}
Loading