1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.fts.service.threedbeacons; |
22 |
|
|
23 |
|
import java.util.Map; |
24 |
|
import java.util.Objects; |
25 |
|
|
26 |
|
import jalview.fts.api.FTSData; |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
@author |
33 |
|
|
34 |
|
|
|
|
| 61.3% |
Uncovered Elements: 12 (31) |
Complexity: 13 |
Complexity Density: 0.76 |
|
35 |
|
public class TDB_FTSData implements FTSData |
36 |
|
{ |
37 |
|
String primaryKey; |
38 |
|
|
39 |
|
Object[] summaryRowData; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
public static String Uniprot_Id = "id"; |
45 |
|
|
46 |
|
public static String Uniprot_Start = "uniprot_start"; |
47 |
|
|
48 |
|
public static String Uniprot_End = "uniprot_end"; |
49 |
|
|
50 |
|
public static String Provider = "provider"; |
51 |
|
|
52 |
|
public static String Model_id = "model_identifier"; |
53 |
|
|
54 |
|
public static String Model_Category = "model_category"; |
55 |
|
|
56 |
|
public static String Model_Type = "model_type"; |
57 |
|
|
58 |
|
public static String Model_Title = "model_title"; |
59 |
|
|
60 |
|
public static String Resolution = "resolution"; |
61 |
|
|
62 |
|
public static String Confidence = "confidence_avg_local_score"; |
63 |
|
|
64 |
|
public static String Confidence_Score_Type = "confidence_type"; |
65 |
|
|
66 |
|
public static String Confidence_Score_Version = "confidence_version"; |
67 |
|
|
68 |
|
public static String Coverage = "coverage"; |
69 |
|
|
70 |
|
public static String Sequence_Identity = "sequence_identity"; |
71 |
|
|
72 |
|
public static String Created_Date = "created"; |
73 |
|
|
74 |
|
public static String UniProt_Accession = "uniprot_accession"; |
75 |
|
|
76 |
|
public static String Url = "model_url"; |
77 |
|
|
78 |
|
public static String Page_URL = "model_page_url"; |
79 |
|
|
80 |
|
public static String Ensemble_Sample_Url = "ensembl_sample_url"; |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
Map<String, Object> tdb_entry; |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
87 |
5093 |
public TDB_FTSData(String primaryKey,... |
88 |
|
Map<String, Object> tdbJsonStructure, Object[] summaryData) |
89 |
|
{ |
90 |
5093 |
this.primaryKey = primaryKey; |
91 |
5093 |
tdb_entry = tdbJsonStructure; |
92 |
5093 |
this.summaryRowData = summaryData; |
93 |
|
} |
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
2516 |
public Object getField(String key)... |
96 |
|
{ |
97 |
2516 |
return tdb_entry.get(key); |
98 |
|
} |
99 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
93882 |
@Override... |
101 |
|
public Object[] getSummaryData() |
102 |
|
{ |
103 |
93882 |
return summaryRowData; |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0 |
@Override... |
107 |
|
public Object getPrimaryKey() |
108 |
|
{ |
109 |
0 |
return primaryKey; |
110 |
|
} |
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
115 |
254 |
@Override... |
116 |
|
public String toString() |
117 |
|
{ |
118 |
254 |
StringBuilder summaryFieldValues = new StringBuilder(); |
119 |
254 |
for (Object summaryField : summaryRowData) |
120 |
|
{ |
121 |
3308 |
summaryFieldValues |
122 |
3308 |
.append(summaryField == null ? " " : summaryField.toString()) |
123 |
|
.append("\t"); |
124 |
|
} |
125 |
254 |
return summaryFieldValues.toString(); |
126 |
|
} |
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
131 |
191 |
@Override... |
132 |
|
public int hashCode() |
133 |
|
{ |
134 |
191 |
return Objects.hash(primaryKey, this.toString()); |
135 |
|
} |
136 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
137 |
0 |
@Override... |
138 |
|
public boolean equals(Object that) |
139 |
|
{ |
140 |
0 |
return this.toString().equals(that.toString()); |
141 |
|
} |
142 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
143 |
2516 |
public String getProvider()... |
144 |
|
{ |
145 |
2516 |
return (String) getField(Provider); |
146 |
|
} |
147 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
148 |
0 |
public String getModelViewUrl()... |
149 |
|
{ |
150 |
0 |
return (String) getField(Page_URL); |
151 |
|
} |
152 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
153 |
0 |
public String getModelId()... |
154 |
|
{ |
155 |
0 |
return (String) getField(Model_id); |
156 |
|
} |
157 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
158 |
0 |
public String getConfidenceScoreType()... |
159 |
|
{ |
160 |
0 |
return (String) getField(Confidence_Score_Type); |
161 |
|
} |
162 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
163 |
0 |
public String getConfidenceScoreVersion()... |
164 |
|
{ |
165 |
0 |
return (String) getField(Confidence_Score_Version); |
166 |
|
} |
167 |
|
|
168 |
|
} |