org.dmg.pmml.MatCell Maven / Gradle / Ivy
package org.dmg.pmml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import com.sun.xml.bind.Locatable;
import com.sun.xml.bind.annotation.XmlLocation;
import org.xml.sax.Locator;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="row" use="required" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* <attribute name="col" use="required" type="{http://www.dmg.org/PMML-4_2}INT-NUMBER" />
* </extension>
* </simpleContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
@XmlRootElement(name = "MatCell")
public class MatCell
extends PMMLObject
implements Locatable
{
@XmlValue
protected String value;
@XmlAttribute(name = "row", required = true)
protected int row;
@XmlAttribute(name = "col", required = true)
protected int col;
@XmlLocation
@XmlTransient
protected Locator locator;
public MatCell() {
super();
}
public MatCell(final String value, final int row, final int col) {
super();
this.value = value;
this.row = row;
this.col = col;
}
/**
* 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 void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the row property.
*
*/
public int getRow() {
return row;
}
/**
* Sets the value of the row property.
*
*/
public void setRow(int value) {
this.row = value;
}
/**
* Gets the value of the col property.
*
*/
public int getCol() {
return col;
}
/**
* Sets the value of the col property.
*
*/
public void setCol(int value) {
this.col = value;
}
public MatCell withValue(String value) {
setValue(value);
return this;
}
public MatCell withRow(int value) {
setRow(value);
return this;
}
public MatCell withCol(int value) {
setCol(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);
if (status == VisitorAction.TERMINATE) {
return VisitorAction.TERMINATE;
}
return VisitorAction.CONTINUE;
}
}