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