org.dmg.pmml.NumericInfo Maven / Gradle / Ivy
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.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}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")
public class NumericInfo
extends PMMLObject
implements Locatable, HasExtensions
{
@XmlElement(name = "Extension")
protected List extensions;
@XmlElement(name = "Quantile")
protected List quantiles;
@XmlAttribute(name = "minimum")
protected Double minimum;
@XmlAttribute(name = "maximum")
protected Double maximum;
@XmlAttribute(name = "mean")
protected Double mean;
@XmlAttribute(name = "standardDeviation")
protected Double standardDeviation;
@XmlAttribute(name = "median")
protected Double median;
@XmlAttribute(name = "interQuartileRange")
protected Double interQuartileRange;
@XmlLocation
@XmlTransient
protected Locator locator;
/**
* 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;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setMinimum(Double value) {
this.minimum = value;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setMaximum(Double value) {
this.maximum = value;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setMean(Double value) {
this.mean = value;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setStandardDeviation(Double value) {
this.standardDeviation = value;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setMedian(Double value) {
this.median = value;
}
/**
* 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 value
* allowed object is
* {@link Double }
*
*/
public void setInterQuartileRange(Double value) {
this.interQuartileRange = value;
}
public NumericInfo withExtensions(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtensions().add(value);
}
}
return this;
}
public NumericInfo withExtensions(Collection values) {
if (values!= null) {
getExtensions().addAll(values);
}
return this;
}
public NumericInfo withQuantiles(Quantile... values) {
if (values!= null) {
for (Quantile value: values) {
getQuantiles().add(value);
}
}
return this;
}
public NumericInfo withQuantiles(Collection values) {
if (values!= null) {
getQuantiles().addAll(values);
}
return this;
}
public NumericInfo withMinimum(Double value) {
setMinimum(value);
return this;
}
public NumericInfo withMaximum(Double value) {
setMaximum(value);
return this;
}
public NumericInfo withMean(Double value) {
setMean(value);
return this;
}
public NumericInfo withStandardDeviation(Double value) {
setStandardDeviation(value);
return this;
}
public NumericInfo withMedian(Double value) {
setMedian(value);
return this;
}
public NumericInfo withInterQuartileRange(Double value) {
setInterQuartileRange(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);
for (int i = 0; (((status == VisitorAction.CONTINUE)&&(this.extensions!= null))&&(i