1
|
package eu.dnetlib.usagestats.sushilite.domain;
|
2
|
|
3
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
4
|
|
5
|
import java.util.ArrayList;
|
6
|
import java.util.List;
|
7
|
|
8
|
/**
|
9
|
* Created by tsampikos on 31/10/2016.
|
10
|
*/
|
11
|
public class ItemPerformance {
|
12
|
private Period period;
|
13
|
private List<Instance> instances = new ArrayList<>();
|
14
|
|
15
|
public ItemPerformance() {
|
16
|
}
|
17
|
|
18
|
public ItemPerformance(String start, String end, String ft_count, String abstr) {
|
19
|
period = new Period(start, end);
|
20
|
instances.add(new Instance("ft_total", ft_count));
|
21
|
instances.add(new Instance("abstract", abstr));
|
22
|
}
|
23
|
|
24
|
@JsonProperty("Period")
|
25
|
public Period getPeriod() {
|
26
|
return period;
|
27
|
}
|
28
|
|
29
|
@JsonProperty("Category")
|
30
|
public String getCategory() {
|
31
|
return "Requests";
|
32
|
}
|
33
|
|
34
|
@JsonProperty("Instance")
|
35
|
public List<Instance> getInstance() {
|
36
|
return instances;
|
37
|
}
|
38
|
}
|