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

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

There is a newer version: 1.7.2
Show newest version

package org.dmg.pmml;

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.jpmml.schema.Added;
import org.jpmml.schema.Optional;
import org.jpmml.schema.Version;


/**
 * 

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"/>
 *         <element ref="{http://www.dmg.org/PMML-4_2}FieldColumnPair" maxOccurs="unbounded" minOccurs="0"/>
 *         <choice minOccurs="0">
 *           <element ref="{http://www.dmg.org/PMML-4_2}TableLocator"/>
 *           <element ref="{http://www.dmg.org/PMML-4_2}InlineTable"/>
 *         </choice>
 *       </sequence>
 *       <attribute name="mapMissingTo" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="outputColumn" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="dataType" type="{http://www.dmg.org/PMML-4_2}DATATYPE" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions", "fieldColumnPairs", "tableLocator", "inlineTable" }) @XmlRootElement(name = "MapValues", namespace = "http://www.dmg.org/PMML-4_2") public class MapValues extends Expression implements HasExtensions { @XmlAttribute(name = "mapMissingTo") private String mapMissingTo; @XmlAttribute(name = "defaultValue") private String defaultValue; @XmlAttribute(name = "outputColumn", required = true) private String outputColumn; @XmlAttribute(name = "dataType") @Added(Version.PMML_3_1) private DataType dataType; @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_2") private List extensions; @XmlElement(name = "FieldColumnPair", namespace = "http://www.dmg.org/PMML-4_2") @Optional(Version.PMML_4_2) private List fieldColumnPairs; @XmlElement(name = "TableLocator", namespace = "http://www.dmg.org/PMML-4_2") private TableLocator tableLocator; @XmlElement(name = "InlineTable", namespace = "http://www.dmg.org/PMML-4_2") private InlineTable inlineTable; public MapValues() { super(); } public MapValues(final String outputColumn) { super(); this.outputColumn = outputColumn; } /** * Gets the value of the mapMissingTo property. * * @return * possible object is * {@link String } * */ public String getMapMissingTo() { return mapMissingTo; } /** * Sets the value of the mapMissingTo property. * * @param mapMissingTo * allowed object is * {@link String } * */ public MapValues setMapMissingTo(String mapMissingTo) { this.mapMissingTo = mapMissingTo; return this; } /** * Gets the value of the defaultValue property. * * @return * possible object is * {@link String } * */ public String getDefaultValue() { return defaultValue; } /** * Sets the value of the defaultValue property. * * @param defaultValue * allowed object is * {@link String } * */ public MapValues setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; return this; } /** * Gets the value of the outputColumn property. * * @return * possible object is * {@link String } * */ public String getOutputColumn() { return outputColumn; } /** * Sets the value of the outputColumn property. * * @param outputColumn * allowed object is * {@link String } * */ public MapValues setOutputColumn(String outputColumn) { this.outputColumn = outputColumn; return this; } /** * Gets the value of the dataType property. * * @return * possible object is * {@link DataType } * */ public DataType getDataType() { return dataType; } /** * Sets the value of the dataType property. * * @param dataType * allowed object is * {@link DataType } * */ public MapValues setDataType(DataType dataType) { this.dataType = dataType; 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; } /** * Gets the value of the fieldColumnPairs 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 fieldColumnPairs property. * *

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

     *    getFieldColumnPairs().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link FieldColumnPair } * * */ public List getFieldColumnPairs() { if (fieldColumnPairs == null) { fieldColumnPairs = new ArrayList(); } return this.fieldColumnPairs; } /** * Gets the value of the tableLocator property. * * @return * possible object is * {@link TableLocator } * */ public TableLocator getTableLocator() { return tableLocator; } /** * Sets the value of the tableLocator property. * * @param tableLocator * allowed object is * {@link TableLocator } * */ public MapValues setTableLocator(TableLocator tableLocator) { this.tableLocator = tableLocator; return this; } /** * Gets the value of the inlineTable property. * * @return * possible object is * {@link InlineTable } * */ public InlineTable getInlineTable() { return inlineTable; } /** * Sets the value of the inlineTable property. * * @param inlineTable * allowed object is * {@link InlineTable } * */ public MapValues setInlineTable(InlineTable inlineTable) { this.inlineTable = inlineTable; return this; } public boolean hasExtensions() { return ((this.extensions!= null)&&(this.extensions.size()> 0)); } public MapValues addExtensions(Extension... extensions) { getExtensions().addAll(Arrays.asList(extensions)); return this; } public boolean hasFieldColumnPairs() { return ((this.fieldColumnPairs!= null)&&(this.fieldColumnPairs.size()> 0)); } public MapValues addFieldColumnPairs(FieldColumnPair... fieldColumnPairs) { getFieldColumnPairs().addAll(Arrays.asList(fieldColumnPairs)); 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()); } if ((status == VisitorAction.CONTINUE)&&hasFieldColumnPairs()) { status = PMMLObject.traverse(visitor, getFieldColumnPairs()); } if (status == VisitorAction.CONTINUE) { status = PMMLObject.traverse(visitor, getTableLocator(), getInlineTable()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy