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