| 1 |
|
package jalview.ws.api; |
| 2 |
|
|
| 3 |
|
import jalview.bin.Cache; |
| 4 |
|
import jalview.bin.Console; |
| 5 |
|
import jalview.gui.AlignFrame; |
| 6 |
|
import jalview.ws.jws2.MsaWSClient; |
| 7 |
|
import jalview.ws.jws2.SequenceAnnotationWSClient; |
| 8 |
|
import jalview.ws.params.ParamManager; |
| 9 |
|
|
| 10 |
|
import javax.swing.JMenu; |
| 11 |
|
|
| |
|
| 39.6% |
Uncovered Elements: 29 (48) |
Complexity: 22 |
Complexity Density: 1.05 |
|
| 12 |
|
public abstract class ServiceWithParameters extends UIinfo |
| 13 |
|
{ |
| 14 |
|
|
| 15 |
|
protected jalview.ws.uimodel.AlignAnalysisUIText aaui; |
| 16 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 17 |
570 |
public ServiceWithParameters(String serviceType, String action,... |
| 18 |
|
String name, String description, String hosturl) |
| 19 |
|
{ |
| 20 |
570 |
super(serviceType, action, name, description, hosturl); |
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
public abstract void initParamStore(ParamManager userParameterStore); |
| 24 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 25 |
12289 |
public jalview.ws.uimodel.AlignAnalysisUIText getAlignAnalysisUI()... |
| 26 |
|
{ |
| 27 |
12289 |
return aaui; |
| 28 |
|
} |
| 29 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 30 |
570 |
public void setAlignAnalysisUI(... |
| 31 |
|
jalview.ws.uimodel.AlignAnalysisUIText aaui) |
| 32 |
|
{ |
| 33 |
570 |
this.aaui = aaui; |
| 34 |
|
} |
| 35 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 36 |
12289 |
public boolean isInteractiveUpdate()... |
| 37 |
|
{ |
| 38 |
12289 |
return aaui != null && aaui.isAA(); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 42 |
0 |
public boolean isProteinService()... |
| 43 |
|
{ |
| 44 |
0 |
return aaui == null ? true : aaui.isPr(); |
| 45 |
|
} |
| 46 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 47 |
0 |
public boolean isNucleotideService()... |
| 48 |
|
{ |
| 49 |
0 |
return aaui == null ? false : aaui.isNa(); |
| 50 |
|
} |
| 51 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 52 |
0 |
public boolean isNeedsAlignedSequences()... |
| 53 |
|
{ |
| 54 |
0 |
return aaui == null ? false : aaui.isNeedsAlignedSeqs(); |
| 55 |
|
} |
| 56 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 57 |
0 |
public boolean isAlignmentAnalysis()... |
| 58 |
|
{ |
| 59 |
0 |
return aaui == null ? false : aaui.isAA(); |
| 60 |
|
} |
| 61 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 62 |
0 |
public boolean isFilterSymbols()... |
| 63 |
|
{ |
| 64 |
0 |
return aaui != null ? aaui.isFilterSymbols() : true; |
| 65 |
|
} |
| 66 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 67 |
0 |
public int getMinimumInputSequences()... |
| 68 |
|
{ |
| 69 |
0 |
return aaui != null ? aaui.getMinimumSequences() : 1; |
| 70 |
|
} |
| 71 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 72 |
0 |
public String getNameURI()... |
| 73 |
|
{ |
| 74 |
0 |
return "java:" + getName(); |
| 75 |
|
} |
| 76 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 77 |
1144 |
public String getUri()... |
| 78 |
|
{ |
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
1144 |
return getHostURL() |
| 83 |
1144 |
+ (getHostURL().lastIndexOf("/") == (getHostURL().length() - 1) |
| 84 |
|
? "" |
| 85 |
|
: "/") |
| 86 |
|
+ getName(); |
| 87 |
|
} |
| 88 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 89 |
|
protected enum ServiceClient |
| 90 |
|
{ |
| 91 |
|
MSAWSCLIENT, SEQUENCEANNOTATIONWSCLIENT; |
| 92 |
|
}; |
| 93 |
|
|
| 94 |
|
protected ServiceClient style = null; |
| 95 |
|
|
| |
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0.33 |
|
| 96 |
12289 |
public void attachWSMenuEntry(JMenu atpoint, AlignFrame alignFrame)... |
| 97 |
|
{ |
| 98 |
12289 |
switch (style) |
| 99 |
|
{ |
| 100 |
9141 |
case MSAWSCLIENT: |
| 101 |
9141 |
new MsaWSClient().attachWSMenuEntry(atpoint, this, alignFrame); |
| 102 |
9141 |
break; |
| 103 |
3148 |
case SEQUENCEANNOTATIONWSCLIENT: |
| 104 |
3148 |
new SequenceAnnotationWSClient().attachWSMenuEntry(atpoint, this, |
| 105 |
|
alignFrame); |
| 106 |
3148 |
break; |
| 107 |
0 |
default: |
| 108 |
0 |
Console.warn("Implementation error ? Service " + getName() |
| 109 |
|
+ " has Unknown service style " + style); |
| 110 |
|
} |
| 111 |
|
} |
| 112 |
|
} |