1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.datamodel.features; |
22 |
|
|
23 |
|
import java.util.HashMap; |
24 |
|
import java.util.Map; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@author |
31 |
|
|
32 |
|
|
|
|
| 71.4% |
Uncovered Elements: 4 (14) |
Complexity: 6 |
Complexity Density: 0.75 |
|
33 |
|
public class FeatureSource implements FeatureSourceI |
34 |
|
{ |
35 |
|
private String name; |
36 |
|
|
37 |
|
private Map<String, String> attributeNames; |
38 |
|
|
39 |
|
private Map<String, FeatureAttributeType> attributeTypes; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
@param |
45 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
46 |
4 |
public FeatureSource(String theName)... |
47 |
|
{ |
48 |
4 |
this.name = theName; |
49 |
4 |
attributeNames = new HashMap<>(); |
50 |
4 |
attributeTypes = new HashMap<>(); |
51 |
|
} |
52 |
|
|
53 |
|
|
54 |
|
@inheritDoc |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
0 |
@Override... |
57 |
|
public String getName() |
58 |
|
{ |
59 |
0 |
return name; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
@inheritDoc |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
289 |
@Override... |
66 |
|
public String getAttributeName(String attributeId) |
67 |
|
{ |
68 |
289 |
return attributeNames.get(attributeId); |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
@inheritDoc |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0 |
@Override... |
75 |
|
public FeatureAttributeType getAttributeType(String attributeId) |
76 |
|
{ |
77 |
0 |
return attributeTypes.get(attributeId); |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
@inheritDoc |
82 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
13 |
@Override... |
84 |
|
public void setAttributeName(String id, String attName) |
85 |
|
{ |
86 |
13 |
attributeNames.put(id, attName); |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
@inheritDoc |
91 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
13 |
@Override... |
93 |
|
public void setAttributeType(String id, FeatureAttributeType type) |
94 |
|
{ |
95 |
13 |
attributeTypes.put(id, type); |
96 |
|
} |
97 |
|
|
98 |
|
} |