1
|
package eu.dnetlib.datasource.publisher.model;
|
2
|
|
3
|
import java.util.List;
|
4
|
|
5
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
6
|
import eu.dnetlib.datasource.publisher.model.db.Datasource;
|
7
|
import io.swagger.annotations.ApiModel;
|
8
|
import io.swagger.annotations.ApiModelProperty;
|
9
|
|
10
|
/**
|
11
|
* Created by claudio on 12/09/16.
|
12
|
*/
|
13
|
@JsonAutoDetect
|
14
|
@ApiModel(value = "Datasource response model", description = "provides information about the datasource and its aggregation status")
|
15
|
public class DatasourceResponse {
|
16
|
|
17
|
@ApiModelProperty(position = 1)
|
18
|
private long indexRecords;
|
19
|
|
20
|
@ApiModelProperty(position = 2)
|
21
|
private String lastIndexingDate;
|
22
|
|
23
|
@ApiModelProperty(position = 3)
|
24
|
private Datasource datasource;
|
25
|
|
26
|
@ApiModelProperty(position = 4)
|
27
|
private List<AggregationInfo> aggregationHistory;
|
28
|
|
29
|
@ApiModelProperty(position = 5)
|
30
|
private AggregationInfo lastCollection;
|
31
|
|
32
|
@ApiModelProperty(position = 6)
|
33
|
private AggregationInfo lastTransformation;
|
34
|
|
35
|
public DatasourceResponse() {
|
36
|
super();
|
37
|
}
|
38
|
|
39
|
public DatasourceResponse setIndexRecords(final long indexRecords) {
|
40
|
this.indexRecords = indexRecords;
|
41
|
return this;
|
42
|
}
|
43
|
|
44
|
public DatasourceResponse setLastIndexingDate(final String lastIndexingDate) {
|
45
|
this.lastIndexingDate = lastIndexingDate;
|
46
|
return this;
|
47
|
}
|
48
|
|
49
|
public DatasourceResponse setAggregationHistory(final List<AggregationInfo> aggregationHistory) {
|
50
|
this.aggregationHistory = aggregationHistory;
|
51
|
return this;
|
52
|
}
|
53
|
|
54
|
public DatasourceResponse setLastCollection(final AggregationInfo lastCollection) {
|
55
|
this.lastCollection = lastCollection;
|
56
|
return this;
|
57
|
}
|
58
|
|
59
|
public DatasourceResponse setLastTransformation(final AggregationInfo lastTransformation) {
|
60
|
this.lastTransformation = lastTransformation;
|
61
|
return this;
|
62
|
}
|
63
|
|
64
|
public long getIndexRecords() {
|
65
|
return indexRecords;
|
66
|
}
|
67
|
|
68
|
public String getLastIndexingDate() {
|
69
|
return lastIndexingDate;
|
70
|
}
|
71
|
|
72
|
public List<AggregationInfo> getAggregationHistory() {
|
73
|
return aggregationHistory;
|
74
|
}
|
75
|
|
76
|
public AggregationInfo getLastCollection() {
|
77
|
return lastCollection;
|
78
|
}
|
79
|
|
80
|
public AggregationInfo getLastTransformation() {
|
81
|
return lastTransformation;
|
82
|
}
|
83
|
|
84
|
public Datasource getDatasource() {
|
85
|
return datasource;
|
86
|
}
|
87
|
|
88
|
public void setDatasource(final Datasource datasource) {
|
89
|
this.datasource = datasource;
|
90
|
}
|
91
|
}
|