org.dmg.pmml.BinarySimilarity Maven / Gradle / Ivy
package org.dmg.pmml;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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 com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonRootName;
import org.dmg.pmml.adapters.NumberAdapter;
import org.jpmml.model.annotations.ValueConstructor;
@XmlRootElement(name = "binarySimilarity", namespace = "http://www.dmg.org/PMML-4_4")
@XmlType(name = "", propOrder = {
"extensions"
})
@JsonRootName("binarySimilarity")
@JsonPropertyOrder({
"c00Parameter",
"c01Parameter",
"c10Parameter",
"c11Parameter",
"d00Parameter",
"d01Parameter",
"d10Parameter",
"d11Parameter",
"extensions"
})
public class BinarySimilarity
extends Similarity
implements HasExtensions
{
@XmlAttribute(name = "c00-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("c00-parameter")
private Number c00Parameter;
@XmlAttribute(name = "c01-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("c01-parameter")
private Number c01Parameter;
@XmlAttribute(name = "c10-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("c10-parameter")
private Number c10Parameter;
@XmlAttribute(name = "c11-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("c11-parameter")
private Number c11Parameter;
@XmlAttribute(name = "d00-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("d00-parameter")
private Number d00Parameter;
@XmlAttribute(name = "d01-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("d01-parameter")
private Number d01Parameter;
@XmlAttribute(name = "d10-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("d10-parameter")
private Number d10Parameter;
@XmlAttribute(name = "d11-parameter", required = true)
@XmlJavaTypeAdapter(NumberAdapter.class)
@JsonProperty("d11-parameter")
private Number d11Parameter;
@XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_4")
@JsonProperty("Extension")
private List extensions;
private final static long serialVersionUID = 67371267L;
public BinarySimilarity() {
}
@ValueConstructor
public BinarySimilarity(
@org.jpmml.model.annotations.Property("c00Parameter")
Number c00Parameter,
@org.jpmml.model.annotations.Property("c01Parameter")
Number c01Parameter,
@org.jpmml.model.annotations.Property("c10Parameter")
Number c10Parameter,
@org.jpmml.model.annotations.Property("c11Parameter")
Number c11Parameter,
@org.jpmml.model.annotations.Property("d00Parameter")
Number d00Parameter,
@org.jpmml.model.annotations.Property("d01Parameter")
Number d01Parameter,
@org.jpmml.model.annotations.Property("d10Parameter")
Number d10Parameter,
@org.jpmml.model.annotations.Property("d11Parameter")
Number d11Parameter) {
this.c00Parameter = c00Parameter;
this.c01Parameter = c01Parameter;
this.c10Parameter = c10Parameter;
this.c11Parameter = c11Parameter;
this.d00Parameter = d00Parameter;
this.d01Parameter = d01Parameter;
this.d10Parameter = d10Parameter;
this.d11Parameter = d11Parameter;
}
public Number getC00Parameter() {
return c00Parameter;
}
public BinarySimilarity setC00Parameter(
@org.jpmml.model.annotations.Property("c00Parameter")
Number c00Parameter) {
this.c00Parameter = c00Parameter;
return this;
}
public Number getC01Parameter() {
return c01Parameter;
}
public BinarySimilarity setC01Parameter(
@org.jpmml.model.annotations.Property("c01Parameter")
Number c01Parameter) {
this.c01Parameter = c01Parameter;
return this;
}
public Number getC10Parameter() {
return c10Parameter;
}
public BinarySimilarity setC10Parameter(
@org.jpmml.model.annotations.Property("c10Parameter")
Number c10Parameter) {
this.c10Parameter = c10Parameter;
return this;
}
public Number getC11Parameter() {
return c11Parameter;
}
public BinarySimilarity setC11Parameter(
@org.jpmml.model.annotations.Property("c11Parameter")
Number c11Parameter) {
this.c11Parameter = c11Parameter;
return this;
}
public Number getD00Parameter() {
return d00Parameter;
}
public BinarySimilarity setD00Parameter(
@org.jpmml.model.annotations.Property("d00Parameter")
Number d00Parameter) {
this.d00Parameter = d00Parameter;
return this;
}
public Number getD01Parameter() {
return d01Parameter;
}
public BinarySimilarity setD01Parameter(
@org.jpmml.model.annotations.Property("d01Parameter")
Number d01Parameter) {
this.d01Parameter = d01Parameter;
return this;
}
public Number getD10Parameter() {
return d10Parameter;
}
public BinarySimilarity setD10Parameter(
@org.jpmml.model.annotations.Property("d10Parameter")
Number d10Parameter) {
this.d10Parameter = d10Parameter;
return this;
}
public Number getD11Parameter() {
return d11Parameter;
}
public BinarySimilarity setD11Parameter(
@org.jpmml.model.annotations.Property("d11Parameter")
Number d11Parameter) {
this.d11Parameter = d11Parameter;
return this;
}
@Override
public boolean hasExtensions() {
return ((this.extensions!= null)&&(this.extensions.size()> 0));
}
@Override
public List getExtensions() {
if (extensions == null) {
extensions = new ArrayList();
}
return this.extensions;
}
@Override
public BinarySimilarity 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;
}
}