| 1 |
|
package jalview.ws2.actions.annotation; |
| 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.api.TaskEventListener; |
| 11 |
|
import jalview.ws2.actions.api.TaskI; |
| 12 |
|
import jalview.ws2.api.Credentials; |
| 13 |
|
import jalview.ws2.client.api.AnnotationWebServiceClientI; |
| 14 |
|
|
| |
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 7 |
Complexity Density: 0.64 |
|
| 15 |
|
public class AnnotationAction extends BaseAction<AnnotationResult> |
| 16 |
|
{ |
| 17 |
|
|
| 18 |
|
@link |
| 19 |
|
|
| |
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 5 |
Complexity Density: 0.71 |
|
| 20 |
|
public static class Builder extends BaseAction.Builder<AnnotationAction> |
| 21 |
|
{ |
| 22 |
|
protected AnnotationWebServiceClientI client; |
| 23 |
|
|
| 24 |
|
protected boolean alignmentAnalysis = false; |
| 25 |
|
|
| 26 |
|
protected boolean requireAlignedSequences = false; |
| 27 |
|
|
| 28 |
|
protected boolean filterSymbols = true; |
| 29 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 30 |
0 |
public Builder(AnnotationWebServiceClientI client)... |
| 31 |
|
{ |
| 32 |
0 |
super(); |
| 33 |
0 |
Objects.requireNonNull(client); |
| 34 |
0 |
this.client = client; |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 40 |
0 |
public void alignmentAnalysis(boolean val)... |
| 41 |
|
{ |
| 42 |
0 |
alignmentAnalysis = val; |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 48 |
0 |
public void requireAlignedSequences(boolean val)... |
| 49 |
|
{ |
| 50 |
0 |
requireAlignedSequences = val; |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 56 |
0 |
public void filterSymbols(boolean val)... |
| 57 |
|
{ |
| 58 |
0 |
filterSymbols = val; |
| 59 |
|
} |
| 60 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 61 |
0 |
public AnnotationAction build()... |
| 62 |
|
{ |
| 63 |
0 |
return new AnnotationAction(this); |
| 64 |
|
} |
| 65 |
|
} |
| 66 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 67 |
0 |
public static Builder newBuilder(AnnotationWebServiceClientI client)... |
| 68 |
|
{ |
| 69 |
0 |
return new Builder(client); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
protected final AnnotationWebServiceClientI client; |
| 73 |
|
|
| 74 |
|
protected final boolean alignmentAnalysis; |
| 75 |
|
|
| 76 |
|
protected final boolean requireAlignedSequences; |
| 77 |
|
|
| 78 |
|
protected final boolean filterSymbols; |
| 79 |
|
|
| |
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 80 |
0 |
protected AnnotationAction(Builder builder)... |
| 81 |
|
{ |
| 82 |
0 |
super(builder); |
| 83 |
0 |
client = builder.client; |
| 84 |
0 |
alignmentAnalysis = builder.alignmentAnalysis; |
| 85 |
0 |
requireAlignedSequences = builder.requireAlignedSequences; |
| 86 |
0 |
filterSymbols = builder.filterSymbols; |
| 87 |
|
} |
| 88 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 89 |
0 |
@Override... |
| 90 |
|
public AnnotationTask createTask(AlignViewportI viewport, |
| 91 |
|
List<ArgumentI> args, Credentials credentials) |
| 92 |
|
{ |
| 93 |
0 |
return new AnnotationTask(client, this, args, credentials, viewport); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 99 |
0 |
public boolean isAlignmentAnalysis()... |
| 100 |
|
{ |
| 101 |
0 |
return alignmentAnalysis; |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 107 |
0 |
public boolean getRequireAlignedSequences()... |
| 108 |
|
{ |
| 109 |
0 |
return requireAlignedSequences; |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 115 |
0 |
public boolean getFilterSymbols()... |
| 116 |
|
{ |
| 117 |
0 |
return filterSymbols; |
| 118 |
|
} |
| 119 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 120 |
0 |
@Override... |
| 121 |
|
public boolean isActive(AlignmentViewport viewport) |
| 122 |
|
{ |
| 123 |
0 |
return false; |
| 124 |
|
} |
| 125 |
|
} |