Project

General

Profile

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
    TABLE, BAR, COLUMN, PIE, LINE, OTHER;
10
}
11

    
12
//enum SourceType {
13
//    STATISTICS, SEARCH, METRICS, STATS_TOOL,OLD,IMAGE;
14
//}
15

    
16
public class IndicatorPath {
17
    private IndicatorPathType type;  // for charts is type of chart {table, bar, column, etc}
18
    private String source; // for numbers is the service {statistics, search, metrics} for charts is the tool {stats-tool,old,metrics, image}
19
    private String url;
20
    private List<String> jsonPath;
21
    private String chartObject;
22
    private Map<String, String> parameters;
23
    private Map<String, String> filters;
24
    //private Map<String, Map<String, String>> filters;
25

    
26
    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
    }
37

    
38
    public String getType() {
39
        if(type == null) {
40
            return null;
41
        }
42
        return type.name();
43
    }
44

    
45
//    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
    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

    
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
    public Map<String, String> getFilters() {
99
        return filters;
100
    }
101

    
102
    public void setFilters(Map<String, String> filters) {
103
        this.filters = filters;
104
    }
105
}
(3-3/9)