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