Project

General

Profile

1
package eu.dnetlib.uoamonitorservice.entities;
2

    
3
import com.fasterxml.jackson.annotation.JsonProperty;
4
import org.springframework.data.annotation.Id;
5

    
6
import java.util.List;
7

    
8
enum IndicatorType {
9
    // Do not rename or remove existring values. This may cause problems with already stored values in DB
10
    number, chart;
11
}
12

    
13
enum IndicatorWidth {
14
    // Do not rename or remove existring values. This may cause problems with already stored values in DB
15
    small, medium, large;
16
}
17

    
18
public class Indicator {
19
    @Id
20
    @JsonProperty("_id")
21
    private String id;
22

    
23
    private String name;
24
    private String description;
25
    private IndicatorType type; //number,chart
26
    private IndicatorWidth width; //small,medium,large
27
    private List<String> tags;
28
    private boolean isActive;
29
    private boolean isPublic;
30
    private List<IndicatorPath> indicatorPaths;
31

    
32
    public String getId() {
33
        return id;
34
    }
35

    
36
    public void setId(String id) {
37
        this.id = id;
38
    }
39

    
40
    public String getName() {
41
        return name;
42
    }
43

    
44
    public void setName(String name) {
45
        this.name = name;
46
    }
47

    
48
    public String getDescription() {
49
        return description;
50
    }
51

    
52
    public void setDescription(String description) {
53
        this.description = description;
54
    }
55

    
56
    public IndicatorType getType() {
57
        return type;
58
    }
59

    
60
    public void setType(IndicatorType type) {
61
        this.type = type;
62
    }
63

    
64
    public IndicatorWidth getWidth() {
65
        return width;
66
    }
67

    
68
    public void setWidth(IndicatorWidth width) {
69
        this.width = width;
70
    }
71

    
72
    public List<String> getTags() {
73
        return tags;
74
    }
75

    
76
    public void setTags(List<String> tags) {
77
        this.tags = tags;
78
    }
79

    
80
    public boolean getIsActive() {
81
        return isActive;
82
    }
83

    
84
    public void setIsActive(boolean isActive) {
85
        this.isActive = isActive;
86
    }
87

    
88
    public boolean getIsPublic() {
89
        return isPublic;
90
    }
91

    
92
    public void setIsPublic(boolean isPublic) {
93
        this.isPublic = isPublic;
94
    }
95

    
96
    public List<IndicatorPath> getIndicatorPaths() {
97
        return indicatorPaths;
98
    }
99

    
100
    public void setIndicatorPaths(List<IndicatorPath> indicatorPaths) {
101
        this.indicatorPaths = indicatorPaths;
102
    }
103

    
104
    public boolean hasType(String str) {
105
        return this.type.equals(str);
106
    }
107
}
(2-2/6)