
org.dmg.pmml.NumericInfo 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.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* 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}Extension" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Quantile" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="minimum" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* <attribute name="maximum" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* <attribute name="mean" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* <attribute name="standardDeviation" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* <attribute name="median" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* <attribute name="interQuartileRange" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions",
"quantiles"
})
@XmlRootElement(name = "NumericInfo", namespace = "http://www.dmg.org/PMML-4_2")
public class NumericInfo
extends org.dmg.pmml.PMMLObject
implements HasExtensions
{
@XmlAttribute(name = "minimum")
private Double minimum;
@XmlAttribute(name = "maximum")
private Double maximum;
@XmlAttribute(name = "mean")
private Double mean;
@XmlAttribute(name = "standardDeviation")
private Double standardDeviation;
@XmlAttribute(name = "median")
private Double median;
@XmlAttribute(name = "interQuartileRange")
private Double interQuartileRange;
@XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_2")
private List extensions;
@XmlElement(name = "Quantile", namespace = "http://www.dmg.org/PMML-4_2")
private List quantiles;
/**
* Gets the value of the minimum property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimum() {
return minimum;
}
/**
* Sets the value of the minimum property.
*
* @param minimum
* allowed object is
* {@link Double }
*
*/
public NumericInfo setMinimum(Double minimum) {
this.minimum = minimum;
return this;
}
/**
* Gets the value of the maximum property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaximum() {
return maximum;
}
/**
* Sets the value of the maximum property.
*
* @param maximum
* allowed object is
* {@link Double }
*
*/
public NumericInfo setMaximum(Double maximum) {
this.maximum = maximum;
return this;
}
/**
* Gets the value of the mean property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMean() {
return mean;
}
/**
* Sets the value of the mean property.
*
* @param mean
* allowed object is
* {@link Double }
*
*/
public NumericInfo setMean(Double mean) {
this.mean = mean;
return this;
}
/**
* Gets the value of the standardDeviation property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getStandardDeviation() {
return standardDeviation;
}
/**
* Sets the value of the standardDeviation property.
*
* @param standardDeviation
* allowed object is
* {@link Double }
*
*/
public NumericInfo setStandardDeviation(Double standardDeviation) {
this.standardDeviation = standardDeviation;
return this;
}
/**
* Gets the value of the median property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMedian() {
return median;
}
/**
* Sets the value of the median property.
*
* @param median
* allowed object is
* {@link Double }
*
*/
public NumericInfo setMedian(Double median) {
this.median = median;
return this;
}
/**
* Gets the value of the interQuartileRange property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getInterQuartileRange() {
return interQuartileRange;
}
/**
* Sets the value of the interQuartileRange property.
*
* @param interQuartileRange
* allowed object is
* {@link Double }
*
*/
public NumericInfo setInterQuartileRange(Double interQuartileRange) {
this.interQuartileRange = interQuartileRange;
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;
}
/**
* Gets the value of the quantiles 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 quantiles property.
*
*
* For example, to add a new item, do as follows:
*
* getQuantiles().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Quantile }
*
*
*/
public List getQuantiles() {
if (quantiles == null) {
quantiles = new ArrayList();
}
return this.quantiles;
}
public boolean hasExtensions() {
return ((this.extensions!= null)&&(this.extensions.size()> 0));
}
public NumericInfo addExtensions(Extension... extensions) {
getExtensions().addAll(Arrays.asList(extensions));
return this;
}
public boolean hasQuantiles() {
return ((this.quantiles!= null)&&(this.quantiles.size()> 0));
}
public NumericInfo addQuantiles(Quantile... quantiles) {
getQuantiles().addAll(Arrays.asList(quantiles));
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());
}
if ((status == VisitorAction.CONTINUE)&&hasQuantiles()) {
status = org.dmg.pmml.PMMLObject.traverse(visitor, getQuantiles());
}
visitor.popParent();
}
if (status == VisitorAction.TERMINATE) {
return VisitorAction.TERMINATE;
}
return VisitorAction.CONTINUE;
}
}