/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2009, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.ows.xml.v110; import java.util.ArrayList; import java.util.List; import java.util.Objects; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * Basic metadata identifying and describing a set of data. * * <p>Java class for BasicIdentificationType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="BasicIdentificationType"> * <complexContent> * <extension base="{http://www.opengis.net/ows/1.1}DescriptionType"> * <sequence> * <element ref="{http://www.opengis.net/ows/1.1}Identifier" minOccurs="0"/> * <element ref="{http://www.opengis.net/ows/1.1}Metadata" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </extension> * </complexContent> * </complexType> * </pre> * * * @module */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BasicIdentificationType", propOrder = { "identifier", "metadata" }) @XmlSeeAlso({ ReferenceGroupType.class, ManifestType.class, IdentificationType.class }) public class BasicIdentificationType extends DescriptionType { @XmlElement(name = "Identifier") private CodeType identifier; @XmlElement(name = "Metadata") private List<MetadataType> metadata; /** * Optional unique identifier or name of this dataset. */ public CodeType getIdentifier() { return identifier; } /** * Sets the value of the identifier property. */ public void setIdentifier(final CodeType value) { this.identifier = value; } /** * Optional unordered list of additional metadata about this data(set). A list of optional metadata elements for this data identification could be specified in the Implementation Specification for this service. Gets the value of the metadata property. */ public List<MetadataType> getMetadata() { if (metadata == null) { metadata = new ArrayList<MetadataType>(); } return this.metadata; } /** * Verify that this entry is identical to the specified object. */ @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof BasicIdentificationType && super.equals(object)) { final BasicIdentificationType that = (BasicIdentificationType) object; return Objects.equals(this.identifier, that.identifier) && Objects.equals(this.metadata, that.metadata); } return false; } @Override public int hashCode() { int hash = 5; hash = 79 * hash + (this.identifier != null ? this.identifier.hashCode() : 0); hash = 79 * hash + (this.metadata != null ? this.metadata.hashCode() : 0); return hash; } }