/*
* Geotoolkit - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2008 - 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.gml.xml.v321;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.sis.util.ComparisonMode;
import org.geotoolkit.gml.xml.Ring;
/**
* <p>Java class for RingType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="RingType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}AbstractRingType">
* <sequence>
* <element ref="{http://www.opengis.net/gml/3.2}curveMember" maxOccurs="unbounded"/>
* </sequence>
* <attGroup ref="{http://www.opengis.net/gml/3.2}AggregationAttributeGroup"/>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RingType", propOrder = {
"curveMember"
})
public class RingType extends AbstractRingType implements Ring {
@XmlElement(required = true)
private List<CurvePropertyType> curveMember;
@XmlAttribute
private AggregationType aggregationType;
/**
* Gets the value of the curveMember property.
*
* {@link CurvePropertyType }
*/
@Override
public List<CurvePropertyType> getCurveMember() {
if (curveMember == null) {
curveMember = new ArrayList<>();
}
return this.curveMember;
}
public void setCurveMember(final List<CurvePropertyType> curveMember) {
this.curveMember = curveMember;
}
public void setCurveMember(final CurvePropertyType curveMember) {
if (this.curveMember == null) {
this.curveMember = new ArrayList<>();
}
this.curveMember.add(curveMember);
}
/**
* Gets the value of the aggregationType property.
*
* @return
* possible object is
* {@link AggregationType }
*
*/
public AggregationType getAggregationType() {
return aggregationType;
}
/**
* Sets the value of the aggregationType property.
*
* @param value
* allowed object is
* {@link AggregationType }
*
*/
public void setAggregationType(AggregationType value) {
this.aggregationType = value;
}
/**
* Verify if this entry is identical to the specified object.
*/
@Override
public boolean equals(final Object object, final ComparisonMode mode) {
if (object == this) {
return true;
}
if (object instanceof RingType && super.equals(object, mode)) {
final RingType that = (RingType) object;
return Objects.equals(this.curveMember, that.curveMember);
}
return false;
}
@Override
public int hashCode() {
int hash = 7;
hash = 79 * hash + (this.curveMember != null ? this.curveMember.hashCode() : 0);
return hash;
}
}