
org.dmg.pmml.AnovaRow Maven / Gradle / Ivy
package org.dmg.pmml;
import java.util.ArrayList;
import java.util.Arrays;
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.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jpmml.schema.Added;
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>
* <element ref="{http://www.dmg.org/PMML-4_3}Extension" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="type" use="required">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Model"/>
* <enumeration value="Error"/>
* <enumeration value="Total"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="sumOfSquares" use="required" type="{http://www.dmg.org/PMML-4_3}NUMBER" />
* <attribute name="degreesOfFreedom" use="required" type="{http://www.dmg.org/PMML-4_3}NUMBER" />
* <attribute name="meanOfSquares" type="{http://www.dmg.org/PMML-4_3}NUMBER" />
* <attribute name="fValue" type="{http://www.dmg.org/PMML-4_3}NUMBER" />
* <attribute name="pValue" type="{http://www.dmg.org/PMML-4_3}PROB-NUMBER" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions"
})
@XmlRootElement(name = "AnovaRow", namespace = "http://www.dmg.org/PMML-4_3")
@Added(Version.PMML_4_0)
public class AnovaRow
extends org.dmg.pmml.PMMLObject
implements HasExtensions
{
@XmlAttribute(name = "type", required = true)
private AnovaRow.Type type;
@XmlAttribute(name = "sumOfSquares", required = true)
private double sumOfSquares;
@XmlAttribute(name = "degreesOfFreedom", required = true)
private double degreesOfFreedom;
@XmlAttribute(name = "meanOfSquares")
private Double meanOfSquares;
@XmlAttribute(name = "fValue")
private Double fValue;
@XmlAttribute(name = "pValue")
private Double pValue;
@XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3")
private List extensions;
public AnovaRow() {
super();
}
public AnovaRow(final AnovaRow.Type type, final double sumOfSquares, final double degreesOfFreedom) {
super();
this.type = type;
this.sumOfSquares = sumOfSquares;
this.degreesOfFreedom = degreesOfFreedom;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link AnovaRow.Type }
*
*/
public AnovaRow.Type getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param type
* allowed object is
* {@link AnovaRow.Type }
*
*/
public AnovaRow setType(AnovaRow.Type type) {
this.type = type;
return this;
}
/**
* Gets the value of the sumOfSquares property.
*
*/
public double getSumOfSquares() {
return sumOfSquares;
}
/**
* Sets the value of the sumOfSquares property.
*
*/
public AnovaRow setSumOfSquares(double sumOfSquares) {
this.sumOfSquares = sumOfSquares;
return this;
}
/**
* Gets the value of the degreesOfFreedom property.
*
*/
public double getDegreesOfFreedom() {
return degreesOfFreedom;
}
/**
* Sets the value of the degreesOfFreedom property.
*
*/
public AnovaRow setDegreesOfFreedom(double degreesOfFreedom) {
this.degreesOfFreedom = degreesOfFreedom;
return this;
}
/**
* Gets the value of the meanOfSquares property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMeanOfSquares() {
return meanOfSquares;
}
/**
* Sets the value of the meanOfSquares property.
*
* @param meanOfSquares
* allowed object is
* {@link Double }
*
*/
public AnovaRow setMeanOfSquares(Double meanOfSquares) {
this.meanOfSquares = meanOfSquares;
return this;
}
/**
* Gets the value of the fValue property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getFValue() {
return fValue;
}
/**
* Sets the value of the fValue property.
*
* @param fValue
* allowed object is
* {@link Double }
*
*/
public AnovaRow setFValue(Double fValue) {
this.fValue = fValue;
return this;
}
/**
* Gets the value of the pValue property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getPValue() {
return pValue;
}
/**
* Sets the value of the pValue property.
*
* @param pValue
* allowed object is
* {@link Double }
*
*/
public AnovaRow setPValue(Double pValue) {
this.pValue = pValue;
return this;
}
/**
* Gets the value of the extensions 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 extensions property.
*
*
* For example, to add a new item, do as follows:
*
* getExtensions().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Extension }
*
*
*/
public List getExtensions() {
if (extensions == null) {
extensions = new ArrayList();
}
return this.extensions;
}
public boolean hasExtensions() {
return ((this.extensions!= null)&&(this.extensions.size()> 0));
}
public AnovaRow addExtensions(Extension... extensions) {
getExtensions().addAll(Arrays.asList(extensions));
return this;
}
@Override
public VisitorAction accept(Visitor visitor) {
VisitorAction status = visitor.visit(this);
if (status == VisitorAction.CONTINUE) {
visitor.pushParent(this);
if ((status == VisitorAction.CONTINUE)&&hasExtensions()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getExtensions());
}
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}string">
* <enumeration value="Model"/>
* <enumeration value="Error"/>
* <enumeration value="Total"/>
* </restriction>
* </simpleType>
*
*
*/
@XmlType(name = "")
@XmlEnum
public enum Type {
@XmlEnumValue("Model")
MODEL("Model"),
@XmlEnumValue("Error")
ERROR("Error"),
@XmlEnumValue("Total")
TOTAL("Total");
private final String value;
Type(String v) {
value = v;
}
public String value() {
return value;
}
public static AnovaRow.Type fromValue(String v) {
for (AnovaRow.Type c: AnovaRow.Type.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
}