package jalview.ws.api; import java.util.Date; public class JobId { // TODO: JobId could include sequenceI anonymisation stuff // TODO: getProgress() -> input stream to log file for job. private String serviceType; private String serviceImpl; private String jobId; // TODO: java2script instant private String creationTime=null; public JobId(String serviceType, String serviceImpl, String id) { this.serviceType = serviceType; this.serviceImpl = serviceImpl; jobId = id; /* * @j2sIgnore */ { // creationTime = Date.from(Instant.now()).toString(); } if (creationTime==null) { creationTime = new Date().toString(); // j2s only } } @Override public String toString() { return "" + serviceType + ":" + serviceImpl + ":" + jobId + "\nCreated " + creationTime; } /** * a stringified version of the Job Id that can be saved in project. */ public String getURI() { return jobId; } public String getServiceType() { return serviceType; } public String getServiceImpl() { return serviceImpl; } public String getJobId() { return jobId; } public String getCreationTime() { return creationTime; } }