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