/*
* 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 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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.geotoolkit.gml.xml.EnvelopeWithTimePeriod;
/**
* <p>Java class for EnvelopeWithTimePeriodType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="EnvelopeWithTimePeriodType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}EnvelopeType">
* <sequence>
* <element name="beginPosition" type="{http://www.opengis.net/gml/3.2}TimePositionType"/>
* <element name="endPosition" type="{http://www.opengis.net/gml/3.2}TimePositionType"/>
* </sequence>
* <attribute name="frame" type="{http://www.w3.org/2001/XMLSchema}anyURI" default="#ISO-8601" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EnvelopeWithTimePeriodType", propOrder = {
"beginPosition",
"endPosition"
})
public class EnvelopeWithTimePeriodType extends EnvelopeType implements EnvelopeWithTimePeriod {
@XmlElement(required = true)
private TimePositionType beginPosition;
@XmlElement(required = true)
private TimePositionType endPosition;
@XmlAttribute
@XmlSchemaType(name = "anyURI")
private String frame;
public EnvelopeWithTimePeriodType() {
}
public EnvelopeWithTimePeriodType(final EnvelopeWithTimePeriod that) {
super(that);
if (that != null) {
if (that.getBeginPosition() != null) {
this.beginPosition = new TimePositionType(that.getBeginPosition().getDate());
}
if (that.getEndPosition() != null) {
this.endPosition = new TimePositionType(that.getEndPosition().getDate());
}
this.frame = that.getFrame();
}
}
/**
* Gets the value of the beginPosition property.
*
* @return
* possible object is
* {@link TimePositionType }
*
*/
@Override
public TimePositionType getBeginPosition() {
return beginPosition;
}
/**
* Sets the value of the beginPosition property.
*
* @param value
* allowed object is
* {@link TimePositionType }
*
*/
public void setBeginPosition(TimePositionType value) {
this.beginPosition = value;
}
/**
* Gets the value of the endPosition property.
*
* @return
* possible object is
* {@link TimePositionType }
*
*/
@Override
public TimePositionType getEndPosition() {
return endPosition;
}
/**
* Sets the value of the endPosition property.
*
* @param value
* allowed object is
* {@link TimePositionType }
*
*/
public void setEndPosition(TimePositionType value) {
this.endPosition = value;
}
/**
* Gets the value of the frame property.
*
* @return
* possible object is
* {@link String }
*
*/
@Override
public String getFrame() {
if (frame == null) {
return "#ISO-8601";
} else {
return frame;
}
}
/**
* Sets the value of the frame property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFrame(String value) {
this.frame = value;
}
}