Project

General

Profile

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