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

org.dmg.pmml.general_regression.PPCell Maven / Gradle / Ivy

There is a newer version: 1.6.11
Show newest version

package org.dmg.pmml.general_regression;

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 javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.dmg.pmml.Extension;
import org.dmg.pmml.HasExtensions;
import org.dmg.pmml.HasValue;
import org.dmg.pmml.PMMLObject;
import org.dmg.pmml.Visitor;
import org.dmg.pmml.VisitorAction;
import org.dmg.pmml.adapters.FieldNameAdapter;


/**
 * 

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="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="predictorName" use="required" type="{http://www.dmg.org/PMML-4_3}FIELD-NAME" />
 *       <attribute name="parameterName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="targetCategory" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions" }) @XmlRootElement(name = "PPCell", namespace = "http://www.dmg.org/PMML-4_3") public class PPCell extends ParameterCell implements HasExtensions, HasValue { @XmlAttribute(name = "value", required = true) private String value; @XmlAttribute(name = "predictorName", required = true) @XmlJavaTypeAdapter(FieldNameAdapter.class) private org.dmg.pmml.FieldName predictorName; @XmlAttribute(name = "parameterName", required = true) private String parameterName; @XmlAttribute(name = "targetCategory") private String targetCategory; @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3") private List extensions; public PPCell() { super(); } public PPCell(final String value, final org.dmg.pmml.FieldName predictorName, final String parameterName) { super(); this.value = value; this.predictorName = predictorName; this.parameterName = parameterName; } /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public PPCell setValue(String value) { this.value = value; return this; } /** * Gets the value of the predictorName property. * * @return * possible object is * {@link String } * */ public org.dmg.pmml.FieldName getPredictorName() { return predictorName; } /** * Sets the value of the predictorName property. * * @param predictorName * allowed object is * {@link String } * */ public PPCell setPredictorName(org.dmg.pmml.FieldName predictorName) { this.predictorName = predictorName; return this; } /** * Gets the value of the parameterName property. * * @return * possible object is * {@link String } * */ public String getParameterName() { return parameterName; } /** * Sets the value of the parameterName property. * * @param parameterName * allowed object is * {@link String } * */ public PPCell setParameterName(String parameterName) { this.parameterName = parameterName; return this; } /** * Gets the value of the targetCategory property. * * @return * possible object is * {@link String } * */ public String getTargetCategory() { return targetCategory; } /** * Sets the value of the targetCategory property. * * @param targetCategory * allowed object is * {@link String } * */ public PPCell setTargetCategory(String targetCategory) { this.targetCategory = targetCategory; 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; } @Override public org.dmg.pmml.FieldName getField() { return getPredictorName(); } public boolean hasExtensions() { return ((this.extensions!= null)&&(this.extensions.size()> 0)); } public PPCell 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 = PMMLObject.traverse(visitor, getExtensions()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy