1 package de.dlr.shepard.data.timeseries.model;
2
3 import jakarta.validation.constraints.NotBlank;
4 import lombok.AllArgsConstructor;
5 import lombok.Data;
6 import lombok.EqualsAndHashCode;
7 import lombok.NoArgsConstructor;
8
9 @Data
10 @EqualsAndHashCode
11 @NoArgsConstructor(force = true)
12 @AllArgsConstructor
13 public class Timeseries {
14
15 @NotBlank
16 private final String measurement;
17
18 @NotBlank
19 private final String device;
20
21 @NotBlank
22 private final String location;
23
24 @NotBlank
25 private final String symbolicName;
26
27 @NotBlank
28 private final String field;
29
30 public Timeseries(TimeseriesEntity timeseriesEntity) {
31 this.measurement = timeseriesEntity.getMeasurement();
32 this.device = timeseriesEntity.getDevice();
33 this.location = timeseriesEntity.getLocation();
34 this.symbolicName = timeseriesEntity.getSymbolicName();
35 this.field = timeseriesEntity.getField();
36 }
37 }