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

org.daisy.pipeline.client.models.Job Maven / Gradle / Ivy

There is a newer version: 5.0.1
Show newest version
package org.daisy.pipeline.client.models;

import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;

import org.daisy.pipeline.client.Pipeline2Exception;
import org.daisy.pipeline.client.Pipeline2Logger;
import org.daisy.pipeline.client.filestorage.JobStorage;
import org.daisy.pipeline.client.filestorage.JobValidator;
import org.daisy.pipeline.client.utils.Files;
import org.daisy.pipeline.client.utils.XML;
import org.daisy.pipeline.client.utils.XPath;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

/**
 * A representation of a Pipeline 2 job.
 * 
 * This represents a job both before (job request) and after (job response) it is submitted to the engine.
 */
public class Job implements Comparable {

	public enum Status { IDLE, RUNNING, SUCCESS, ERROR, FAIL };
	public enum Priority { high, medium, low };

	private String id; // @id, text, required in job, not present in jobRequest
	private String href; // @href, xsd:anyURI, required in job, not present in jobRequest
	private Status status; // @status, required in job, not present in jobRequest
	private Priority priority; // @priority, required in job, optional in jobRequest
	private Integer queuePosition; // @queue-position, xsd:int, optional in job, not present in jobRequest
	private String nicename; // nicename/text(), text, optional in both job and jobRequest
	private String description; // text, not used in job or jobRequest, but can be useful when storing jobs, for instance as templates
	private String batchId; // batchId/text(), text, optional in both job and jobRequest
	
	// script element optional for job, required (with only href) for jobRequest
	private Script script; // 
	
	private List argumentInputs; // in jobRequest:  | 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy