Clover icon

Coverage Report

  1. Project Clover database Mon Nov 11 2024 15:05:32 GMT
  2. Package jalview.ws.jws1

File WSJob.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

4
13
13
1
150
61
15
1.15
1
13
1.15

Classes

Class Line # Actions
WSJob 25 13 15
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.ws.jws1;
22   
23    import jalview.ws.AWsJob;
24   
 
25    abstract class WSJob extends AWsJob
26    {
27    /*
28    * (non-Javadoc)
29    *
30    * @see jalview.ws.AWsJob#clearResponse()
31    */
 
32  0 toggle @Override
33    public void clearResponse()
34    {
35  0 result = null;
36    }
37   
38    /*
39    * (non-Javadoc)
40    *
41    * @see jalview.ws.AWsJob#hasResponse()
42    */
 
43  0 toggle @Override
44    public boolean hasResponse()
45    {
46  0 return result != null;
47    }
48   
49    /*
50    * (non-Javadoc)
51    *
52    * @see jalview.ws.AWsJob#hasStatus()
53    */
 
54  0 toggle @Override
55    public boolean hasStatus()
56    {
57  0 return result != null && result.getStatus() != null;
58    }
59   
60    /**
61    * The last result object returned by the service.
62    */
63    vamsas.objects.simple.Result result;
64   
65    /**
66    * @return
67    * @see vamsas.objects.simple.Result#getStatus()
68    */
 
69  0 toggle public String getStatus()
70    {
71  0 return result == null ? null : result.getStatus();
72    }
73   
 
74  0 toggle public String getState()
75    {
76  0 return result == null ? "NULL result" : "" + result.getState();
77    }
78   
79    /**
80    * @return
81    * @see vamsas.objects.simple.Result#isBroken()
82    */
 
83  0 toggle public boolean isBroken()
84    {
85  0 return result != null && result.isBroken();
86    }
87   
88    /**
89    * @return
90    * @see vamsas.objects.simple.Result#isFailed()
91    */
 
92  0 toggle public boolean isFailed()
93    {
94  0 return result != null && result.isFailed();
95    }
96   
97    /**
98    * @return
99    * @see vamsas.objects.simple.Result#isFinished()
100    */
 
101  0 toggle public boolean isFinished()
102    {
103  0 return result != null && result.isFinished();
104    }
105   
106    /**
107    * @return
108    * @see vamsas.objects.simple.Result#isInvalid()
109    */
 
110  0 toggle public boolean isInvalid()
111    {
112  0 return result != null && result.isInvalid();
113    }
114   
115    /**
116    * @return
117    * @see vamsas.objects.simple.Result#isJobFailed()
118    */
 
119  0 toggle public boolean isJobFailed()
120    {
121  0 return result != null && result.isJobFailed();
122    }
123   
124    /**
125    * @return
126    * @see vamsas.objects.simple.Result#isQueued()
127    */
 
128  0 toggle public boolean isQueued()
129    {
130  0 return result != null && result.isQueued();
131    }
132   
133    /**
134    * @return
135    * @see vamsas.objects.simple.Result#isRunning()
136    */
 
137  0 toggle public boolean isRunning()
138    {
139  0 return result != null && result.isRunning();
140    }
141   
142    /**
143    * @return
144    * @see vamsas.objects.simple.Result#isServerError()
145    */
 
146  0 toggle public boolean isServerError()
147    {
148  0 return result != null && result.isServerError();
149    }
150    }