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 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (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 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
46 |
0 |
public FeatureSource(String theName)... |
47 |
|
{ |
48 |
0 |
this.name = theName; |
49 |
0 |
attributeNames = new HashMap<>(); |
50 |
0 |
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 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0 |
@Override... |
66 |
|
public String getAttributeName(String attributeId) |
67 |
|
{ |
68 |
0 |
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 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
0 |
@Override... |
84 |
|
public void setAttributeName(String id, String attName) |
85 |
|
{ |
86 |
0 |
attributeNames.put(id, attName); |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
@inheritDoc |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0 |
@Override... |
93 |
|
public void setAttributeType(String id, FeatureAttributeType type) |
94 |
|
{ |
95 |
0 |
attributeTypes.put(id, type); |
96 |
|
} |
97 |
|
|
98 |
|
} |