
eu.fispace.api.ag.WeatherScenarioRequest 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.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.XmlType;
import eu.limetri.ygg.api.RequestMessage;
import org.drmcrop.crp.PropertyVariable;
import org.drmcrop.crp.TimeFrame;
import org.drmcrop.gmlcrop.PointType;
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 an request from a farmer to an external
* system to get a weather scenario. FIspace is acting as proxy, so
* the farmer sends this request to FIspace.
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"point",
"timeFrame",
"propertyVariable"
})
@XmlRootElement(name = "WeatherScenarioRequest")
public class WeatherScenarioRequest
extends RequestMessage
implements Serializable, ToString
{
@XmlElement(name = "Point", required = true)
protected List point;
@XmlElement(name = "TimeFrame", required = true)
protected TimeFrame timeFrame;
@XmlElement(name = "PropertyVariable", required = true)
protected List propertyVariable;
/**
* Gets the value of the point 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 point property.
*
*
* For example, to add a new item, do as follows:
*
* getPoint().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PointType }
*
*
*/
public List getPoint() {
if (point == null) {
point = new ArrayList();
}
return this.point;
}
public boolean isSetPoint() {
return ((this.point!= null)&&(!this.point.isEmpty()));
}
public void unsetPoint() {
this.point = null;
}
/**
* Obtiene el valor de la propiedad timeFrame.
*
* @return
* possible object is
* {@link TimeFrame }
*
*/
public TimeFrame getTimeFrame() {
return timeFrame;
}
/**
* Define el valor de la propiedad timeFrame.
*
* @param value
* allowed object is
* {@link TimeFrame }
*
*/
public void setTimeFrame(TimeFrame value) {
this.timeFrame = value;
}
public boolean isSetTimeFrame() {
return (this.timeFrame!= null);
}
/**
* Gets the value of the propertyVariable 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 propertyVariable property.
*
*
* For example, to add a new item, do as follows:
*
* getPropertyVariable().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PropertyVariable }
*
*
*/
public List getPropertyVariable() {
if (propertyVariable == null) {
propertyVariable = new ArrayList();
}
return this.propertyVariable;
}
public boolean isSetPropertyVariable() {
return ((this.propertyVariable!= null)&&(!this.propertyVariable.isEmpty()));
}
public void unsetPropertyVariable() {
this.propertyVariable = 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);
{
List thePoint;
thePoint = (this.isSetPoint()?this.getPoint():null);
strategy.appendField(locator, this, "point", buffer, thePoint);
}
{
TimeFrame theTimeFrame;
theTimeFrame = this.getTimeFrame();
strategy.appendField(locator, this, "timeFrame", buffer, theTimeFrame);
}
{
List thePropertyVariable;
thePropertyVariable = (this.isSetPropertyVariable()?this.getPropertyVariable():null);
strategy.appendField(locator, this, "propertyVariable", buffer, thePropertyVariable);
}
return buffer;
}
public WeatherScenarioRequest withPoint(PointType... values) {
if (values!= null) {
for (PointType value: values) {
getPoint().add(value);
}
}
return this;
}
public WeatherScenarioRequest withPoint(Collection values) {
if (values!= null) {
getPoint().addAll(values);
}
return this;
}
public WeatherScenarioRequest withTimeFrame(TimeFrame value) {
setTimeFrame(value);
return this;
}
public WeatherScenarioRequest withPropertyVariable(PropertyVariable... values) {
if (values!= null) {
for (PropertyVariable value: values) {
getPropertyVariable().add(value);
}
}
return this;
}
public WeatherScenarioRequest withPropertyVariable(Collection values) {
if (values!= null) {
getPropertyVariable().addAll(values);
}
return this;
}
}