Skip to content
JobSummary.java 14.5 KiB
Newer Older
Sara Bertocco's avatar
Sara Bertocco committed
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2020.10.24 at 09:39:16 AM CEST 
//


package net.ivoa.xml.uws.v1;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import it.inaf.oats.vospace.datamodel.JobInfoDeserializer;
import it.inaf.oats.vospace.datamodel.JobInfoSerializer;
Sara Bertocco's avatar
Sara Bertocco committed
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
Sara Bertocco's avatar
Sara Bertocco committed
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
Sara Bertocco's avatar
Sara Bertocco committed
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import net.ivoa.xml.vospace.v2.Transfer;
Sara Bertocco's avatar
Sara Bertocco committed
import org.w3c.dom.Element;


/**
 * 
 *             The complete representation of the state of a job
 *          
 * 
 * <p>Java class for JobSummary complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="JobSummary">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="jobId" type="{http://www.ivoa.net/xml/UWS/v1.0}JobIdentifier"/>
 *         &lt;element name="runId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="ownerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="phase" type="{http://www.ivoa.net/xml/UWS/v1.0}ExecutionPhase"/>
 *         &lt;element name="quote" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         &lt;element name="creationTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         &lt;element name="startTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         &lt;element name="endTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         &lt;element name="executionDuration" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="destruction" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         &lt;element ref="{http://www.ivoa.net/xml/UWS/v1.0}parameters" minOccurs="0"/>
 *         &lt;element ref="{http://www.ivoa.net/xml/UWS/v1.0}results"/>
 *         &lt;element name="errorSummary" type="{http://www.ivoa.net/xml/UWS/v1.0}ErrorSummary" minOccurs="0"/>
 *         &lt;element name="jobInfo" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *       &lt;/sequence>
 *       &lt;attribute name="version" type="{http://www.ivoa.net/xml/UWS/v1.0}UWSVersion" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "JobSummary", propOrder = {
    "jobId",
    "runId",
    "ownerId",
    "phase",
    "quote",
    "creationTime",
    "startTime",
    "endTime",
    "executionDuration",
    "destruction",
    "parameters",
    "results",
    "errorSummary",
    "jobInfo"
})
@XmlSeeAlso({Transfer.class}) // Necessary for setting a Transfer inside the jobInfo property.
@XmlRootElement(name = "job")
@JsonIgnoreProperties(ignoreUnknown = true)
Sara Bertocco's avatar
Sara Bertocco committed
public class JobSummary {

    @XmlElement(required = true)
    protected String jobId;
    protected String runId;
    @XmlElement(required = true, nillable = true)
    protected String ownerId;
    @XmlElement(required = true)
    @XmlSchemaType(name = "string")
    protected ExecutionPhase phase;
    // <edit>
    protected XMLGregorianCalendar quote;
    // </edit>
Sara Bertocco's avatar
Sara Bertocco committed
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar creationTime;
    @XmlElement(required = true, nillable = true)
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar startTime;
    @XmlElement(required = true, nillable = true)
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar endTime;
    protected int executionDuration;
    @XmlElement(required = true, nillable = true)
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar destruction;
    protected Parameters parameters;
    // <edit>: replaced Results with List<ResultReference>
    @XmlElement(name = "result")
    @XmlElementWrapper(name = "results", required = true)
    protected List<ResultReference> results;
    // </edit>
Sara Bertocco's avatar
Sara Bertocco committed
    protected ErrorSummary errorSummary;
    protected JobSummary.JobInfo jobInfo;
    @XmlAttribute(name = "version")
    protected String version;

    /**
     * Gets the value of the jobId property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getJobId() {
        return jobId;
    }

    /**
     * Sets the value of the jobId property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setJobId(String value) {
        this.jobId = value;
    }

    /**
     * Gets the value of the runId property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getRunId() {
        return runId;
    }

    /**
     * Sets the value of the runId property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setRunId(String value) {
        this.runId = value;
    }

    /**
     * Gets the value of the ownerId property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getOwnerId() {
        return ownerId;
    }

    /**
     * Sets the value of the ownerId property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setOwnerId(String value) {
        this.ownerId = value;
    }

    /**
     * Gets the value of the phase property.
     * 
     * @return
     *     possible object is
     *     {@link ExecutionPhase }
     *     
     */
    public ExecutionPhase getPhase() {
        return phase;
    }

    /**
     * Sets the value of the phase property.
     * 
     * @param value
     *     allowed object is
     *     {@link ExecutionPhase }
     *     
     */
    public void setPhase(ExecutionPhase value) {
        this.phase = value;
    }

    /**
     * Gets the value of the quote property.
     * 
     * @return
     *     possible object is
     *     {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
     *     
     */
    // <edit>
    public XMLGregorianCalendar getQuote() {
Sara Bertocco's avatar
Sara Bertocco committed
        return quote;
    }

    /**
     * Sets the value of the quote property.
     * 
     * @param value
     *     allowed object is
     *     {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
     *     
     */
    public void setQuote(XMLGregorianCalendar value) {
Sara Bertocco's avatar
Sara Bertocco committed
        this.quote = value;
    }
    // </edit>
Sara Bertocco's avatar
Sara Bertocco committed

    /**
     * Gets the value of the creationTime property.
     * 
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public XMLGregorianCalendar getCreationTime() {
        return creationTime;
    }

    /**
     * Sets the value of the creationTime property.
     * 
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public void setCreationTime(XMLGregorianCalendar value) {
        this.creationTime = value;
    }

    /**
     * Gets the value of the startTime property.
     * 
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public XMLGregorianCalendar getStartTime() {
        return startTime;
    }

    /**
     * Sets the value of the startTime property.
     * 
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public void setStartTime(XMLGregorianCalendar value) {
        this.startTime = value;
    }

    /**
     * Gets the value of the endTime property.
     * 
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public XMLGregorianCalendar getEndTime() {
        return endTime;
    }

    /**
     * Sets the value of the endTime property.
     * 
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public void setEndTime(XMLGregorianCalendar value) {
        this.endTime = value;
    }

    /**
     * Gets the value of the executionDuration property.
     * 
     */
    public int getExecutionDuration() {
        return executionDuration;
    }

    /**
     * Sets the value of the executionDuration property.
     * 
     */
    public void setExecutionDuration(int value) {
        this.executionDuration = value;
    }

    /**
     * Gets the value of the destruction property.
     * 
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public XMLGregorianCalendar getDestruction() {
        return destruction;
    }

    /**
     * Sets the value of the destruction property.
     * 
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *     
     */
    public void setDestruction(XMLGregorianCalendar value) {
        this.destruction = value;
    }

    /**
     * 
     *                   The parameters to the job (where appropriate) can also
     *                   be retrieved at /{jobs}/{job-id}/parameters
     *                
     * 
     * @return
     *     possible object is
     *     {@link Parameters }
     *     
     */
    public Parameters getParameters() {
        return parameters;
    }

    /**
     * Sets the value of the parameters property.
     * 
     * @param value
     *     allowed object is
     *     {@link Parameters }
     *     
     */
    public void setParameters(Parameters value) {
        this.parameters = value;
    }

    /**
     * 
     *                   The results for the job - can also be retrieved at
     *                   /{jobs}/{job-id}/results
     *                
     * 
     * @return
     *     possible object is
     *     {@link Results }
     *     
     */
    // <edit>
    public List<ResultReference> getResults() {
        if (results == null) {
            results = new ArrayList<>();
        }
Sara Bertocco's avatar
Sara Bertocco committed
        return results;
    }

    public void setResults(List<ResultReference> value) {
Sara Bertocco's avatar
Sara Bertocco committed
        this.results = value;
    }
    // </edit>
Sara Bertocco's avatar
Sara Bertocco committed

    /**
     * Gets the value of the errorSummary property.
     * 
     * @return
     *     possible object is
     *     {@link ErrorSummary }
     *     
     */
    public ErrorSummary getErrorSummary() {
        return errorSummary;
    }

    /**
     * Sets the value of the errorSummary property.
     * 
     * @param value
     *     allowed object is
     *     {@link ErrorSummary }
     *     
     */
    public void setErrorSummary(ErrorSummary value) {
        this.errorSummary = value;
    }

    /**
     * Gets the value of the jobInfo property.
     * 
     * @return
     *     possible object is
     *     {@link JobSummary.JobInfo }
     *     
     */
    public JobSummary.JobInfo getJobInfo() {
        return jobInfo;
    }

    /**
     * Sets the value of the jobInfo property.
     * 
     * @param value
     *     allowed object is
     *     {@link JobSummary.JobInfo }
     *     
     */
    public void setJobInfo(JobSummary.JobInfo value) {
        this.jobInfo = value;
    }

    /**
     * Gets the value of the version property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getVersion() {
        return version;
    }

    /**
     * Sets the value of the version property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setVersion(String value) {
        this.version = value;
    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "any"
    })
    @JsonSerialize(using = JobInfoSerializer.class)
    @JsonDeserialize(using = JobInfoDeserializer.class)
Sara Bertocco's avatar
Sara Bertocco committed
    public static class JobInfo {

        @XmlAnyElement(lax = true)
        protected List<Object> any;

        /**
         * Gets the value of the any property.
         * 
         * <p>
         * 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 <CODE>set</CODE> method for the any property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getAny().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link Object }
         * {@link Element }
         * 
         * 
         */
        public List<Object> getAny() {
            if (any == null) {
                any = new ArrayList<Object>();
            }
            return this.any;
        }

    }

}