1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 package gov.nist.secauto.metaschema.databind.model.test;
28
29 import gov.nist.secauto.metaschema.core.model.JsonGroupAsBehavior;
30 import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly;
31 import gov.nist.secauto.metaschema.databind.model.annotations.BoundField;
32 import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs;
33 import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
34
35 import java.util.List;
36 import java.util.Map;
37
38 @SuppressWarnings("PMD")
39 @MetaschemaAssembly(name = "only-model", moduleClass = TestMetaschema.class)
40 public class OnlyModelBoundAssembly {
41
42
43
44
45
46
47 @BoundField(useName = "simple-singleton-field")
48 private String simpleSingletonField;
49
50
51
52
53 @BoundField(useName = "simple-required-singleton-field",
54 minOccurs = 1)
55 private String simpleRequiredSingletonField;
56
57
58
59
60 @BoundField(useName = "simple-array-field",
61 maxOccurs = -1)
62 @GroupAs(name = "simple-array-field-items",
63 inJson = JsonGroupAsBehavior.LIST)
64 private List<String> simpleArrayField;
65
66
67
68
69 @BoundField(useName = "simple-required-array-field",
70 minOccurs = 1,
71 maxOccurs = -1)
72 @GroupAs(name = "simple-required-array-field-items",
73 inJson = JsonGroupAsBehavior.LIST)
74 private List<String> simpleRequiredArrayField;
75
76
77
78
79 @BoundField(useName = "simple-singleton-or-array-field",
80 maxOccurs = -1)
81 @GroupAs(name = "simple-singleton-or-array-field-items",
82 inJson = JsonGroupAsBehavior.SINGLETON_OR_LIST)
83 private List<String> simpleSingletonOrArrayField;
84
85
86
87
88
89
90
91 @BoundField(useName = "flagged-singleton-field")
92 private FlaggedBoundField flaggedSingletonField;
93
94
95
96
97 @BoundField(useName = "flagged-required-singleton-field",
98 minOccurs = 1)
99 private FlaggedBoundField flaggedRequiredSingletonField;
100
101
102
103
104 @BoundField(useName = "flagged-array-field",
105 maxOccurs = -1)
106 @GroupAs(name = "flagged-array-field-items",
107 inJson = JsonGroupAsBehavior.LIST)
108 private List<FlaggedBoundField> flaggedArrayField;
109
110
111
112
113 @BoundField(useName = "flagged-required-array-field",
114 minOccurs = 1,
115 maxOccurs = -1)
116 @GroupAs(name = "flagged-required-array-field-items",
117 inJson = JsonGroupAsBehavior.LIST)
118 private List<FlaggedBoundField> flaggedRequiredArrayField;
119
120
121
122
123 @BoundField(useName = "flagged-singleton-or-array-field",
124 maxOccurs = -1)
125 @GroupAs(name = "flagged-singleton-or-array-field-items",
126 inJson = JsonGroupAsBehavior.SINGLETON_OR_LIST)
127 private List<FlaggedBoundField> flaggedSingletonOrArrayField;
128
129
130
131
132
133
134
135 @BoundAssembly(useName = "singleton-assembly")
136 private EmptyBoundAssembly singletonAssembly;
137
138
139
140
141 @BoundAssembly(useName = "array-assembly",
142 maxOccurs = -1)
143 @GroupAs(name = "array-assembly-items",
144 inJson = JsonGroupAsBehavior.LIST)
145 private List<OnlyModelBoundAssembly> arrayAssembly;
146
147
148
149
150 @BoundAssembly(useName = "singleton-or-array-assembly",
151 maxOccurs = -1)
152 @GroupAs(name = "singleton-or-array-assembly-items",
153 inJson = JsonGroupAsBehavior.SINGLETON_OR_LIST)
154 private List<OnlyModelBoundAssembly> singletonOrArrayAssembly;
155
156
157
158 @BoundAssembly(useName = "keyed-assembly",
159 maxOccurs = -1)
160 @GroupAs(name = "keyed-assembly-items",
161 inJson = JsonGroupAsBehavior.KEYED)
162 private Map<String, FlaggedBoundAssembly> keyedAssembly;
163 }