
org.dmg.pmml.general_regression.PCovCell Maven / Gradle / Ivy
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 org.dmg.pmml.Extension;
import org.dmg.pmml.HasExtensions;
import org.dmg.pmml.Visitor;
import org.dmg.pmml.VisitorAction;
/**
* 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="pRow" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="pCol" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="tRow" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="tCol" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="value" use="required" type="{http://www.dmg.org/PMML-4_3}REAL-NUMBER" />
* <attribute name="targetCategory" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions"
})
@XmlRootElement(name = "PCovCell", namespace = "http://www.dmg.org/PMML-4_3")
public class PCovCell
extends org.dmg.pmml.PMMLObject
implements HasExtensions
{
@XmlAttribute(name = "pRow", required = true)
private String pRow;
@XmlAttribute(name = "pCol", required = true)
private String pCol;
@XmlAttribute(name = "tRow")
private String tRow;
@XmlAttribute(name = "tCol")
private String tCol;
@XmlAttribute(name = "value", required = true)
private double value;
@XmlAttribute(name = "targetCategory")
private String targetCategory;
@XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3")
private List extensions;
public PCovCell() {
super();
}
public PCovCell(final String pRow, final String pCol, final double value) {
super();
this.pRow = pRow;
this.pCol = pCol;
this.value = value;
}
/**
* Gets the value of the pRow property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPRow() {
return pRow;
}
/**
* Sets the value of the pRow property.
*
* @param pRow
* allowed object is
* {@link String }
*
*/
public PCovCell setPRow(String pRow) {
this.pRow = pRow;
return this;
}
/**
* Gets the value of the pCol property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPCol() {
return pCol;
}
/**
* Sets the value of the pCol property.
*
* @param pCol
* allowed object is
* {@link String }
*
*/
public PCovCell setPCol(String pCol) {
this.pCol = pCol;
return this;
}
/**
* Gets the value of the tRow property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTRow() {
return tRow;
}
/**
* Sets the value of the tRow property.
*
* @param tRow
* allowed object is
* {@link String }
*
*/
public PCovCell setTRow(String tRow) {
this.tRow = tRow;
return this;
}
/**
* Gets the value of the tCol property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTCol() {
return tCol;
}
/**
* Sets the value of the tCol property.
*
* @param tCol
* allowed object is
* {@link String }
*
*/
public PCovCell setTCol(String tCol) {
this.tCol = tCol;
return this;
}
/**
* Gets the value of the value property.
*
*/
public double getValue() {
return value;
}
/**
* Sets the value of the value property.
*
*/
public PCovCell setValue(double value) {
this.value = value;
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 PCovCell 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;
}
public boolean hasExtensions() {
return ((this.extensions!= null)&&(this.extensions.size()> 0));
}
public PCovCell 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;
}
}