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

org.dmg.pmml.time_series.TrendExpoSmooth Maven / Gradle / Ivy


package org.dmg.pmml.time_series;

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.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
import org.dmg.pmml.Array;
import org.dmg.pmml.Visitor;
import org.dmg.pmml.VisitorAction;
import org.jpmml.schema.Added;
import org.jpmml.schema.Optional;
import org.jpmml.schema.Removed;
import org.jpmml.schema.Version;


/**
 * 

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>
 *         <group ref="{http://www.dmg.org/PMML-4_3}REAL-ARRAY" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="trend" default="additive">
 *         <simpleType>
 *           <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
 *             <enumeration value="additive"/>
 *             <enumeration value="damped_additive"/>
 *             <enumeration value="multiplicative"/>
 *             <enumeration value="damped_multiplicative"/>
 *             <enumeration value="double_exponential"/>
 *             <enumeration value="polynomial_exponential"/>
 *           </restriction>
 *         </simpleType>
 *       </attribute>
 *       <attribute name="gamma" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
 *       <attribute name="phi" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="1" />
 *       <attribute name="smoothedValue" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "array" }) @Added(Version.PMML_4_0) public class TrendExpoSmooth extends org.dmg.pmml.PMMLObject { @XmlAttribute(name = "trend") private TrendExpoSmooth.Trend trend; @XmlAttribute(name = "gamma") private Double gamma; @XmlAttribute(name = "phi") private Double phi; @XmlAttribute(name = "smoothedValue") @Optional(Version.PMML_4_1) private Double smoothedValue; @XmlElement(name = "Array", namespace = "http://www.dmg.org/PMML-4_3") private Array array; private final static Double DEFAULT_PHI = 1.0D; /** * Gets the value of the trend property. * * @return * possible object is * {@link TrendExpoSmooth.Trend } * */ public TrendExpoSmooth.Trend getTrend() { if (trend == null) { return TrendExpoSmooth.Trend.ADDITIVE; } else { return trend; } } /** * Sets the value of the trend property. * * @param trend * allowed object is * {@link TrendExpoSmooth.Trend } * */ public TrendExpoSmooth setTrend(TrendExpoSmooth.Trend trend) { this.trend = trend; return this; } /** * Gets the value of the gamma property. * * @return * possible object is * {@link Double } * */ public Double getGamma() { return gamma; } /** * Sets the value of the gamma property. * * @param gamma * allowed object is * {@link Double } * */ public TrendExpoSmooth setGamma(Double gamma) { this.gamma = gamma; return this; } /** * Gets the value of the phi property. * * @return * possible object is * {@link Double } * */ public Double getPhi() { if (phi == null) { return DEFAULT_PHI; } else { return phi; } } /** * Sets the value of the phi property. * * @param phi * allowed object is * {@link Double } * */ public TrendExpoSmooth setPhi(Double phi) { this.phi = phi; return this; } /** * Gets the value of the smoothedValue property. * * @return * possible object is * {@link Double } * */ public Double getSmoothedValue() { return smoothedValue; } /** * Sets the value of the smoothedValue property. * * @param smoothedValue * allowed object is * {@link Double } * */ public TrendExpoSmooth setSmoothedValue(Double smoothedValue) { this.smoothedValue = smoothedValue; return this; } /** * Gets the value of the array property. * * @return * possible object is * {@link Array } * */ public Array getArray() { return array; } /** * Sets the value of the array property. * * @param array * allowed object is * {@link Array } * */ public TrendExpoSmooth setArray(Array array) { this.array = array; return this; } @Override public VisitorAction accept(Visitor visitor) { VisitorAction status = visitor.visit(this); if (status == VisitorAction.CONTINUE) { visitor.pushParent(this); if (status == VisitorAction.CONTINUE) { status = org.dmg.pmml.PMMLObject.traverse(visitor, getArray()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } /** *

Java class for null. * *

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

*

     * <simpleType>
     *   <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
     *     <enumeration value="additive"/>
     *     <enumeration value="damped_additive"/>
     *     <enumeration value="multiplicative"/>
     *     <enumeration value="damped_multiplicative"/>
     *     <enumeration value="double_exponential"/>
     *     <enumeration value="polynomial_exponential"/>
     *   </restriction>
     * </simpleType>
     * 
* */ @XmlType(name = "") @XmlEnum public enum Trend { @XmlEnumValue("additive") ADDITIVE("additive"), @XmlEnumValue("damped_additive") DAMPED_ADDITIVE("damped_additive"), @XmlEnumValue("multiplicative") MULTIPLICATIVE("multiplicative"), @XmlEnumValue("damped_multiplicative") DAMPED_MULTIPLICATIVE("damped_multiplicative"), @XmlEnumValue("double_exponential") @Removed(Version.PMML_4_1) DOUBLE_EXPONENTIAL("double_exponential"), @XmlEnumValue("polynomial_exponential") @Added(Version.PMML_4_1) POLYNOMIAL_EXPONENTIAL("polynomial_exponential"); private final String value; Trend(String v) { value = v; } public String value() { return value; } public static TrendExpoSmooth.Trend fromValue(String v) { for (TrendExpoSmooth.Trend c: TrendExpoSmooth.Trend.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy