1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ws.jws1; |
22 |
|
|
23 |
|
import jalview.gui.AlignFrame; |
24 |
|
import jalview.gui.WebserviceInfo; |
25 |
|
import jalview.util.MessageManager; |
26 |
|
import jalview.ws.WSClient; |
27 |
|
import jalview.ws.WSMenuEntryProviderI; |
28 |
|
|
29 |
|
import javax.swing.JMenu; |
30 |
|
|
31 |
|
import ext.vamsas.ServiceHandle; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@author |
37 |
|
|
38 |
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 7 |
Complexity Density: 0.47 |
|
39 |
|
public abstract class WS1Client extends WSClient |
40 |
|
implements WSMenuEntryProviderI |
41 |
|
{ |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
ServiceHandle serviceHandle = null; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
51 |
0 |
public WS1Client()... |
52 |
|
{ |
53 |
0 |
super(); |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
@param |
60 |
|
@return |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0 |
protected WebserviceInfo setWebService(ServiceHandle sh)... |
63 |
|
{ |
64 |
0 |
return setWebService(sh, false); |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
@param |
71 |
|
@param |
72 |
|
|
73 |
|
@return |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 3 |
Complexity Density: 0.3 |
|
75 |
0 |
protected WebserviceInfo setWebService(ServiceHandle sh, boolean headless)... |
76 |
|
{ |
77 |
0 |
WebServiceName = sh.getName(); |
78 |
0 |
if (ServiceActions.containsKey(sh.getAbstractName())) |
79 |
|
{ |
80 |
0 |
WebServiceJobTitle = sh.getName(); |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
} |
85 |
|
else |
86 |
|
{ |
87 |
0 |
WebServiceJobTitle = sh.getAbstractName() + " using " + sh.getName(); |
88 |
|
|
89 |
|
} |
90 |
0 |
WebServiceReference = sh.getDescription(); |
91 |
0 |
WsURL = sh.getEndpointURL(); |
92 |
0 |
WebserviceInfo wsInfo = null; |
93 |
0 |
if (!headless) |
94 |
|
{ |
95 |
0 |
wsInfo = new WebserviceInfo(WebServiceJobTitle, WebServiceReference, |
96 |
|
true); |
97 |
|
} |
98 |
0 |
return wsInfo; |
99 |
|
} |
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
@param |
106 |
|
|
107 |
|
@param |
108 |
|
|
109 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
110 |
0 |
public void attachWSMenuEntry(JMenu wsmenu, final AlignFrame alignFrame)... |
111 |
|
{ |
112 |
0 |
if (serviceHandle == null) |
113 |
|
{ |
114 |
0 |
throw new Error(MessageManager.getString( |
115 |
|
"error.implementation_error_cannot_attach_ws_menu_entry")); |
116 |
|
} |
117 |
0 |
attachWSMenuEntry(wsmenu, serviceHandle, alignFrame); |
118 |
|
} |
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
@param |
125 |
|
|
126 |
|
@param |
127 |
|
|
128 |
|
|
129 |
|
@param |
130 |
|
|
131 |
|
public abstract void attachWSMenuEntry(JMenu wsmenu, |
132 |
|
final ServiceHandle serviceHandle, final AlignFrame alignFrame); |
133 |
|
|
134 |
|
} |