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

org.dmg.pmml.Node Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version

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.XmlElements;
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"/>
 *         <group ref="{http://www.dmg.org/PMML-4_2}PREDICATE"/>
 *         <choice>
 *           <sequence>
 *             <element ref="{http://www.dmg.org/PMML-4_2}Partition" minOccurs="0"/>
 *             <element ref="{http://www.dmg.org/PMML-4_2}ScoreDistribution" maxOccurs="unbounded" minOccurs="0"/>
 *             <element ref="{http://www.dmg.org/PMML-4_2}Node" maxOccurs="unbounded" minOccurs="0"/>
 *           </sequence>
 *           <group ref="{http://www.dmg.org/PMML-4_2}EmbeddedModel"/>
 *         </choice>
 *       </sequence>
 *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="score" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="recordCount" type="{http://www.dmg.org/PMML-4_2}NUMBER" />
 *       <attribute name="defaultChild" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions", "predicate", "partition", "scoreDistributions", "nodes", "embeddedModel" }) @XmlRootElement(name = "Node") public class Node extends Entity implements Locatable, HasExtensions, HasId { @XmlElement(name = "Extension") protected List extensions; @XmlElements({ @XmlElement(name = "SimplePredicate", type = SimplePredicate.class), @XmlElement(name = "CompoundPredicate", type = CompoundPredicate.class), @XmlElement(name = "SimpleSetPredicate", type = SimpleSetPredicate.class), @XmlElement(name = "True", type = True.class), @XmlElement(name = "False", type = False.class) }) protected Predicate predicate; @XmlElement(name = "Partition") protected Partition partition; @XmlElement(name = "ScoreDistribution") protected List scoreDistributions; @XmlElement(name = "Node") protected List nodes; @XmlElements({ @XmlElement(name = "Regression", type = Regression.class), @XmlElement(name = "DecisionTree", type = DecisionTree.class) }) protected EmbeddedModel embeddedModel; @XmlAttribute(name = "id") protected String id; @XmlAttribute(name = "score") protected String score; @XmlAttribute(name = "recordCount") protected Double recordCount; @XmlAttribute(name = "defaultChild") @Added(Version.PMML_3_1) protected String defaultChild; @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 predicate property. * * @return * possible object is * {@link SimplePredicate } * {@link CompoundPredicate } * {@link SimpleSetPredicate } * {@link True } * {@link False } * */ public Predicate getPredicate() { return predicate; } /** * Sets the value of the predicate property. * * @param value * allowed object is * {@link SimplePredicate } * {@link CompoundPredicate } * {@link SimpleSetPredicate } * {@link True } * {@link False } * */ public void setPredicate(Predicate value) { this.predicate = value; } /** * Gets the value of the partition property. * * @return * possible object is * {@link Partition } * */ public Partition getPartition() { return partition; } /** * Sets the value of the partition property. * * @param value * allowed object is * {@link Partition } * */ public void setPartition(Partition value) { this.partition = value; } /** * Gets the value of the scoreDistributions 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 scoreDistributions property. * *

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

     *    getScoreDistributions().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ScoreDistribution } * * */ public List getScoreDistributions() { if (scoreDistributions == null) { scoreDistributions = new ArrayList(); } return this.scoreDistributions; } /** * Gets the value of the nodes 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 nodes property. * *

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

     *    getNodes().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Node } * * */ public List getNodes() { if (nodes == null) { nodes = new ArrayList(); } return this.nodes; } /** * Gets the value of the embeddedModel property. * * @return * possible object is * {@link Regression } * {@link DecisionTree } * */ public EmbeddedModel getEmbeddedModel() { return embeddedModel; } /** * Sets the value of the embeddedModel property. * * @param value * allowed object is * {@link Regression } * {@link DecisionTree } * */ public void setEmbeddedModel(EmbeddedModel value) { this.embeddedModel = value; } /** * 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 value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the score property. * * @return * possible object is * {@link String } * */ public String getScore() { return score; } /** * Sets the value of the score property. * * @param value * allowed object is * {@link String } * */ public void setScore(String value) { this.score = value; } /** * Gets the value of the recordCount property. * * @return * possible object is * {@link Double } * */ public Double getRecordCount() { return recordCount; } /** * Sets the value of the recordCount property. * * @param value * allowed object is * {@link Double } * */ public void setRecordCount(Double value) { this.recordCount = value; } /** * Gets the value of the defaultChild property. * * @return * possible object is * {@link String } * */ public String getDefaultChild() { return defaultChild; } /** * Sets the value of the defaultChild property. * * @param value * allowed object is * {@link String } * */ public void setDefaultChild(String value) { this.defaultChild = value; } public Node withExtensions(Extension... values) { if (values!= null) { for (Extension value: values) { getExtensions().add(value); } } return this; } public Node withExtensions(Collection values) { if (values!= null) { getExtensions().addAll(values); } return this; } public Node withPredicate(Predicate value) { setPredicate(value); return this; } public Node withPartition(Partition value) { setPartition(value); return this; } public Node withScoreDistributions(ScoreDistribution... values) { if (values!= null) { for (ScoreDistribution value: values) { getScoreDistributions().add(value); } } return this; } public Node withScoreDistributions(Collection values) { if (values!= null) { getScoreDistributions().addAll(values); } return this; } public Node withNodes(Node... values) { if (values!= null) { for (Node value: values) { getNodes().add(value); } } return this; } public Node withNodes(Collection values) { if (values!= null) { getNodes().addAll(values); } return this; } public Node withEmbeddedModel(EmbeddedModel value) { setEmbeddedModel(value); return this; } public Node withId(String value) { setId(value); return this; } public Node withScore(String value) { setScore(value); return this; } public Node withRecordCount(Double value) { setRecordCount(value); return this; } public Node withDefaultChild(String value) { setDefaultChild(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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy