org.dmg.pmml.Header Maven / Gradle / Ivy
package org.dmg.pmml;
import java.util.ArrayList;
import java.util.Collection;
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.XmlTransient;
import javax.xml.bind.annotation.XmlType;
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>
* <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}Application" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}Annotation" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.dmg.org/PMML-4_2}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" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"extensions",
"application",
"annotations",
"timestamp"
})
@XmlRootElement(name = "Header")
public class Header
extends PMMLObject
implements Locatable, HasExtensions
{
@XmlElement(name = "Extension")
protected List extensions;
@XmlElement(name = "Application")
protected Application application;
@XmlElement(name = "Annotation")
protected List annotations;
@XmlElement(name = "Timestamp")
protected Timestamp timestamp;
@XmlAttribute(name = "copyright")
protected String copyright;
@XmlAttribute(name = "description")
protected String description;
@XmlLocation
@XmlTransient
protected Locator locator;
/**
* 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 value
* allowed object is
* {@link Application }
*
*/
public void setApplication(Application value) {
this.application = value;
}
/**
* 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 value
* allowed object is
* {@link Timestamp }
*
*/
public void setTimestamp(Timestamp value) {
this.timestamp = value;
}
/**
* 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 value
* allowed object is
* {@link String }
*
*/
public void setCopyright(String value) {
this.copyright = value;
}
/**
* 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 value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
public Header withExtensions(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtensions().add(value);
}
}
return this;
}
public Header withExtensions(Collection values) {
if (values!= null) {
getExtensions().addAll(values);
}
return this;
}
public Header withApplication(Application value) {
setApplication(value);
return this;
}
public Header withAnnotations(Annotation... values) {
if (values!= null) {
for (Annotation value: values) {
getAnnotations().add(value);
}
}
return this;
}
public Header withAnnotations(Collection values) {
if (values!= null) {
getAnnotations().addAll(values);
}
return this;
}
public Header withTimestamp(Timestamp value) {
setTimestamp(value);
return this;
}
public Header withCopyright(String value) {
setCopyright(value);
return this;
}
public Header withDescription(String value) {
setDescription(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);
for (int i = 0; (((status == VisitorAction.CONTINUE)&&(this.extensions!= null))&&(i