return succeed;\r
}\r
\r
- private <T> boolean testMsaWS(MsaWS<T> msaws)\r
- throws UnsupportedRuntimeException {\r
+ private <T> boolean testMsaWS(MsaWS<T> msaws) throws Exception {\r
assert msaws != null;\r
\r
boolean succeed = testDefaultAlignment(msaws);\r
throw new UnsupportedOperationException("The service: "\r
+ wservice.getClass() + " is not supported! ");\r
}\r
- } catch (UnsupportedRuntimeException e) {\r
+ } catch (Exception e) {\r
reportException(e);\r
return false;\r
}\r
}\r
\r
private <T> boolean testSequenceAnnotationWS(SequenceAnnotation<T> wservice)\r
- throws UnsupportedRuntimeException {\r
+ throws Exception {\r
writer.print("Calling analyse.........");\r
boolean success = testDefaultAnalyse(loadAlignment(), wservice, null,\r
null);\r
\r
private <T> boolean testDefaultAnalyse(List<FastaSequence> fastalist,\r
SequenceAnnotation<T> wsproxy, Preset<T> preset,\r
- List<Option<T>> customOptions) throws UnsupportedRuntimeException {\r
+ List<Option<T>> customOptions) throws Exception {\r
\r
ScoreManager scores = null;\r
- try {\r
- String jobId = null;\r
- if (customOptions != null) {\r
- jobId = wsproxy.customAnalize(fastalist, customOptions);\r
- } else if (preset != null) {\r
- jobId = wsproxy.presetAnalize(fastalist, preset);\r
- } else {\r
- jobId = wsproxy.analize(fastalist);\r
- }\r
- Thread.sleep(1000);\r
- scores = wsproxy.getAnnotation(jobId);\r
- if (scores != null) {\r
- writer.println(OK);\r
- }\r
- } catch (Exception e) {\r
- if (e instanceof UnsupportedRuntimeException) {\r
- throw (UnsupportedRuntimeException) e;\r
- } else {\r
- reportException(e);\r
- }\r
+\r
+ String jobId = null;\r
+ if (customOptions != null) {\r
+ jobId = wsproxy.customAnalize(fastalist, customOptions);\r
+ } else if (preset != null) {\r
+ jobId = wsproxy.presetAnalize(fastalist, preset);\r
+ } else {\r
+ jobId = wsproxy.analize(fastalist);\r
}\r
+ Thread.sleep(1000);\r
+ scores = wsproxy.getAnnotation(jobId);\r
+ if (scores != null) {\r
+ writer.println(OK);\r
+ }\r
+\r
return scores != null;\r
}\r
\r
* @param msaws\r
* @throws UnsupportedRuntimeException\r
*/\r
- private <T> boolean testDefaultAlignment(MsaWS<T> msaws)\r
- throws UnsupportedRuntimeException {\r
+ private <T> boolean testDefaultAlignment(MsaWS<T> msaws) throws Exception {\r
writer.print("Testing alignment with default parameters:");\r
Alignment al = null;\r
boolean succeed = false;\r
- try {\r
- String taskId = msaws.align(seqs);\r
- writer.print("\nQuerying job status...");\r
- JobStatus status = msaws.getJobStatus(taskId);\r
- while (status != JobStatus.FINISHED) {\r
- Thread.sleep(1000);\r
- status = msaws.getJobStatus(taskId);\r
- }\r
- writer.println(OK);\r
- writer.print("Retrieving results...");\r
- al = msaws.getResult(taskId);\r
- succeed = true;\r
- } catch (Exception e) {\r
- if (e instanceof UnsupportedRuntimeException) {\r
- throw (UnsupportedRuntimeException) e;\r
- } else {\r
- reportException(e);\r
- }\r
+\r
+ String taskId = msaws.align(seqs);\r
+ writer.print("\nQuerying job status...");\r
+ JobStatus status = msaws.getJobStatus(taskId);\r
+ while (status != JobStatus.FINISHED) {\r
+ Thread.sleep(1000);\r
+ status = msaws.getJobStatus(taskId);\r
}\r
+ writer.println(OK);\r
+ writer.print("Retrieving results...");\r
+ al = msaws.getResult(taskId);\r
+ succeed = true;\r
if (al != null) {\r
writer.println(OK);\r
}\r
writer.println("Check is completed. The Service " + serv\r
+ " IS WORKING\n");\r
} else {\r
- writer.println("Check is completed. The Service " + serv\r
+ writer.println("Check is aborted. The Service " + serv\r
+ " HAS SOME PROBLEMS\n");\r
}\r
}\r