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

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


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_3}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Application" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Annotation" maxOccurs="unbounded" minOccurs="0"/>
 *         <element ref="{http://www.dmg.org/PMML-4_3}Timestamp" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="copyright" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="modelVersion" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "extensions", "application", "annotations", "timestamp" }) @XmlRootElement(name = "Header", namespace = "http://www.dmg.org/PMML-4_3") public class Header extends org.dmg.pmml.PMMLObject implements HasExtensions { @XmlAttribute(name = "copyright") @Optional(Version.PMML_4_1) private String copyright; @XmlAttribute(name = "description") private String description; @XmlAttribute(name = "modelVersion") @Added(Version.PMML_4_3) private String modelVersion; @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_3") private List extensions; @XmlElement(name = "Application", namespace = "http://www.dmg.org/PMML-4_3") private Application application; @XmlElement(name = "Annotation", namespace = "http://www.dmg.org/PMML-4_3") private List annotations; @XmlElement(name = "Timestamp", namespace = "http://www.dmg.org/PMML-4_3") private Timestamp timestamp; /** * Gets the value of the copyright property. * * @return * possible object is * {@link String } * */ public String getCopyright() { return copyright; } /** * Sets the value of the copyright property. * * @param copyright * allowed object is * {@link String } * */ public Header setCopyright(String copyright) { this.copyright = copyright; return this; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param description * allowed object is * {@link String } * */ public Header setDescription(String description) { this.description = description; return this; } /** * Gets the value of the modelVersion property. * * @return * possible object is * {@link String } * */ public String getModelVersion() { return modelVersion; } /** * Sets the value of the modelVersion property. * * @param modelVersion * allowed object is * {@link String } * */ public Header setModelVersion(String modelVersion) { this.modelVersion = modelVersion; 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 application property. * * @return * possible object is * {@link Application } * */ public Application getApplication() { return application; } /** * Sets the value of the application property. * * @param application * allowed object is * {@link Application } * */ public Header setApplication(Application application) { this.application = application; return this; } /** * Gets the value of the annotations 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 annotations property. * *

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

     *    getAnnotations().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Annotation } * * */ public List getAnnotations() { if (annotations == null) { annotations = new ArrayList(); } return this.annotations; } /** * Gets the value of the timestamp property. * * @return * possible object is * {@link Timestamp } * */ public Timestamp getTimestamp() { return timestamp; } /** * Sets the value of the timestamp property. * * @param timestamp * allowed object is * {@link Timestamp } * */ public Header setTimestamp(Timestamp timestamp) { this.timestamp = timestamp; return this; } public boolean hasExtensions() { return ((this.extensions!= null)&&(this.extensions.size()> 0)); } public Header addExtensions(Extension... extensions) { getExtensions().addAll(Arrays.asList(extensions)); return this; } public boolean hasAnnotations() { return ((this.annotations!= null)&&(this.annotations.size()> 0)); } public Header addAnnotations(Annotation... annotations) { getAnnotations().addAll(Arrays.asList(annotations)); 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()); } if (status == VisitorAction.CONTINUE) { status = org.dmg.pmml.PMMLObject.traverse(visitor, getApplication()); } if ((status == VisitorAction.CONTINUE)&&hasAnnotations()) { status = org.dmg.pmml.PMMLObject.traverse(visitor, getAnnotations()); } if (status == VisitorAction.CONTINUE) { status = org.dmg.pmml.PMMLObject.traverse(visitor, getTimestamp()); } visitor.popParent(); } if (status == VisitorAction.TERMINATE) { return VisitorAction.TERMINATE; } return VisitorAction.CONTINUE; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy