--- /dev/null
+package jalview.ws.api;
+
+import java.time.Instant;
+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;
+
+ private Instant creationTime;
+
+ public JobId(String serviceType, String serviceImpl, String id)
+ {
+ this.serviceType = serviceType;
+ this.serviceImpl = serviceImpl;
+ jobId = id;
+ creationTime = Instant.now();
+ }
+
+ @Override
+ public String toString()
+ {
+ return "" + serviceType + ":" + serviceImpl + ":" + jobId + "\nCreated "
+ + Date.from(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 Instant getCreationTime()
+ {
+ return creationTime;
+ }
+}