1
|
package eu.dnetlib.uoaadmintools.entities.statistics;
|
2
|
|
3
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
4
|
import org.springframework.data.annotation.Id;
|
5
|
|
6
|
import java.util.HashMap;
|
7
|
import java.util.Map;
|
8
|
|
9
|
/**
|
10
|
* Created by argirok on 5/3/2018.
|
11
|
*/
|
12
|
public class Statistics {
|
13
|
@Id
|
14
|
@JsonProperty("_id")
|
15
|
private String id;
|
16
|
private String pid;
|
17
|
private boolean isActive = true;
|
18
|
Map<String,StatisticsEntity> entities = new HashMap<String, StatisticsEntity>();
|
19
|
public Statistics(String pid){
|
20
|
this.pid = pid;
|
21
|
this.isActive = true;
|
22
|
entities.put("publication",new StatisticsEntity());
|
23
|
entities.put("dataset",new StatisticsEntity());
|
24
|
entities.put("software",new StatisticsEntity());
|
25
|
entities.put("orp",new StatisticsEntity());
|
26
|
}
|
27
|
public String getId() {
|
28
|
return id;
|
29
|
}
|
30
|
|
31
|
public void setId(String id) {
|
32
|
this.id = id;
|
33
|
}
|
34
|
|
35
|
public String getPid() {
|
36
|
return pid;
|
37
|
}
|
38
|
|
39
|
public void setPid(String pid) {
|
40
|
this.pid = pid;
|
41
|
}
|
42
|
|
43
|
public boolean getIsActive() {
|
44
|
return isActive;
|
45
|
}
|
46
|
|
47
|
public void setIsActive(boolean isActive) {
|
48
|
this.isActive = isActive;
|
49
|
}
|
50
|
|
51
|
public Map<String, StatisticsEntity> getEntities() {
|
52
|
return entities;
|
53
|
}
|
54
|
|
55
|
public void setEntities(Map<String, StatisticsEntity> entities) {
|
56
|
this.entities = entities;
|
57
|
}
|
58
|
|
59
|
@Override
|
60
|
public String toString() {
|
61
|
return "Statistics{" +
|
62
|
"id='" + id + '\'' +
|
63
|
", pid='" + pid + '\'' +
|
64
|
", isActive= "+isActive +
|
65
|
", entities=" + entities +
|
66
|
'}';
|
67
|
}
|
68
|
|
69
|
// private Map<String, StatisticsStatus> statistics;
|
70
|
//
|
71
|
// public Statistics(String pid){
|
72
|
// this.setPid(pid);
|
73
|
// this.statistics = new HashMap<String, StatisticsStatus>();
|
74
|
//
|
75
|
// this.statistics.put("publicationsNumber", new StatisticsStatus());
|
76
|
// this.statistics.put("publicationsProjectNumber", new StatisticsStatus());
|
77
|
// this.statistics.put("publicationsOpenNumber", new StatisticsStatus());
|
78
|
// this.statistics.put("publicationsClosedNumber", new StatisticsStatus());
|
79
|
// this.statistics.put("publicationsEmbargoNumber", new StatisticsStatus());
|
80
|
//
|
81
|
// this.statistics.put("datasetsNumber", new StatisticsStatus());
|
82
|
// this.statistics.put("datasetsProjectNumber", new StatisticsStatus());
|
83
|
// this.statistics.put("datasetsOpenNumber", new StatisticsStatus());
|
84
|
// this.statistics.put("datasetsClosedNumber", new StatisticsStatus());
|
85
|
// this.statistics.put("datasetsEmbargoNumber", new StatisticsStatus());
|
86
|
//
|
87
|
// this.statistics.put("softwareNumber", new StatisticsStatus());
|
88
|
// this.statistics.put("softwareProjectNumber", new StatisticsStatus());
|
89
|
// this.statistics.put("softwareOpenNumber", new StatisticsStatus());
|
90
|
// this.statistics.put("softwareClosedNumber", new StatisticsStatus());
|
91
|
// this.statistics.put("softwareEmbargoNumber", new StatisticsStatus());
|
92
|
//
|
93
|
// this.statistics.put("publicationsTimeline", new StatisticsStatus());
|
94
|
// this.statistics.put("datasetsTimeline", new StatisticsStatus());
|
95
|
// this.statistics.put("softwareTimeline", new StatisticsStatus());
|
96
|
//
|
97
|
//
|
98
|
// this.statistics.put("publicationsProjectColumn", new StatisticsStatus());
|
99
|
// this.statistics.put("publicationsProjectPie", new StatisticsStatus());
|
100
|
// this.statistics.put("publicationsProjectTable", new StatisticsStatus());
|
101
|
//
|
102
|
// this.statistics.put("datasetsProjectColumn", new StatisticsStatus());
|
103
|
// this.statistics.put("datasetsProjectPie", new StatisticsStatus());
|
104
|
// this.statistics.put("datasetsProjectTable", new StatisticsStatus());
|
105
|
//
|
106
|
// this.statistics.put("softwareProjectColumn", new StatisticsStatus());
|
107
|
// this.statistics.put("softwareProjectPie", new StatisticsStatus());
|
108
|
// this.statistics.put("softwareProjectTable", new StatisticsStatus());
|
109
|
//
|
110
|
// }
|
111
|
//
|
112
|
// public String getId() {
|
113
|
// return id;
|
114
|
// }
|
115
|
//
|
116
|
// public void setId(String id) {
|
117
|
// this.id = id;
|
118
|
// }
|
119
|
//
|
120
|
// public String getPid() {
|
121
|
// return pid;
|
122
|
// }
|
123
|
//
|
124
|
// public void setPid(String pid) {
|
125
|
// this.pid = pid;
|
126
|
// }
|
127
|
//
|
128
|
// public Map<String, StatisticsStatus> getStatistics() {
|
129
|
// return statistics;
|
130
|
// }
|
131
|
//
|
132
|
// public void setStatistics(Map<String, StatisticsStatus> statistics) {
|
133
|
// this.statistics = statistics;
|
134
|
// }
|
135
|
//
|
136
|
// @Override
|
137
|
// public String toString() {
|
138
|
// return "Statistics{" +
|
139
|
// "id='" + id + '\'' +
|
140
|
// ", pid='" + pid + '\'' +
|
141
|
// ", statistics=" + statistics +
|
142
|
// '}';
|
143
|
// }
|
144
|
}
|