1 |
57503
|
konstantin
|
package eu.dnetlib.uoamonitorservice.entities;
|
2 |
|
|
|
3 |
|
|
import java.util.List;
|
4 |
57578
|
konstantin
|
import java.util.Map;
|
5 |
57503
|
konstantin
|
|
6 |
|
|
enum IndicatorPathType {
|
7 |
|
|
// Do not rename or remove existring values. This may cause problems with already stored values in DB
|
8 |
59813
|
konstantin
|
table, bar, column, pie, line, other,
|
9 |
|
|
TABLE, BAR, COLUMN, PIE, LINE, OTHER;
|
10 |
57503
|
konstantin
|
}
|
11 |
|
|
|
12 |
59813
|
konstantin
|
//enum SourceType {
|
13 |
|
|
// STATISTICS, SEARCH, METRICS, STATS_TOOL,OLD,IMAGE;
|
14 |
|
|
//}
|
15 |
|
|
|
16 |
57503
|
konstantin
|
public class IndicatorPath {
|
17 |
|
|
private IndicatorPathType type; // for charts is type of chart {table, bar, column, etc}
|
18 |
57964
|
konstantin
|
private String source; // for numbers is the service {statistics, search, metrics} for charts is the tool {stats-tool,old,metrics, image}
|
19 |
57503
|
konstantin
|
private String url;
|
20 |
|
|
private List<String> jsonPath;
|
21 |
57578
|
konstantin
|
private String chartObject;
|
22 |
|
|
private Map<String, String> parameters;
|
23 |
57671
|
konstantin
|
private Map<String, String> filters;
|
24 |
|
|
//private Map<String, Map<String, String>> filters;
|
25 |
57503
|
konstantin
|
|
26 |
57923
|
konstantin
|
public IndicatorPath() {}
|
27 |
|
|
|
28 |
|
|
public IndicatorPath(IndicatorPath indicatorPath) {
|
29 |
|
|
setType(indicatorPath.getType());
|
30 |
|
|
source = indicatorPath.getSource();
|
31 |
|
|
url = indicatorPath.getUrl();
|
32 |
|
|
jsonPath = indicatorPath.getJsonPath();
|
33 |
|
|
chartObject = indicatorPath.getChartObject();
|
34 |
|
|
parameters = indicatorPath.getParameters();
|
35 |
|
|
filters = indicatorPath.getFilters();
|
36 |
57503
|
konstantin
|
}
|
37 |
|
|
|
38 |
57923
|
konstantin
|
public String getType() {
|
39 |
|
|
if(type == null) {
|
40 |
|
|
return null;
|
41 |
|
|
}
|
42 |
|
|
return type.name();
|
43 |
57503
|
konstantin
|
}
|
44 |
|
|
|
45 |
57923
|
konstantin
|
// public IndicatorPathType getType() {
|
46 |
|
|
// return type;
|
47 |
|
|
// }
|
48 |
|
|
|
49 |
|
|
public void setType(String type) {
|
50 |
|
|
if(type == null) {
|
51 |
|
|
this.type = null;
|
52 |
|
|
} else {
|
53 |
|
|
IndicatorPathType indicatorPathType = IndicatorPathType.valueOf(type);
|
54 |
|
|
this.type = indicatorPathType;
|
55 |
|
|
}
|
56 |
|
|
}
|
57 |
|
|
|
58 |
57503
|
konstantin
|
public String getSource() {
|
59 |
|
|
return source;
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
public void setSource(String source) {
|
63 |
|
|
this.source = source;
|
64 |
|
|
}
|
65 |
|
|
|
66 |
|
|
public String getUrl() {
|
67 |
|
|
return url;
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
public void setUrl(String url) {
|
71 |
|
|
this.url = url;
|
72 |
|
|
}
|
73 |
|
|
|
74 |
|
|
public List<String> getJsonPath() {
|
75 |
|
|
return jsonPath;
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
public void setJsonPath(List<String> jsonPath) {
|
79 |
|
|
this.jsonPath = jsonPath;
|
80 |
|
|
}
|
81 |
57578
|
konstantin
|
|
82 |
|
|
public String getChartObject() {
|
83 |
|
|
return chartObject;
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
public void setChartObject(String chartObject) {
|
87 |
|
|
this.chartObject = chartObject;
|
88 |
|
|
}
|
89 |
|
|
|
90 |
|
|
public Map<String, String> getParameters() {
|
91 |
|
|
return parameters;
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
public void setParameters(Map<String, String> parameters) {
|
95 |
|
|
this.parameters = parameters;
|
96 |
|
|
}
|
97 |
|
|
|
98 |
57671
|
konstantin
|
public Map<String, String> getFilters() {
|
99 |
57578
|
konstantin
|
return filters;
|
100 |
|
|
}
|
101 |
|
|
|
102 |
57671
|
konstantin
|
public void setFilters(Map<String, String> filters) {
|
103 |
57578
|
konstantin
|
this.filters = filters;
|
104 |
|
|
}
|
105 |
57503
|
konstantin
|
}
|