| 1 |
|
package jalview.ws2.actions.alignment; |
| 2 |
|
|
| 3 |
|
import java.util.List; |
| 4 |
|
import java.util.Objects; |
| 5 |
|
|
| 6 |
|
import jalview.api.AlignViewportI; |
| 7 |
|
import jalview.viewmodel.AlignmentViewport; |
| 8 |
|
import jalview.ws.params.ArgumentI; |
| 9 |
|
import jalview.ws2.actions.BaseAction; |
| 10 |
|
import jalview.ws2.actions.BaseTask; |
| 11 |
|
import jalview.ws2.actions.PollingTaskExecutor; |
| 12 |
|
import jalview.ws2.actions.api.TaskEventListener; |
| 13 |
|
import jalview.ws2.actions.api.TaskI; |
| 14 |
|
import jalview.ws2.api.Credentials; |
| 15 |
|
import jalview.ws2.client.api.AlignmentWebServiceClientI; |
| 16 |
|
|
| 17 |
|
|
| 18 |
|
@link |
| 19 |
|
@link |
| 20 |
|
|
| 21 |
|
|
| 22 |
|
@author |
| 23 |
|
|
| 24 |
|
|
| |
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 25 |
|
public class AlignmentAction extends BaseAction<AlignmentResult> |
| 26 |
|
{ |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
@author |
| 32 |
|
|
| |
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 33 |
|
public static class Builder extends BaseAction.Builder<AlignmentAction> |
| 34 |
|
{ |
| 35 |
|
protected AlignmentWebServiceClientI client; |
| 36 |
|
|
| 37 |
|
protected boolean submitGaps = false; |
| 38 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 39 |
0 |
public Builder(AlignmentWebServiceClientI client)... |
| 40 |
|
{ |
| 41 |
0 |
super(); |
| 42 |
0 |
Objects.requireNonNull(client); |
| 43 |
0 |
this.client = client; |
| 44 |
|
} |
| 45 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 46 |
0 |
public void submitGaps(boolean val)... |
| 47 |
|
{ |
| 48 |
0 |
submitGaps = val; |
| 49 |
|
} |
| 50 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 51 |
0 |
public AlignmentAction build()... |
| 52 |
|
{ |
| 53 |
0 |
return new AlignmentAction(this); |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 57 |
0 |
public static Builder newBuilder(AlignmentWebServiceClientI client)... |
| 58 |
|
{ |
| 59 |
0 |
return new Builder(client); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
protected final boolean submitGaps; |
| 63 |
|
|
| 64 |
|
protected final AlignmentWebServiceClientI client; |
| 65 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 66 |
0 |
public AlignmentAction(Builder builder)... |
| 67 |
|
{ |
| 68 |
0 |
super(builder); |
| 69 |
0 |
submitGaps = builder.submitGaps; |
| 70 |
0 |
client = builder.client; |
| 71 |
|
} |
| 72 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 73 |
0 |
@Override... |
| 74 |
|
public AlignmentTask createTask(AlignViewportI viewport, |
| 75 |
|
List<ArgumentI> args, Credentials credentials) |
| 76 |
|
{ |
| 77 |
0 |
return new AlignmentTask( |
| 78 |
|
client, this, args, credentials, viewport, submitGaps); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 85 |
0 |
@Override... |
| 86 |
|
public boolean isActive(AlignmentViewport viewport) |
| 87 |
|
{ |
| 88 |
0 |
return false; |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
} |