/* * Constellation - An open source and standard compliant SDI * http://www.constellation-sdi.org * * Copyright 2014 Geomatys. * * 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. */ package org.constellation.configuration; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @author Bernard Fabien (Geomatys) * @version 0.9 * @since 0.9 */ @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public final class StyleBrief implements Serializable { @XmlElement(name="Id") private Integer id; @XmlElement(name="Name") private String name; @XmlElement(name="Provider") private String provider; @XmlElement(name="Title") private String title; @XmlElement(name="Date") private Date date; @XmlElement(name="Type") private String type; @XmlElement(name="Owner") private String owner; @XmlElement(name="dataList") private List<DataBrief> dataList; private List<LayerSummary> layersList; public Integer getId() { return id; } public void setId(final Integer id) { this.id = id; } public String getName() { return name; } public void setName(final String name) { this.name = name; } public String getProvider() { return provider; } public void setProvider(final String provider) { this.provider = provider; } public String getTitle() { return title; } public void setTitle(final String title) { this.title = title; } public Date getDate() { return date; } public void setDate(final Date date) { this.date = date; } public String getType() { return type; } public void setType(final String type) { this.type = type; } public String getOwner() { return owner; } public void setOwner(final String owner) { this.owner = owner; } public List<DataBrief> getDataList() { return dataList; } public void setDataList(List<DataBrief> dataList) { this.dataList = dataList; } public List<LayerSummary> getLayersList() { return layersList; } public void setLayersList(List<LayerSummary> layersList) { this.layersList = layersList; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StyleBrief that = (StyleBrief) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (date != null ? !date.equals(that.date) : that.date != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (owner != null ? !owner.equals(that.owner) : that.owner != null) return false; if (provider != null ? !provider.equals(that.provider) : that.provider != null) return false; if (title != null ? !title.equals(that.title) : that.title != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; return true; } @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (provider != null ? provider.hashCode() : 0); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (owner != null ? owner.hashCode() : 0); return result; } @Override public String toString() { return "StyleBrief{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", provider='" + provider + '\'' + ", title='" + title + '\'' + ", date=" + date + ", type='" + type + '\'' + ", owner='" + owner + '\'' + '}'; } }