@@ -40,14 +40,62 @@ public GradeStructure adaptFromJson(GSR structure) {
40
40
checkArgument (structure .absolutes .isEmpty (), "Not yet supported." );
41
41
return GradeStructure .givenWeights (structure .weights .orElse (ImmutableMap .of ()), structure .subs );
42
42
}
43
- checkArgument (structure .weights .isEmpty ());
43
+ checkArgument (Optional . ofNullable ( structure .weights ) .isEmpty ());
44
44
return GradeStructure .maxWithGivenAbsolutes (structure .absolutes , structure .subs );
45
45
}
46
46
}
47
47
48
48
@ JsonbPropertyOrder ({ "defaultAggregation" , "weights" , "absolutes" , "subs" })
49
- public static record GSR (DefaultAggregation defaultAggregation , Optional <Map <Criterion , Double >> weights ,
50
- Set <Criterion > absolutes , Map <Criterion , GradeStructure > subs ) {
49
+ public static class GSR {
50
+ public DefaultAggregation defaultAggregation ;
51
+
52
+ public Optional <Map <Criterion , Double >> weights ;
53
+ public Set <Criterion > absolutes ;
54
+ public Map <Criterion , GradeStructure > subs ;
55
+
56
+ public GSR () {
57
+ }
58
+
59
+ public GSR (DefaultAggregation defaultAggregation , Optional <Map <Criterion , Double >> weights ,
60
+ Set <Criterion > absolutes , Map <Criterion , GradeStructure > subs ) {
61
+ this .defaultAggregation = defaultAggregation ;
62
+ this .weights = weights ;
63
+ this .absolutes = absolutes ;
64
+ this .subs = subs ;
65
+ }
66
+
67
+ public DefaultAggregation getDefaultAggregation () {
68
+ return defaultAggregation ;
69
+ }
70
+
71
+ public void setDefaultAggregation (DefaultAggregation defaultAggregation ) {
72
+ this .defaultAggregation = defaultAggregation ;
73
+ }
74
+
75
+ public Optional <Map <Criterion , Double >> getWeights () {
76
+ return weights ;
77
+ }
78
+
79
+ public void setWeights (Optional <Map <Criterion , Double >> weights ) {
80
+ this .weights = weights ;
81
+ }
82
+
83
+ public Set <Criterion > getAbsolutes () {
84
+ return absolutes ;
85
+ }
86
+
87
+ public void setAbsolutes (Set <Criterion > absolutes ) {
88
+ this .absolutes = absolutes ;
89
+ }
90
+
91
+ public Map <Criterion , GradeStructure > getSubs () {
92
+ return subs ;
93
+ }
94
+
95
+ public void setSubs (Map <Criterion , GradeStructure > subs ) {
96
+ this .subs = subs ;
97
+ }
98
+
51
99
}
52
100
53
101
public static String toJson (GradeStructure structure ) {
0 commit comments