All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmg.pmml.TimeSeries Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version

package org.dmg.pmml;

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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import com.sun.xml.bind.Locatable;
import com.sun.xml.bind.annotation.XmlLocation;
import org.jpmml.schema.Added;
import org.jpmml.schema.Removed;
import org.jpmml.schema.Version;
import org.xml.sax.Locator;


/**
 * 

Java class for anonymous complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://www.dmg.org/PMML-4_2}TimeAnchor" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}TimeException" maxOccurs="2" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}TimeValue" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="usage" type="{http://www.dmg.org/PMML-4_2}TIMESERIES-USAGE" default="original" />
 *       <attribute name="startTime" type="{http://www.dmg.org/PMML-4_2}REAL-NUMBER" />
 *       <attribute name="endTime" type="{http://www.dmg.org/PMML-4_2}REAL-NUMBER" />
 *       <attribute name="interpolationMethod" type="{http://www.dmg.org/PMML-4_2}INTERPOLATION-METHOD" default="none" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "timeAnchor", "timeExceptions", "timeValues" }) @XmlRootElement(name = "TimeSeries") @Added(Version.PMML_4_0) public class TimeSeries extends PMMLObject implements Locatable { @XmlElement(name = "TimeAnchor") protected TimeAnchor timeAnchor; @XmlElement(name = "TimeException") @Removed(Version.PMML_4_1) protected List timeExceptions; @XmlElement(name = "TimeValue") protected List timeValues; @XmlAttribute(name = "usage") protected TimeSeriesUsageType usage; @XmlAttribute(name = "startTime") protected Double startTime; @XmlAttribute(name = "endTime") protected Double endTime; @XmlAttribute(name = "interpolationMethod") protected InterpolationMethodType interpolationMethod; @XmlLocation @XmlTransient protected Locator locator; /** * Gets the value of the timeAnchor property. * * @return * possible object is * {@link TimeAnchor } * */ public TimeAnchor getTimeAnchor() { return timeAnchor; } /** * Sets the value of the timeAnchor property. * * @param value * allowed object is * {@link TimeAnchor } * */ public void setTimeAnchor(TimeAnchor value) { this.timeAnchor = value; } /** * Gets the value of the timeExceptions 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 timeExceptions property. * *

* For example, to add a new item, do as follows: *

     *    getTimeExceptions().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link TimeException } * * */ public List getTimeExceptions() { if (timeExceptions == null) { timeExceptions = new ArrayList(); } return this.timeExceptions; } /** * Gets the value of the timeValues 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 timeValues property. * *

* For example, to add a new item, do as follows: *

     *    getTimeValues().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link TimeValue } * * */ public List getTimeValues() { if (timeValues == null) { timeValues = new ArrayList(); } return this.timeValues; } /** * Gets the value of the usage property. * * @return * possible object is * {@link TimeSeriesUsageType } * */ public TimeSeriesUsageType getUsage() { if (usage == null) { return TimeSeriesUsageType.ORIGINAL; } else { return usage; } } /** * Sets the value of the usage property. * * @param value * allowed object is * {@link TimeSeriesUsageType } * */ public void setUsage(TimeSeriesUsageType value) { this.usage = value; } /** * Gets the value of the startTime property. * * @return * possible object is * {@link Double } * */ public Double getStartTime() { return startTime; } /** * Sets the value of the startTime property. * * @param value * allowed object is * {@link Double } * */ public void setStartTime(Double value) { this.startTime = value; } /** * Gets the value of the endTime property. * * @return * possible object is * {@link Double } * */ public Double getEndTime() { return endTime; } /** * Sets the value of the endTime property. * * @param value * allowed object is * {@link Double } * */ public void setEndTime(Double value) { this.endTime = value; } /** * Gets the value of the interpolationMethod property. * * @return * possible object is * {@link InterpolationMethodType } * */ public InterpolationMethodType getInterpolationMethod() { if (interpolationMethod == null) { return InterpolationMethodType.NONE; } else { return interpolationMethod; } } /** * Sets the value of the interpolationMethod property. * * @param value * allowed object is * {@link InterpolationMethodType } * */ public void setInterpolationMethod(InterpolationMethodType value) { this.interpolationMethod = value; } public TimeSeries withTimeAnchor(TimeAnchor value) { setTimeAnchor(value); return this; } public TimeSeries withTimeExceptions(TimeException... values) { if (values!= null) { for (TimeException value: values) { getTimeExceptions().add(value); } } return this; } public TimeSeries withTimeExceptions(Collection values) { if (values!= null) { getTimeExceptions().addAll(values); } return this; } public TimeSeries withTimeValues(TimeValue... values) { if (values!= null) { for (TimeValue value: values) { getTimeValues().add(value); } } return this; } public TimeSeries withTimeValues(Collection values) { if (values!= null) { getTimeValues().addAll(values); } return this; } public TimeSeries withUsage(TimeSeriesUsageType value) { setUsage(value); return this; } public TimeSeries withStartTime(Double value) { setStartTime(value); return this; } public TimeSeries withEndTime(Double value) { setEndTime(value); return this; } public TimeSeries withInterpolationMethod(InterpolationMethodType value) { setInterpolationMethod(value); return this; } public Locator sourceLocation() { return locator; } public void setSourceLocation(Locator newLocator) { locator = newLocator; } @Override public VisitorAction accept(Visitor visitor) { VisitorAction status = visitor.visit(this); if ((status == VisitorAction.CONTINUE)&&(this.timeAnchor!= null)) { status = this.timeAnchor.accept(visitor); } for (int i = 0; (((status == VisitorAction.CONTINUE)&&(this.timeExceptions!= null))&&(i





© 2015 - 2024 Weber Informatics LLC | Privacy Policy