1 package net.sumaris.core.extraction.vo;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import lombok.AccessLevel;
26 import lombok.Data;
27 import lombok.experimental.FieldDefaults;
28 import net.sumaris.core.vo.technical.extraction.ExtractionProductVO;
29
30 import java.util.Map;
31
32
33
34
35
36 @Data
37 @FieldDefaults(level = AccessLevel.PRIVATE)
38 public class ExtractionProductContextVO extends ExtractionContextVO {
39
40 String label;
41
42 public ExtractionProductContextVO(ExtractionProductVO product) {
43 this(product.getLabel(), product.getItems());
44 }
45
46 public ExtractionProductContextVO(String label, Map<String, String> items) {
47 super();
48 this.label = label;
49 items.entrySet().stream().forEach(e -> this.addTableName(e.getValue(), e.getKey()));
50 }
51
52 @Override
53 public String getLabel() {
54 return label;
55 }
56
57 }