
eu.fispace.api.ag.WeatherScenarioSimpleResponse Maven / Gradle / Ivy
//
// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.7
// Visite http://java.sun.com/xml/jaxb
// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen.
// Generado el: 2016.06.30 a las 10:15:50 PM CEST
//
package eu.fispace.api.ag;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.List;
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 javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import eu.limetri.ygg.api.ResponseMessage;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
/**
*
* This class represents a set of weather scenarios for a given list
* of locations and a time interval. A scenario contains historical
* weather up to actual time and predicted weather after actual time.
* It is possible to use climatological data after the predictable
* period.
*
* This is a short term solution which does use XML elements as
* weather variables that are defined in the core. This should
* be replaced by WeatherScenarioRequest, which uses drmCrop
* based constructs with a coding table foe weather variables.
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"latitude",
"longitude",
"startTime",
"endTime",
"weatherVariable",
"blockSeparator",
"decimalSeparator",
"tokenSeparator",
"values"
})
@XmlRootElement(name = "WeatherScenarioSimpleResponse")
public class WeatherScenarioSimpleResponse
extends ResponseMessage
implements Serializable, ToString
{
protected double latitude;
protected double longitude;
@XmlElement(required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
@XmlSchemaType(name = "dateTime")
protected Calendar startTime;
@XmlElement(required = true, type = String.class)
@XmlJavaTypeAdapter(Adapter1 .class)
@XmlSchemaType(name = "dateTime")
protected Calendar endTime;
@XmlElement(required = true)
protected List weatherVariable;
@XmlElement(required = true)
protected String blockSeparator;
@XmlElement(required = true)
protected String decimalSeparator;
@XmlElement(required = true)
protected String tokenSeparator;
@XmlElement(required = true)
protected String values;
/**
* Obtiene el valor de la propiedad latitude.
*
*/
public double getLatitude() {
return latitude;
}
/**
* Define el valor de la propiedad latitude.
*
*/
public void setLatitude(double value) {
this.latitude = value;
}
public boolean isSetLatitude() {
return true;
}
/**
* Obtiene el valor de la propiedad longitude.
*
*/
public double getLongitude() {
return longitude;
}
/**
* Define el valor de la propiedad longitude.
*
*/
public void setLongitude(double value) {
this.longitude = value;
}
public boolean isSetLongitude() {
return true;
}
/**
* Obtiene el valor de la propiedad startTime.
*
* @return
* possible object is
* {@link String }
*
*/
public Calendar getStartTime() {
return startTime;
}
/**
* Define el valor de la propiedad startTime.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStartTime(Calendar value) {
this.startTime = value;
}
public boolean isSetStartTime() {
return (this.startTime!= null);
}
/**
* Obtiene el valor de la propiedad endTime.
*
* @return
* possible object is
* {@link String }
*
*/
public Calendar getEndTime() {
return endTime;
}
/**
* Define el valor de la propiedad endTime.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEndTime(Calendar value) {
this.endTime = value;
}
public boolean isSetEndTime() {
return (this.endTime!= null);
}
/**
* Gets the value of the weatherVariable property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the weatherVariable property.
*
*
* For example, to add a new item, do as follows:
*
* getWeatherVariable().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List getWeatherVariable() {
if (weatherVariable == null) {
weatherVariable = new ArrayList();
}
return this.weatherVariable;
}
public boolean isSetWeatherVariable() {
return ((this.weatherVariable!= null)&&(!this.weatherVariable.isEmpty()));
}
public void unsetWeatherVariable() {
this.weatherVariable = null;
}
/**
* Obtiene el valor de la propiedad blockSeparator.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBlockSeparator() {
return blockSeparator;
}
/**
* Define el valor de la propiedad blockSeparator.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBlockSeparator(String value) {
this.blockSeparator = value;
}
public boolean isSetBlockSeparator() {
return (this.blockSeparator!= null);
}
/**
* Obtiene el valor de la propiedad decimalSeparator.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDecimalSeparator() {
return decimalSeparator;
}
/**
* Define el valor de la propiedad decimalSeparator.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDecimalSeparator(String value) {
this.decimalSeparator = value;
}
public boolean isSetDecimalSeparator() {
return (this.decimalSeparator!= null);
}
/**
* Obtiene el valor de la propiedad tokenSeparator.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTokenSeparator() {
return tokenSeparator;
}
/**
* Define el valor de la propiedad tokenSeparator.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTokenSeparator(String value) {
this.tokenSeparator = value;
}
public boolean isSetTokenSeparator() {
return (this.tokenSeparator!= null);
}
/**
* Obtiene el valor de la propiedad values.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValues() {
return values;
}
/**
* Define el valor de la propiedad values.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValues(String value) {
this.values = value;
}
public boolean isSetValues() {
return (this.values!= null);
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
super.appendFields(locator, buffer, strategy);
{
double theLatitude;
theLatitude = (this.isSetLatitude()?this.getLatitude(): 0.0D);
strategy.appendField(locator, this, "latitude", buffer, theLatitude);
}
{
double theLongitude;
theLongitude = (this.isSetLongitude()?this.getLongitude(): 0.0D);
strategy.appendField(locator, this, "longitude", buffer, theLongitude);
}
{
Calendar theStartTime;
theStartTime = this.getStartTime();
strategy.appendField(locator, this, "startTime", buffer, theStartTime);
}
{
Calendar theEndTime;
theEndTime = this.getEndTime();
strategy.appendField(locator, this, "endTime", buffer, theEndTime);
}
{
List theWeatherVariable;
theWeatherVariable = (this.isSetWeatherVariable()?this.getWeatherVariable():null);
strategy.appendField(locator, this, "weatherVariable", buffer, theWeatherVariable);
}
{
String theBlockSeparator;
theBlockSeparator = this.getBlockSeparator();
strategy.appendField(locator, this, "blockSeparator", buffer, theBlockSeparator);
}
{
String theDecimalSeparator;
theDecimalSeparator = this.getDecimalSeparator();
strategy.appendField(locator, this, "decimalSeparator", buffer, theDecimalSeparator);
}
{
String theTokenSeparator;
theTokenSeparator = this.getTokenSeparator();
strategy.appendField(locator, this, "tokenSeparator", buffer, theTokenSeparator);
}
{
String theValues;
theValues = this.getValues();
strategy.appendField(locator, this, "values", buffer, theValues);
}
return buffer;
}
public WeatherScenarioSimpleResponse withLatitude(double value) {
setLatitude(value);
return this;
}
public WeatherScenarioSimpleResponse withLongitude(double value) {
setLongitude(value);
return this;
}
public WeatherScenarioSimpleResponse withStartTime(Calendar value) {
setStartTime(value);
return this;
}
public WeatherScenarioSimpleResponse withEndTime(Calendar value) {
setEndTime(value);
return this;
}
public WeatherScenarioSimpleResponse withWeatherVariable(String... values) {
if (values!= null) {
for (String value: values) {
getWeatherVariable().add(value);
}
}
return this;
}
public WeatherScenarioSimpleResponse withWeatherVariable(Collection values) {
if (values!= null) {
getWeatherVariable().addAll(values);
}
return this;
}
public WeatherScenarioSimpleResponse withBlockSeparator(String value) {
setBlockSeparator(value);
return this;
}
public WeatherScenarioSimpleResponse withDecimalSeparator(String value) {
setDecimalSeparator(value);
return this;
}
public WeatherScenarioSimpleResponse withTokenSeparator(String value) {
setTokenSeparator(value);
return this;
}
public WeatherScenarioSimpleResponse withValues(String value) {
setValues(value);
return this;
}
}