/*
* Geotoolkit - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2012, 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.observation.xml.v200;
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.XmlType;
import org.geotoolkit.gml.xml.v321.ReferenceType;
/**
* The class 'NamedValue' provides for a generic soft-typed parameter
* value. NamedValue shall support two attributes.
*
* <p>Java class for NamedValueType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="NamedValueType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.opengis.net/gml/3.2}ReferenceType"/>
* <element name="value" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NamedValueType", propOrder = {
"name",
"value"
})
public class NamedValueType {
@XmlElement(required = true)
private ReferenceType name;
@XmlElement(required = true)
private Object value;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link ReferenceType }
*
*/
public ReferenceType getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link ReferenceType }
*
*/
public void setName(ReferenceType value) {
this.name = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link Object }
*
*/
public Object getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link Object }
*
*/
public void setValue(Object value) {
this.value = value;
}
@Override
public boolean equals(final Object object) {
if (object == this) {
return true;
}
if (object instanceof NamedValueType) {
final NamedValueType that = (NamedValueType) object;
return Objects.equals(this.name, that.name) &&
Objects.equals(this.value, that.value);
}
return false;
}
@Override
public int hashCode() {
int hash = 5;
hash = 47 * hash + (this.name != null ? this.name.hashCode() : 0);
hash = 47 * hash + (this.value != null ? this.value.hashCode() : 0);
return hash;
}
}