JAL-3878 Refactoring SeqAnnotationServiceCalcWorker.
[jalview.git] / src / jalview / ws2 / WSJobStatus.java
index 056decf..9172f7c 100755 (executable)
@@ -1,6 +1,5 @@
 package jalview.ws2;
 
-
 public enum WSJobStatus
 {
   /** Job has invalid parameters and cannot be started. */
@@ -14,8 +13,7 @@ public enum WSJobStatus
   /** Job is running. */
   RUNNING,
   /** Job has finished with no errors. */
-  FINISHED,
-  BROKEN,
+  FINISHED, BROKEN,
   /** Job has finished with errors. */
   FAILED,
   /** Job cannot be processed or completed due to server error. */
@@ -25,7 +23,6 @@ public enum WSJobStatus
   /** Status cannot be determined. */
   UNKNOWN;
 
-
   public boolean isSubmitted()
   {
     switch (this)
@@ -36,9 +33,9 @@ public enum WSJobStatus
     case FINISHED:
     case BROKEN:
     case FAILED:
-    case SERVER_ERROR:
     case CANCELLED:
       return true;
+    case SERVER_ERROR:
     case INVALID:
     case READY:
     default:
@@ -100,4 +97,9 @@ public enum WSJobStatus
   {
     return this == WSJobStatus.SUBMITTED || this == WSJobStatus.QUEUED;
   }
+  
+  public boolean isCompleted()
+  {
+    return this == WSJobStatus.FINISHED;
+  }
 }
\ No newline at end of file