All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmg.pmml.sequence.SequenceRule 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.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.dmg.pmml.Entity;
import org.dmg.pmml.Extension;
import org.dmg.pmml.PMMLObject;
import org.dmg.pmml.Visitor;
import org.dmg.pmml.VisitorAction;
import org.jpmml.schema.Added;
import org.jpmml.schema.Version;
import org.w3c.dom.Element;


/**
 * 

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"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}AntecedentSequence"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Delimiter"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Time" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}ConsequentSequence"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Time" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="id" use="required" type="{http://www.dmg.org/PMML-4_3}ELEMENT-ID" />
 *       <attribute name="numberOfSets" use="required" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" />
 *       <attribute name="occurrence" use="required" type="{http://www.dmg.org/PMML-4_3}INT-NUMBER" />
 *       <attribute name="support" use="required" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
 *       <attribute name="confidence" use="required" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
 *       <attribute name="lift" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "content" }) @XmlRootElement(name = "SequenceRule", namespace = "http://www.dmg.org/PMML-4_3") public class SequenceRule extends Entity { @XmlAttribute(name = "id", required = true) private String id; @XmlAttribute(name = "numberOfSets", required = true) private int numberOfSets; @XmlAttribute(name = "occurrence", required = true) private int occurrence; @XmlAttribute(name = "support", required = true) private double support; @XmlAttribute(name = "confidence", required = true) private double confidence; @XmlAttribute(name = "lift") @Added(Version.PMML_3_1) private Double lift; @XmlElementRefs({ @XmlElementRef(name = "ConsequentSequence", namespace = "http://www.dmg.org/PMML-4_3", type = ConsequentSequence.class, required = false), @XmlElementRef(name = "Delimiter", namespace = "http://www.dmg.org/PMML-4_3", type = Delimiter.class, required = false), @XmlElementRef(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3", type = Extension.class, required = false), @XmlElementRef(name = "AntecedentSequence", namespace = "http://www.dmg.org/PMML-4_3", type = AntecedentSequence.class, required = false), @XmlElementRef(name = "Time", namespace = "http://www.dmg.org/PMML-4_3", type = Time.class, required = false) }) @XmlAnyElement(lax = true) private List content; public SequenceRule() { super(); } public SequenceRule(final String id, final int numberOfSets, final int occurrence, final double support, final double confidence) { super(); this.id = id; this.numberOfSets = numberOfSets; this.occurrence = occurrence; this.support = support; this.confidence = confidence; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param id * allowed object is * {@link String } * */ public SequenceRule setId(String id) { this.id = id; return this; } /** * Gets the value of the numberOfSets property. * */ public int getNumberOfSets() { return numberOfSets; } /** * Sets the value of the numberOfSets property. * */ public SequenceRule setNumberOfSets(int numberOfSets) { this.numberOfSets = numberOfSets; return this; } /** * Gets the value of the occurrence property. * */ public int getOccurrence() { return occurrence; } /** * Sets the value of the occurrence property. * */ public SequenceRule setOccurrence(int occurrence) { this.occurrence = occurrence; return this; } /** * Gets the value of the support property. * */ public double getSupport() { return support; } /** * Sets the value of the support property. * */ public SequenceRule setSupport(double support) { this.support = support; return this; } /** * Gets the value of the confidence property. * */ public double getConfidence() { return confidence; } /** * Sets the value of the confidence property. * */ public SequenceRule setConfidence(double confidence) { this.confidence = confidence; return this; } /** * Gets the value of the lift property. * * @return * possible object is * {@link Double } * */ public Double getLift() { return lift; } /** * Sets the value of the lift property. * * @param lift * allowed object is * {@link Double } * */ public SequenceRule setLift(Double lift) { this.lift = lift; return this; } /** * Gets the rest of the content model. * *

* You are getting this "catch-all" property because of the following reason: * The field name "Time" is used by two different parts of a schema. See: * line 2649 of file:/home/vfed/Workspace/jpmml-model/target/checkout/pmml-model/target/transformed-jaxb-schema/pmml.xsd * line 2647 of file:/home/vfed/Workspace/jpmml-model/target/checkout/pmml-model/target/transformed-jaxb-schema/pmml.xsd *

* To get rid of this property, apply a property customization to one * of both of the following declarations to change their names: * Gets the value of the content 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 content property. * *

* For example, to add a new item, do as follows: *

     *    getContent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Element } * {@link ConsequentSequence } * {@link Delimiter } * {@link Extension } * {@link AntecedentSequence } * {@link Object } * {@link Time } * * */ public List getContent() { if (content == null) { content = new ArrayList(); } return this.content; } public boolean hasContent() { return ((this.content!= null)&&(this.content.size()> 0)); } public SequenceRule addContent(Object... content) { getContent().addAll(Arrays.asList(content)); return this; } @Override public VisitorAction accept(Visitor visitor) { VisitorAction status = visitor.visit(this); if (status == VisitorAction.CONTINUE) { visitor.pushParent(this); if ((status == VisitorAction.CONTINUE)&&hasContent()) { status = PMMLObject.traverseMixed(visitor, getContent()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } }