org.dmg.pmml.SequenceModel 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.jpmml.schema.Added;
import org.jpmml.schema.Version;
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}MiningSchema"/>
* <element ref="{http://www.dmg.org/PMML-4_2}ModelStats" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}LocalTransformations" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Constraints" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Item" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Itemset" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}SetPredicate" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Sequence" maxOccurs="unbounded"/>
* <element ref="{http://www.dmg.org/PMML-4_2}SequenceRule" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="modelName" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="functionName" use="required" type="{http://www.dmg.org/PMML-4_2}MINING-FUNCTION" />
* <attribute name="algorithmName" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="numberOfTransactions" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* <attribute name="maxNumberOfItemsPerTransaction" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* <attribute name="avgNumberOfItemsPerTransaction" type="{http://www.dmg.org/PMML-4_2}REAL-NUMBER" />
* <attribute name="numberOfTransactionGroups" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* <attribute name="maxNumberOfTAsPerTAGroup" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* <attribute name="avgNumberOfTAsPerTAGroup" type="{http://www.dmg.org/PMML-4_2}REAL-NUMBER" />
* <attribute name="isScorable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions",
"miningSchema",
"modelStats",
"localTransformations",
"constraints",
"items",
"itemsets",
"setPredicates",
"sequences",
"sequenceRules"
})
@XmlRootElement(name = "SequenceModel")
public class SequenceModel
extends Model
implements Locatable, HasExtensions
{
@XmlElement(name = "Extension")
protected List extensions;
@XmlElement(name = "MiningSchema", required = true)
protected MiningSchema miningSchema;
@XmlElement(name = "ModelStats")
protected ModelStats modelStats;
@XmlElement(name = "LocalTransformations")
protected LocalTransformations localTransformations;
@XmlElement(name = "Constraints")
@Added(Version.PMML_3_1)
protected Constraints constraints;
@XmlElement(name = "Item")
protected List- items;
@XmlElement(name = "Itemset")
protected List
itemsets;
@XmlElement(name = "SetPredicate")
protected List setPredicates;
@XmlElement(name = "Sequence", required = true)
protected List sequences;
@XmlElement(name = "SequenceRule")
protected List sequenceRules;
@XmlAttribute(name = "modelName")
protected String modelName;
@XmlAttribute(name = "functionName", required = true)
protected MiningFunctionType functionName;
@XmlAttribute(name = "algorithmName")
protected String algorithmName;
@XmlAttribute(name = "numberOfTransactions")
protected Integer numberOfTransactions;
@XmlAttribute(name = "maxNumberOfItemsPerTransaction")
protected Integer maxNumberOfItemsPerTransaction;
@XmlAttribute(name = "avgNumberOfItemsPerTransaction")
protected Double avgNumberOfItemsPerTransaction;
@XmlAttribute(name = "numberOfTransactionGroups")
protected Integer numberOfTransactionGroups;
@XmlAttribute(name = "maxNumberOfTAsPerTAGroup")
protected Integer maxNumberOfTAsPerTAGroup;
@XmlAttribute(name = "avgNumberOfTAsPerTAGroup")
protected Double avgNumberOfTAsPerTAGroup;
@XmlAttribute(name = "isScorable")
@Added(Version.PMML_4_1)
protected Boolean scorable;
@XmlLocation
@XmlTransient
protected Locator locator;
public SequenceModel() {
super();
}
public SequenceModel(final MiningSchema miningSchema, final MiningFunctionType functionName) {
super();
this.miningSchema = miningSchema;
this.functionName = functionName;
}
/**
* 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 miningSchema property.
*
* @return
* possible object is
* {@link MiningSchema }
*
*/
public MiningSchema getMiningSchema() {
return miningSchema;
}
/**
* Sets the value of the miningSchema property.
*
* @param value
* allowed object is
* {@link MiningSchema }
*
*/
public void setMiningSchema(MiningSchema value) {
this.miningSchema = value;
}
/**
* Gets the value of the modelStats property.
*
* @return
* possible object is
* {@link ModelStats }
*
*/
public ModelStats getModelStats() {
return modelStats;
}
/**
* Sets the value of the modelStats property.
*
* @param value
* allowed object is
* {@link ModelStats }
*
*/
public void setModelStats(ModelStats value) {
this.modelStats = value;
}
/**
* Gets the value of the localTransformations property.
*
* @return
* possible object is
* {@link LocalTransformations }
*
*/
public LocalTransformations getLocalTransformations() {
return localTransformations;
}
/**
* Sets the value of the localTransformations property.
*
* @param value
* allowed object is
* {@link LocalTransformations }
*
*/
public void setLocalTransformations(LocalTransformations value) {
this.localTransformations = value;
}
/**
* Gets the value of the constraints property.
*
* @return
* possible object is
* {@link Constraints }
*
*/
public Constraints getConstraints() {
return constraints;
}
/**
* Sets the value of the constraints property.
*
* @param value
* allowed object is
* {@link Constraints }
*
*/
public void setConstraints(Constraints value) {
this.constraints = value;
}
/**
* Gets the value of the items 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 items property.
*
*
* For example, to add a new item, do as follows:
*
* getItems().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Item }
*
*
*/
public List- getItems() {
if (items == null) {
items = new ArrayList
- ();
}
return this.items;
}
/**
* Gets the value of the itemsets 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 itemsets property.
*
*
* For example, to add a new item, do as follows:
*
* getItemsets().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Itemset }
*
*
*/
public List getItemsets() {
if (itemsets == null) {
itemsets = new ArrayList();
}
return this.itemsets;
}
/**
* Gets the value of the setPredicates 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 setPredicates property.
*
*
* For example, to add a new item, do as follows:
*
* getSetPredicates().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link SetPredicate }
*
*
*/
public List getSetPredicates() {
if (setPredicates == null) {
setPredicates = new ArrayList();
}
return this.setPredicates;
}
/**
* Gets the value of the sequences 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 sequences property.
*
*
* For example, to add a new item, do as follows:
*
* getSequences().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Sequence }
*
*
*/
public List getSequences() {
if (sequences == null) {
sequences = new ArrayList();
}
return this.sequences;
}
/**
* Gets the value of the sequenceRules 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 sequenceRules property.
*
*
* For example, to add a new item, do as follows:
*
* getSequenceRules().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link SequenceRule }
*
*
*/
public List getSequenceRules() {
if (sequenceRules == null) {
sequenceRules = new ArrayList();
}
return this.sequenceRules;
}
/**
* Gets the value of the modelName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getModelName() {
return modelName;
}
/**
* Sets the value of the modelName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setModelName(String value) {
this.modelName = value;
}
/**
* Gets the value of the functionName property.
*
* @return
* possible object is
* {@link MiningFunctionType }
*
*/
public MiningFunctionType getFunctionName() {
return functionName;
}
/**
* Sets the value of the functionName property.
*
* @param value
* allowed object is
* {@link MiningFunctionType }
*
*/
public void setFunctionName(MiningFunctionType value) {
this.functionName = value;
}
/**
* Gets the value of the algorithmName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAlgorithmName() {
return algorithmName;
}
/**
* Sets the value of the algorithmName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAlgorithmName(String value) {
this.algorithmName = value;
}
/**
* Gets the value of the numberOfTransactions property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getNumberOfTransactions() {
return numberOfTransactions;
}
/**
* Sets the value of the numberOfTransactions property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setNumberOfTransactions(Integer value) {
this.numberOfTransactions = value;
}
/**
* Gets the value of the maxNumberOfItemsPerTransaction property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMaxNumberOfItemsPerTransaction() {
return maxNumberOfItemsPerTransaction;
}
/**
* Sets the value of the maxNumberOfItemsPerTransaction property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setMaxNumberOfItemsPerTransaction(Integer value) {
this.maxNumberOfItemsPerTransaction = value;
}
/**
* Gets the value of the avgNumberOfItemsPerTransaction property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getAvgNumberOfItemsPerTransaction() {
return avgNumberOfItemsPerTransaction;
}
/**
* Sets the value of the avgNumberOfItemsPerTransaction property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setAvgNumberOfItemsPerTransaction(Double value) {
this.avgNumberOfItemsPerTransaction = value;
}
/**
* Gets the value of the numberOfTransactionGroups property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getNumberOfTransactionGroups() {
return numberOfTransactionGroups;
}
/**
* Sets the value of the numberOfTransactionGroups property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setNumberOfTransactionGroups(Integer value) {
this.numberOfTransactionGroups = value;
}
/**
* Gets the value of the maxNumberOfTAsPerTAGroup property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getMaxNumberOfTAsPerTAGroup() {
return maxNumberOfTAsPerTAGroup;
}
/**
* Sets the value of the maxNumberOfTAsPerTAGroup property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setMaxNumberOfTAsPerTAGroup(Integer value) {
this.maxNumberOfTAsPerTAGroup = value;
}
/**
* Gets the value of the avgNumberOfTAsPerTAGroup property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getAvgNumberOfTAsPerTAGroup() {
return avgNumberOfTAsPerTAGroup;
}
/**
* Sets the value of the avgNumberOfTAsPerTAGroup property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setAvgNumberOfTAsPerTAGroup(Double value) {
this.avgNumberOfTAsPerTAGroup = value;
}
/**
* Gets the value of the scorable property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isScorable() {
if (scorable == null) {
return true;
} else {
return scorable;
}
}
/**
* Sets the value of the scorable property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setScorable(Boolean value) {
this.scorable = value;
}
public SequenceModel withExtensions(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtensions().add(value);
}
}
return this;
}
public SequenceModel withExtensions(Collection values) {
if (values!= null) {
getExtensions().addAll(values);
}
return this;
}
public SequenceModel withMiningSchema(MiningSchema value) {
setMiningSchema(value);
return this;
}
public SequenceModel withModelStats(ModelStats value) {
setModelStats(value);
return this;
}
public SequenceModel withLocalTransformations(LocalTransformations value) {
setLocalTransformations(value);
return this;
}
public SequenceModel withConstraints(Constraints value) {
setConstraints(value);
return this;
}
public SequenceModel withItems(Item... values) {
if (values!= null) {
for (Item value: values) {
getItems().add(value);
}
}
return this;
}
public SequenceModel withItems(Collection- values) {
if (values!= null) {
getItems().addAll(values);
}
return this;
}
public SequenceModel withItemsets(Itemset... values) {
if (values!= null) {
for (Itemset value: values) {
getItemsets().add(value);
}
}
return this;
}
public SequenceModel withItemsets(Collection
values) {
if (values!= null) {
getItemsets().addAll(values);
}
return this;
}
public SequenceModel withSetPredicates(SetPredicate... values) {
if (values!= null) {
for (SetPredicate value: values) {
getSetPredicates().add(value);
}
}
return this;
}
public SequenceModel withSetPredicates(Collection values) {
if (values!= null) {
getSetPredicates().addAll(values);
}
return this;
}
public SequenceModel withSequences(Sequence... values) {
if (values!= null) {
for (Sequence value: values) {
getSequences().add(value);
}
}
return this;
}
public SequenceModel withSequences(Collection values) {
if (values!= null) {
getSequences().addAll(values);
}
return this;
}
public SequenceModel withSequenceRules(SequenceRule... values) {
if (values!= null) {
for (SequenceRule value: values) {
getSequenceRules().add(value);
}
}
return this;
}
public SequenceModel withSequenceRules(Collection values) {
if (values!= null) {
getSequenceRules().addAll(values);
}
return this;
}
public SequenceModel withModelName(String value) {
setModelName(value);
return this;
}
public SequenceModel withFunctionName(MiningFunctionType value) {
setFunctionName(value);
return this;
}
public SequenceModel withAlgorithmName(String value) {
setAlgorithmName(value);
return this;
}
public SequenceModel withNumberOfTransactions(Integer value) {
setNumberOfTransactions(value);
return this;
}
public SequenceModel withMaxNumberOfItemsPerTransaction(Integer value) {
setMaxNumberOfItemsPerTransaction(value);
return this;
}
public SequenceModel withAvgNumberOfItemsPerTransaction(Double value) {
setAvgNumberOfItemsPerTransaction(value);
return this;
}
public SequenceModel withNumberOfTransactionGroups(Integer value) {
setNumberOfTransactionGroups(value);
return this;
}
public SequenceModel withMaxNumberOfTAsPerTAGroup(Integer value) {
setMaxNumberOfTAsPerTAGroup(value);
return this;
}
public SequenceModel withAvgNumberOfTAsPerTAGroup(Double value) {
setAvgNumberOfTAsPerTAGroup(value);
return this;
}
public SequenceModel withScorable(Boolean value) {
setScorable(value);
return this;
}
public Locator sourceLocation() {
return locator;
}
public void setSourceLocation(Locator newLocator) {
locator = newLocator;
}
/**
* Gets the value of the output property.
*
* @throws UnsupportedOperationException
* Always.
*/
@Override
public Output getOutput() {
throw new UnsupportedOperationException();
}
/**
* Sets the value of the output property.
*
* @throws UnsupportedOperationException
* Always.
*/
@Override
public void setOutput(Output output) {
throw new UnsupportedOperationException();
}
/**
* Gets the value of the targets property.
*
* @throws UnsupportedOperationException
* Always.
*/
@Override
public Targets getTargets() {
throw new UnsupportedOperationException();
}
/**
* Sets the value of the targets property.
*
* @throws UnsupportedOperationException
* Always.
*/
@Override
public void setTargets(Targets targets) {
throw new UnsupportedOperationException();
}
@Override
public VisitorAction accept(Visitor visitor) {
VisitorAction status = visitor.visit(this);
for (int i = 0; (((status == VisitorAction.CONTINUE)&&(this.extensions!= null))&&(i