org.dmg.pmml.sequence.Constraints Maven / Gradle / Ivy
package org.dmg.pmml.sequence;
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;
import org.dmg.pmml.Extension;
import org.dmg.pmml.HasExtensions;
import org.dmg.pmml.Visitor;
import org.dmg.pmml.VisitorAction;
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="minimumNumberOfItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" default="1" />
* <attribute name="maximumNumberOfItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" />
* <attribute name="minimumNumberOfAntecedentItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" default="1" />
* <attribute name="maximumNumberOfAntecedentItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" />
* <attribute name="minimumNumberOfConsequentItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" default="1" />
* <attribute name="maximumNumberOfConsequentItems" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" />
* <attribute name="minimumSupport" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="minimumConfidence" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="minimumLift" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="minimumTotalSequenceTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="maximumTotalSequenceTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
* <attribute name="minimumItemsetSeparationTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="maximumItemsetSeparationTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
* <attribute name="minimumAntConsSeparationTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" default="0" />
* <attribute name="maximumAntConsSeparationTime" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions"
})
@XmlRootElement(name = "Constraints", namespace = "http://www.dmg.org/PMML-4_3")
@Added(Version.PMML_3_1)
public class Constraints
extends org.dmg.pmml.PMMLObject
implements HasExtensions
{
@XmlAttribute(name = "minimumNumberOfItems")
private Integer minimumNumberOfItems;
@XmlAttribute(name = "maximumNumberOfItems")
private Integer maximumNumberOfItems;
@XmlAttribute(name = "minimumNumberOfAntecedentItems")
private Integer minimumNumberOfAntecedentItems;
@XmlAttribute(name = "maximumNumberOfAntecedentItems")
private Integer maximumNumberOfAntecedentItems;
@XmlAttribute(name = "minimumNumberOfConsequentItems")
private Integer minimumNumberOfConsequentItems;
@XmlAttribute(name = "maximumNumberOfConsequentItems")
private Integer maximumNumberOfConsequentItems;
@XmlAttribute(name = "minimumSupport")
private Double minimumSupport;
@XmlAttribute(name = "minimumConfidence")
private Double minimumConfidence;
@XmlAttribute(name = "minimumLift")
private Double minimumLift;
@XmlAttribute(name = "minimumTotalSequenceTime")
private Double minimumTotalSequenceTime;
@XmlAttribute(name = "maximumTotalSequenceTime")
private Double maximumTotalSequenceTime;
@XmlAttribute(name = "minimumItemsetSeparationTime")
private Double minimumItemsetSeparationTime;
@XmlAttribute(name = "maximumItemsetSeparationTime")
private Double maximumItemsetSeparationTime;
@XmlAttribute(name = "minimumAntConsSeparationTime")
private Double minimumAntConsSeparationTime;
@XmlAttribute(name = "maximumAntConsSeparationTime")
private Double maximumAntConsSeparationTime;
@XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3")
private List extensions;
private final static Integer DEFAULT_MINIMUM_NUMBER_OF_ITEMS = 1;
private final static Integer DEFAULT_MINIMUM_NUMBER_OF_ANTECEDENT_ITEMS = 1;
private final static Integer DEFAULT_MINIMUM_NUMBER_OF_CONSEQUENT_ITEMS = 1;
private final static Double DEFAULT_MINIMUM_SUPPORT = 0.0D;
private final static Double DEFAULT_MINIMUM_CONFIDENCE = 0.0D;
private final static Double DEFAULT_MINIMUM_LIFT = 0.0D;
private final static Double DEFAULT_MINIMUM_TOTAL_SEQUENCE_TIME = 0.0D;
private final static Double DEFAULT_MINIMUM_ITEMSET_SEPARATION_TIME = 0.0D;
private final static Double DEFAULT_MINIMUM_ANT_CONS_SEPARATION_TIME = 0.0D;
/**
* Gets the value of the minimumNumberOfItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMinimumNumberOfItems() {
if (minimumNumberOfItems == null) {
return DEFAULT_MINIMUM_NUMBER_OF_ITEMS;
} else {
return minimumNumberOfItems;
}
}
/**
* Sets the value of the minimumNumberOfItems property.
*
* @param minimumNumberOfItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMinimumNumberOfItems(Integer minimumNumberOfItems) {
this.minimumNumberOfItems = minimumNumberOfItems;
return this;
}
/**
* Gets the value of the maximumNumberOfItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMaximumNumberOfItems() {
return maximumNumberOfItems;
}
/**
* Sets the value of the maximumNumberOfItems property.
*
* @param maximumNumberOfItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMaximumNumberOfItems(Integer maximumNumberOfItems) {
this.maximumNumberOfItems = maximumNumberOfItems;
return this;
}
/**
* Gets the value of the minimumNumberOfAntecedentItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMinimumNumberOfAntecedentItems() {
if (minimumNumberOfAntecedentItems == null) {
return DEFAULT_MINIMUM_NUMBER_OF_ANTECEDENT_ITEMS;
} else {
return minimumNumberOfAntecedentItems;
}
}
/**
* Sets the value of the minimumNumberOfAntecedentItems property.
*
* @param minimumNumberOfAntecedentItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMinimumNumberOfAntecedentItems(Integer minimumNumberOfAntecedentItems) {
this.minimumNumberOfAntecedentItems = minimumNumberOfAntecedentItems;
return this;
}
/**
* Gets the value of the maximumNumberOfAntecedentItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMaximumNumberOfAntecedentItems() {
return maximumNumberOfAntecedentItems;
}
/**
* Sets the value of the maximumNumberOfAntecedentItems property.
*
* @param maximumNumberOfAntecedentItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMaximumNumberOfAntecedentItems(Integer maximumNumberOfAntecedentItems) {
this.maximumNumberOfAntecedentItems = maximumNumberOfAntecedentItems;
return this;
}
/**
* Gets the value of the minimumNumberOfConsequentItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMinimumNumberOfConsequentItems() {
if (minimumNumberOfConsequentItems == null) {
return DEFAULT_MINIMUM_NUMBER_OF_CONSEQUENT_ITEMS;
} else {
return minimumNumberOfConsequentItems;
}
}
/**
* Sets the value of the minimumNumberOfConsequentItems property.
*
* @param minimumNumberOfConsequentItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMinimumNumberOfConsequentItems(Integer minimumNumberOfConsequentItems) {
this.minimumNumberOfConsequentItems = minimumNumberOfConsequentItems;
return this;
}
/**
* Gets the value of the maximumNumberOfConsequentItems property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMaximumNumberOfConsequentItems() {
return maximumNumberOfConsequentItems;
}
/**
* Sets the value of the maximumNumberOfConsequentItems property.
*
* @param maximumNumberOfConsequentItems
* allowed object is
* {@link Integer }
*
*/
public Constraints setMaximumNumberOfConsequentItems(Integer maximumNumberOfConsequentItems) {
this.maximumNumberOfConsequentItems = maximumNumberOfConsequentItems;
return this;
}
/**
* Gets the value of the minimumSupport property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumSupport() {
if (minimumSupport == null) {
return DEFAULT_MINIMUM_SUPPORT;
} else {
return minimumSupport;
}
}
/**
* Sets the value of the minimumSupport property.
*
* @param minimumSupport
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumSupport(Double minimumSupport) {
this.minimumSupport = minimumSupport;
return this;
}
/**
* Gets the value of the minimumConfidence property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumConfidence() {
if (minimumConfidence == null) {
return DEFAULT_MINIMUM_CONFIDENCE;
} else {
return minimumConfidence;
}
}
/**
* Sets the value of the minimumConfidence property.
*
* @param minimumConfidence
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumConfidence(Double minimumConfidence) {
this.minimumConfidence = minimumConfidence;
return this;
}
/**
* Gets the value of the minimumLift property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumLift() {
if (minimumLift == null) {
return DEFAULT_MINIMUM_LIFT;
} else {
return minimumLift;
}
}
/**
* Sets the value of the minimumLift property.
*
* @param minimumLift
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumLift(Double minimumLift) {
this.minimumLift = minimumLift;
return this;
}
/**
* Gets the value of the minimumTotalSequenceTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumTotalSequenceTime() {
if (minimumTotalSequenceTime == null) {
return DEFAULT_MINIMUM_TOTAL_SEQUENCE_TIME;
} else {
return minimumTotalSequenceTime;
}
}
/**
* Sets the value of the minimumTotalSequenceTime property.
*
* @param minimumTotalSequenceTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumTotalSequenceTime(Double minimumTotalSequenceTime) {
this.minimumTotalSequenceTime = minimumTotalSequenceTime;
return this;
}
/**
* Gets the value of the maximumTotalSequenceTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaximumTotalSequenceTime() {
return maximumTotalSequenceTime;
}
/**
* Sets the value of the maximumTotalSequenceTime property.
*
* @param maximumTotalSequenceTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMaximumTotalSequenceTime(Double maximumTotalSequenceTime) {
this.maximumTotalSequenceTime = maximumTotalSequenceTime;
return this;
}
/**
* Gets the value of the minimumItemsetSeparationTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumItemsetSeparationTime() {
if (minimumItemsetSeparationTime == null) {
return DEFAULT_MINIMUM_ITEMSET_SEPARATION_TIME;
} else {
return minimumItemsetSeparationTime;
}
}
/**
* Sets the value of the minimumItemsetSeparationTime property.
*
* @param minimumItemsetSeparationTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumItemsetSeparationTime(Double minimumItemsetSeparationTime) {
this.minimumItemsetSeparationTime = minimumItemsetSeparationTime;
return this;
}
/**
* Gets the value of the maximumItemsetSeparationTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaximumItemsetSeparationTime() {
return maximumItemsetSeparationTime;
}
/**
* Sets the value of the maximumItemsetSeparationTime property.
*
* @param maximumItemsetSeparationTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMaximumItemsetSeparationTime(Double maximumItemsetSeparationTime) {
this.maximumItemsetSeparationTime = maximumItemsetSeparationTime;
return this;
}
/**
* Gets the value of the minimumAntConsSeparationTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMinimumAntConsSeparationTime() {
if (minimumAntConsSeparationTime == null) {
return DEFAULT_MINIMUM_ANT_CONS_SEPARATION_TIME;
} else {
return minimumAntConsSeparationTime;
}
}
/**
* Sets the value of the minimumAntConsSeparationTime property.
*
* @param minimumAntConsSeparationTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMinimumAntConsSeparationTime(Double minimumAntConsSeparationTime) {
this.minimumAntConsSeparationTime = minimumAntConsSeparationTime;
return this;
}
/**
* Gets the value of the maximumAntConsSeparationTime property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getMaximumAntConsSeparationTime() {
return maximumAntConsSeparationTime;
}
/**
* Sets the value of the maximumAntConsSeparationTime property.
*
* @param maximumAntConsSeparationTime
* allowed object is
* {@link Double }
*
*/
public Constraints setMaximumAntConsSeparationTime(Double maximumAntConsSeparationTime) {
this.maximumAntConsSeparationTime = maximumAntConsSeparationTime;
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 Constraints 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;
}
}