package jalview.ws.api;
-import java.time.Instant;
import java.util.Date;
public class JobId
private String serviceImpl;
private String jobId;
-
- private Instant creationTime;
+ // TODO: java2script instant
+ private String creationTime=null;
public JobId(String serviceType, String serviceImpl, String id)
{
this.serviceType = serviceType;
this.serviceImpl = serviceImpl;
jobId = id;
- creationTime = Instant.now();
+ /*
+ * @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 "
- + Date.from(creationTime);
+ + creationTime;
}
/**
* a stringified version of the Job Id that can be saved in project.
return jobId;
}
- public Instant getCreationTime()
+ public String getCreationTime()
{
return creationTime;
}