1
2
3
4
5
6
7
8 package dev.metaschema.databind.config.binding;
9
10 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
11 import org.apache.commons.lang3.builder.ToStringStyle;
12
13 import java.net.URI;
14 import java.util.LinkedList;
15 import java.util.List;
16
17 import dev.metaschema.core.datatype.adapter.BooleanAdapter;
18 import dev.metaschema.core.datatype.adapter.StringAdapter;
19 import dev.metaschema.core.datatype.adapter.TokenAdapter;
20 import dev.metaschema.core.datatype.adapter.UriAdapter;
21 import dev.metaschema.core.datatype.adapter.UriReferenceAdapter;
22 import dev.metaschema.core.model.IBoundObject;
23 import dev.metaschema.core.model.IMetaschemaData;
24 import dev.metaschema.core.model.JsonGroupAsBehavior;
25 import dev.metaschema.core.util.ObjectUtils;
26 import dev.metaschema.databind.model.annotations.BoundAssembly;
27 import dev.metaschema.databind.model.annotations.BoundField;
28 import dev.metaschema.databind.model.annotations.BoundFieldValue;
29 import dev.metaschema.databind.model.annotations.BoundFlag;
30 import dev.metaschema.databind.model.annotations.GroupAs;
31 import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
32 import dev.metaschema.databind.model.annotations.MetaschemaField;
33 import edu.umd.cs.findbugs.annotations.NonNull;
34 import edu.umd.cs.findbugs.annotations.Nullable;
35
36
37
38
39 @MetaschemaAssembly(
40 formalName = "Metaschema Bindings",
41 description = "The root element for a set of metaschema binding customizations.",
42 name = "metaschema-bindings",
43 moduleClass = MetaschemaBindingsModule.class,
44 rootName = "metaschema-bindings")
45 public class MetaschemaBindings implements IBoundObject {
46 private final IMetaschemaData __metaschemaData;
47
48
49
50
51
52 @BoundAssembly(
53 formalName = "Model Binding",
54 description = "Defines binding configurations that apply to a whole model described by a namespace.",
55 useName = "model-binding",
56 maxOccurs = -1,
57 groupAs = @GroupAs(name = "model-bindings", inJson = JsonGroupAsBehavior.LIST))
58 private List<ModelBinding> _modelBindings;
59
60
61
62
63 @BoundAssembly(
64 formalName = "Metaschema Binding",
65 description = "Defines a binding for a given metaschema identified by a relative URL.",
66 useName = "metaschema-binding",
67 maxOccurs = -1,
68 groupAs = @GroupAs(name = "metaschema-bindings", inJson = JsonGroupAsBehavior.LIST))
69 private List<MetaschemaBinding> _metaschemaBindings;
70
71
72
73
74
75
76 public MetaschemaBindings() {
77 this(null);
78 }
79
80
81
82
83
84
85
86
87
88 public MetaschemaBindings(IMetaschemaData data) {
89 this.__metaschemaData = data;
90 }
91
92 @Override
93 public IMetaschemaData getMetaschemaData() {
94 return __metaschemaData;
95 }
96
97
98
99
100
101
102
103
104
105
106 @NonNull
107 public List<ModelBinding> getModelBindings() {
108 if (_modelBindings == null) {
109 _modelBindings = new LinkedList<>();
110 }
111 return ObjectUtils.notNull(_modelBindings);
112 }
113
114
115
116
117
118
119
120
121
122
123
124 public void setModelBindings(@NonNull List<ModelBinding> value) {
125 _modelBindings = value;
126 }
127
128
129
130
131
132
133
134
135 public boolean addModelBinding(ModelBinding item) {
136 ModelBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
137 if (_modelBindings == null) {
138 _modelBindings = new LinkedList<>();
139 }
140 return _modelBindings.add(value);
141 }
142
143
144
145
146
147
148
149
150
151 public boolean removeModelBinding(ModelBinding item) {
152 ModelBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
153 return _modelBindings != null && _modelBindings.remove(value);
154 }
155
156
157
158
159
160
161
162
163
164 @NonNull
165 public List<MetaschemaBinding> getMetaschemaBindings() {
166 if (_metaschemaBindings == null) {
167 _metaschemaBindings = new LinkedList<>();
168 }
169 return ObjectUtils.notNull(_metaschemaBindings);
170 }
171
172
173
174
175
176
177
178
179
180
181 public void setMetaschemaBindings(@NonNull List<MetaschemaBinding> value) {
182 _metaschemaBindings = value;
183 }
184
185
186
187
188
189
190
191
192 public boolean addMetaschemaBinding(MetaschemaBinding item) {
193 MetaschemaBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
194 if (_metaschemaBindings == null) {
195 _metaschemaBindings = new LinkedList<>();
196 }
197 return _metaschemaBindings.add(value);
198 }
199
200
201
202
203
204
205
206
207
208 public boolean removeMetaschemaBinding(MetaschemaBinding item) {
209 MetaschemaBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
210 return _metaschemaBindings != null && _metaschemaBindings.remove(value);
211 }
212
213 @Override
214 public String toString() {
215 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
216 }
217
218
219
220
221
222 @MetaschemaAssembly(
223 formalName = "Model Binding",
224 description = "Defines binding configurations that apply to a whole model described by a namespace.",
225 name = "model-binding",
226 moduleClass = MetaschemaBindingsModule.class)
227 public static class ModelBinding implements IBoundObject {
228 private final IMetaschemaData __metaschemaData;
229
230
231
232
233
234 @BoundFlag(
235 formalName = "Namespace",
236 description = "A URI referencing the namespace of one or more related metaschema definitions.",
237 name = "namespace",
238 required = true,
239 typeAdapter = UriAdapter.class)
240 private URI _namespace;
241
242
243
244
245 @BoundAssembly(
246 formalName = "Java Model Binding",
247 description = "Java-specific binding configuration for a model namespace.",
248 useName = "java")
249 private Java _java;
250
251
252
253
254
255
256 public ModelBinding() {
257 this(null);
258 }
259
260
261
262
263
264
265
266
267
268 public ModelBinding(IMetaschemaData data) {
269 this.__metaschemaData = data;
270 }
271
272 @Override
273 public IMetaschemaData getMetaschemaData() {
274 return __metaschemaData;
275 }
276
277
278
279
280
281
282
283
284
285
286 @NonNull
287 public URI getNamespace() {
288 return _namespace;
289 }
290
291
292
293
294
295
296
297
298
299
300
301 public void setNamespace(@NonNull URI value) {
302 _namespace = value;
303 }
304
305
306
307
308
309
310
311
312
313 @Nullable
314 public Java getJava() {
315 return _java;
316 }
317
318
319
320
321
322
323
324
325
326
327 public void setJava(@Nullable Java value) {
328 _java = value;
329 }
330
331 @Override
332 public String toString() {
333 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
334 }
335
336
337
338
339 @MetaschemaAssembly(
340 formalName = "Java Model Binding",
341 description = "Java-specific binding configuration for a model namespace.",
342 name = "java",
343 moduleClass = MetaschemaBindingsModule.class)
344 public static class Java implements IBoundObject {
345 private final IMetaschemaData __metaschemaData;
346
347
348
349
350 @BoundField(
351 formalName = "Use Package Name",
352 description = "The Java package name to use for classes generated from this namespace.",
353 useName = "use-package-name",
354 typeAdapter = TokenAdapter.class)
355 private String _usePackageName;
356
357
358
359
360
361
362 public Java() {
363 this(null);
364 }
365
366
367
368
369
370
371
372
373
374 public Java(IMetaschemaData data) {
375 this.__metaschemaData = data;
376 }
377
378 @Override
379 public IMetaschemaData getMetaschemaData() {
380 return __metaschemaData;
381 }
382
383
384
385
386
387
388
389
390
391 @Nullable
392 public String getUsePackageName() {
393 return _usePackageName;
394 }
395
396
397
398
399
400
401
402
403
404
405 public void setUsePackageName(@Nullable String value) {
406 _usePackageName = value;
407 }
408
409 @Override
410 public String toString() {
411 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
412 }
413 }
414 }
415
416
417
418
419 @MetaschemaAssembly(
420 formalName = "Metaschema Binding",
421 description = "Defines a binding for a given metaschema identified by a relative URL.",
422 name = "metaschema-binding",
423 moduleClass = MetaschemaBindingsModule.class)
424 public static class MetaschemaBinding implements IBoundObject {
425 private final IMetaschemaData __metaschemaData;
426
427
428
429
430
431 @BoundFlag(
432 formalName = "Href",
433 description = "A URL relative to this binding configuration file, pointing to a metaschema definition.",
434 name = "href",
435 required = true,
436 typeAdapter = UriReferenceAdapter.class)
437 private URI _href;
438
439
440
441
442
443 @BoundAssembly(
444 formalName = "Define Assembly Binding",
445 description = "Provides binding configurations for a given defined assembly within the parent metaschema.",
446 useName = "define-assembly-binding",
447 maxOccurs = -1,
448 groupAs = @GroupAs(name = "define-assembly-bindings", inJson = JsonGroupAsBehavior.LIST))
449 private List<DefineAssemblyBinding> _defineAssemblyBindings;
450
451
452
453
454
455 @BoundAssembly(
456 formalName = "Define Field Binding",
457 description = "Provides binding configurations for a given defined field within the parent metaschema.",
458 useName = "define-field-binding",
459 maxOccurs = -1,
460 groupAs = @GroupAs(name = "define-field-bindings", inJson = JsonGroupAsBehavior.LIST))
461 private List<DefineFieldBinding> _defineFieldBindings;
462
463
464
465
466
467
468 public MetaschemaBinding() {
469 this(null);
470 }
471
472
473
474
475
476
477
478
479
480 public MetaschemaBinding(IMetaschemaData data) {
481 this.__metaschemaData = data;
482 }
483
484 @Override
485 public IMetaschemaData getMetaschemaData() {
486 return __metaschemaData;
487 }
488
489
490
491
492
493
494
495
496
497
498 @NonNull
499 public URI getHref() {
500 return _href;
501 }
502
503
504
505
506
507
508
509
510
511
512
513 public void setHref(@NonNull URI value) {
514 _href = value;
515 }
516
517
518
519
520
521
522
523
524
525
526 @NonNull
527 public List<DefineAssemblyBinding> getDefineAssemblyBindings() {
528 if (_defineAssemblyBindings == null) {
529 _defineAssemblyBindings = new LinkedList<>();
530 }
531 return ObjectUtils.notNull(_defineAssemblyBindings);
532 }
533
534
535
536
537
538
539
540
541
542
543
544 public void setDefineAssemblyBindings(@NonNull List<DefineAssemblyBinding> value) {
545 _defineAssemblyBindings = value;
546 }
547
548
549
550
551
552
553
554
555 public boolean addDefineAssemblyBinding(DefineAssemblyBinding item) {
556 DefineAssemblyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
557 if (_defineAssemblyBindings == null) {
558 _defineAssemblyBindings = new LinkedList<>();
559 }
560 return _defineAssemblyBindings.add(value);
561 }
562
563
564
565
566
567
568
569
570
571 public boolean removeDefineAssemblyBinding(DefineAssemblyBinding item) {
572 DefineAssemblyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
573 return _defineAssemblyBindings != null && _defineAssemblyBindings.remove(value);
574 }
575
576
577
578
579
580
581
582
583
584
585 @NonNull
586 public List<DefineFieldBinding> getDefineFieldBindings() {
587 if (_defineFieldBindings == null) {
588 _defineFieldBindings = new LinkedList<>();
589 }
590 return ObjectUtils.notNull(_defineFieldBindings);
591 }
592
593
594
595
596
597
598
599
600
601
602
603 public void setDefineFieldBindings(@NonNull List<DefineFieldBinding> value) {
604 _defineFieldBindings = value;
605 }
606
607
608
609
610
611
612
613
614 public boolean addDefineFieldBinding(DefineFieldBinding item) {
615 DefineFieldBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
616 if (_defineFieldBindings == null) {
617 _defineFieldBindings = new LinkedList<>();
618 }
619 return _defineFieldBindings.add(value);
620 }
621
622
623
624
625
626
627
628
629
630 public boolean removeDefineFieldBinding(DefineFieldBinding item) {
631 DefineFieldBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
632 return _defineFieldBindings != null && _defineFieldBindings.remove(value);
633 }
634
635 @Override
636 public String toString() {
637 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
638 }
639
640
641
642
643
644 @MetaschemaAssembly(
645 formalName = "Define Assembly Binding",
646 description = "Provides binding configurations for a given defined assembly within the parent metaschema.",
647 name = "define-assembly-binding",
648 moduleClass = MetaschemaBindingsModule.class)
649 public static class DefineAssemblyBinding implements IBoundObject {
650 private final IMetaschemaData __metaschemaData;
651
652
653
654
655 @BoundFlag(
656 formalName = "Name",
657 description = "The name of the metaschema assembly. Used for top-level definitions.",
658 name = "name",
659 typeAdapter = TokenAdapter.class)
660 private String _name;
661
662
663
664
665
666 @BoundFlag(
667 formalName = "Target",
668 description = "A Metapath expression targeting the assembly definition(s) within the metaschema. Used for inline definitions.",
669 name = "target",
670 typeAdapter = StringAdapter.class)
671 private String _target;
672
673
674
675
676 @BoundAssembly(
677 formalName = "Java Object Definition Binding",
678 description = "Field and assembly binding configurations for Java bound classes.",
679 useName = "java")
680 private Java _java;
681
682
683
684
685 @BoundAssembly(
686 formalName = "Property Binding",
687 description = "Provides binding configurations for a property within the parent definition.",
688 useName = "property-binding",
689 maxOccurs = -1,
690 groupAs = @GroupAs(name = "property-bindings", inJson = JsonGroupAsBehavior.LIST))
691 private List<PropertyBinding> _propertyBindings;
692
693
694
695
696 @BoundAssembly(
697 formalName = "Choice Group Binding",
698 description = "Provides binding configuration for a choice group within the parent assembly.",
699 useName = "choice-group-binding",
700 maxOccurs = -1,
701 groupAs = @GroupAs(name = "choice-group-bindings", inJson = JsonGroupAsBehavior.LIST))
702 private List<ChoiceGroupBinding> _choiceGroupBindings;
703
704
705
706
707
708
709 public DefineAssemblyBinding() {
710 this(null);
711 }
712
713
714
715
716
717
718
719
720
721 public DefineAssemblyBinding(IMetaschemaData data) {
722 this.__metaschemaData = data;
723 }
724
725 @Override
726 public IMetaschemaData getMetaschemaData() {
727 return __metaschemaData;
728 }
729
730
731
732
733
734
735
736
737
738 @Nullable
739 public String getName() {
740 return _name;
741 }
742
743
744
745
746
747
748
749
750
751
752 public void setName(@Nullable String value) {
753 _name = value;
754 }
755
756
757
758
759
760
761
762
763
764
765 @Nullable
766 public String getTarget() {
767 return _target;
768 }
769
770
771
772
773
774
775
776
777
778
779
780 public void setTarget(@Nullable String value) {
781 _target = value;
782 }
783
784
785
786
787
788
789
790
791
792 @Nullable
793 public Java getJava() {
794 return _java;
795 }
796
797
798
799
800
801
802
803
804
805
806 public void setJava(@Nullable Java value) {
807 _java = value;
808 }
809
810
811
812
813
814
815
816
817
818 @NonNull
819 public List<PropertyBinding> getPropertyBindings() {
820 if (_propertyBindings == null) {
821 _propertyBindings = new LinkedList<>();
822 }
823 return ObjectUtils.notNull(_propertyBindings);
824 }
825
826
827
828
829
830
831
832
833
834
835 public void setPropertyBindings(@NonNull List<PropertyBinding> value) {
836 _propertyBindings = value;
837 }
838
839
840
841
842
843
844
845
846 public boolean addPropertyBinding(PropertyBinding item) {
847 PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
848 if (_propertyBindings == null) {
849 _propertyBindings = new LinkedList<>();
850 }
851 return _propertyBindings.add(value);
852 }
853
854
855
856
857
858
859
860
861
862 public boolean removePropertyBinding(PropertyBinding item) {
863 PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
864 return _propertyBindings != null && _propertyBindings.remove(value);
865 }
866
867
868
869
870
871
872
873
874
875 @NonNull
876 public List<ChoiceGroupBinding> getChoiceGroupBindings() {
877 if (_choiceGroupBindings == null) {
878 _choiceGroupBindings = new LinkedList<>();
879 }
880 return ObjectUtils.notNull(_choiceGroupBindings);
881 }
882
883
884
885
886
887
888
889
890
891
892 public void setChoiceGroupBindings(@NonNull List<ChoiceGroupBinding> value) {
893 _choiceGroupBindings = value;
894 }
895
896
897
898
899
900
901
902
903 public boolean addChoiceGroupBinding(ChoiceGroupBinding item) {
904 ChoiceGroupBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
905 if (_choiceGroupBindings == null) {
906 _choiceGroupBindings = new LinkedList<>();
907 }
908 return _choiceGroupBindings.add(value);
909 }
910
911
912
913
914
915
916
917
918
919 public boolean removeChoiceGroupBinding(ChoiceGroupBinding item) {
920 ChoiceGroupBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
921 return _choiceGroupBindings != null && _choiceGroupBindings.remove(value);
922 }
923
924 @Override
925 public String toString() {
926 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
927 }
928
929
930
931
932 @MetaschemaAssembly(
933 formalName = "Java Object Definition Binding",
934 description = "Field and assembly binding configurations for Java bound classes.",
935 name = "java",
936 moduleClass = MetaschemaBindingsModule.class)
937 public static class Java implements IBoundObject {
938 private final IMetaschemaData __metaschemaData;
939
940
941
942
943 @BoundField(
944 formalName = "Use Class Name",
945 description = "The Java class name to use for the generated class.",
946 useName = "use-class-name",
947 typeAdapter = TokenAdapter.class)
948 private String _useClassName;
949
950
951
952
953
954 @BoundField(
955 formalName = "Implement Interface",
956 description = "A fully qualified Java interface name that the generated class should implement.",
957 useName = "implement-interface",
958 maxOccurs = -1,
959 groupAs = @GroupAs(name = "implement-interfaces", inJson = JsonGroupAsBehavior.LIST),
960 typeAdapter = TokenAdapter.class)
961 private List<String> _implementInterfaces;
962
963
964
965
966 @BoundField(
967 formalName = "Extend Base Class",
968 description = "A fully qualified Java class name that the generated class should extend.",
969 useName = "extend-base-class",
970 typeAdapter = TokenAdapter.class)
971 private String _extendBaseClass;
972
973
974
975
976 @BoundField(
977 formalName = "Collection Class",
978 description = "A fully qualified Java collection class name to use instead of the default.",
979 useName = "collection-class",
980 typeAdapter = TokenAdapter.class)
981 private String _collectionClass;
982
983
984
985
986
987
988 public Java() {
989 this(null);
990 }
991
992
993
994
995
996
997
998
999
1000 public Java(IMetaschemaData data) {
1001 this.__metaschemaData = data;
1002 }
1003
1004 @Override
1005 public IMetaschemaData getMetaschemaData() {
1006 return __metaschemaData;
1007 }
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017 @Nullable
1018 public String getUseClassName() {
1019 return _useClassName;
1020 }
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031 public void setUseClassName(@Nullable String value) {
1032 _useClassName = value;
1033 }
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044 @NonNull
1045 public List<String> getImplementInterfaces() {
1046 if (_implementInterfaces == null) {
1047 _implementInterfaces = new LinkedList<>();
1048 }
1049 return ObjectUtils.notNull(_implementInterfaces);
1050 }
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062 public void setImplementInterfaces(@NonNull List<String> value) {
1063 _implementInterfaces = value;
1064 }
1065
1066
1067
1068
1069
1070
1071
1072
1073 public boolean addImplementInterface(String item) {
1074 String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1075 if (_implementInterfaces == null) {
1076 _implementInterfaces = new LinkedList<>();
1077 }
1078 return _implementInterfaces.add(value);
1079 }
1080
1081
1082
1083
1084
1085
1086
1087
1088 public boolean removeImplementInterface(String item) {
1089 String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1090 return _implementInterfaces != null && _implementInterfaces.remove(value);
1091 }
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101 @Nullable
1102 public String getExtendBaseClass() {
1103 return _extendBaseClass;
1104 }
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115 public void setExtendBaseClass(@Nullable String value) {
1116 _extendBaseClass = value;
1117 }
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127 @Nullable
1128 public String getCollectionClass() {
1129 return _collectionClass;
1130 }
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141 public void setCollectionClass(@Nullable String value) {
1142 _collectionClass = value;
1143 }
1144
1145 @Override
1146 public String toString() {
1147 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1148 }
1149 }
1150
1151
1152
1153
1154 @MetaschemaAssembly(
1155 formalName = "Property Binding",
1156 description = "Provides binding configurations for a property within the parent definition.",
1157 name = "property-binding",
1158 moduleClass = MetaschemaBindingsModule.class)
1159 public static class PropertyBinding implements IBoundObject {
1160 private final IMetaschemaData __metaschemaData;
1161
1162
1163
1164
1165 @BoundFlag(
1166 formalName = "Name",
1167 description = "The name of the property within the parent definition.",
1168 name = "name",
1169 required = true,
1170 typeAdapter = TokenAdapter.class)
1171 private String _name;
1172
1173
1174
1175
1176 @BoundAssembly(
1177 formalName = "Java Property Binding",
1178 description = "Java-specific binding configuration for a property.",
1179 useName = "java")
1180 private Java _java;
1181
1182
1183
1184
1185
1186
1187 public PropertyBinding() {
1188 this(null);
1189 }
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199 public PropertyBinding(IMetaschemaData data) {
1200 this.__metaschemaData = data;
1201 }
1202
1203 @Override
1204 public IMetaschemaData getMetaschemaData() {
1205 return __metaschemaData;
1206 }
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216 @NonNull
1217 public String getName() {
1218 return _name;
1219 }
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230 public void setName(@NonNull String value) {
1231 _name = value;
1232 }
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242 @Nullable
1243 public Java getJava() {
1244 return _java;
1245 }
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256 public void setJava(@Nullable Java value) {
1257 _java = value;
1258 }
1259
1260 @Override
1261 public String toString() {
1262 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1263 }
1264
1265
1266
1267
1268 @MetaschemaAssembly(
1269 formalName = "Java Property Binding",
1270 description = "Java-specific binding configuration for a property.",
1271 name = "java",
1272 moduleClass = MetaschemaBindingsModule.class)
1273 public static class Java implements IBoundObject {
1274 private final IMetaschemaData __metaschemaData;
1275
1276
1277
1278
1279 @BoundField(
1280 formalName = "Collection Class",
1281 description = "A fully qualified Java collection class name to use instead of the default.",
1282 useName = "collection-class",
1283 typeAdapter = TokenAdapter.class)
1284 private String _collectionClass;
1285
1286
1287
1288
1289
1290
1291 public Java() {
1292 this(null);
1293 }
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303 public Java(IMetaschemaData data) {
1304 this.__metaschemaData = data;
1305 }
1306
1307 @Override
1308 public IMetaschemaData getMetaschemaData() {
1309 return __metaschemaData;
1310 }
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320 @Nullable
1321 public String getCollectionClass() {
1322 return _collectionClass;
1323 }
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334 public void setCollectionClass(@Nullable String value) {
1335 _collectionClass = value;
1336 }
1337
1338 @Override
1339 public String toString() {
1340 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1341 }
1342 }
1343 }
1344
1345
1346
1347
1348 @MetaschemaAssembly(
1349 formalName = "Choice Group Binding",
1350 description = "Provides binding configuration for a choice group within the parent assembly.",
1351 name = "choice-group-binding",
1352 moduleClass = MetaschemaBindingsModule.class)
1353 public static class ChoiceGroupBinding implements IBoundObject {
1354 private final IMetaschemaData __metaschemaData;
1355
1356
1357
1358
1359 @BoundFlag(
1360 formalName = "Name",
1361 description = "The name of the choice group (matches the group-as name in the metaschema).",
1362 name = "name",
1363 required = true,
1364 typeAdapter = TokenAdapter.class)
1365 private String _name;
1366
1367
1368
1369
1370
1371 @BoundField(
1372 formalName = "Item Type",
1373 description = "A fully qualified Java type for collection items. When specified, the generated field and getter will use this type instead of Object.",
1374 useName = "item-type")
1375 private ItemType _itemType;
1376
1377
1378
1379
1380
1381
1382 public ChoiceGroupBinding() {
1383 this(null);
1384 }
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394 public ChoiceGroupBinding(IMetaschemaData data) {
1395 this.__metaschemaData = data;
1396 }
1397
1398 @Override
1399 public IMetaschemaData getMetaschemaData() {
1400 return __metaschemaData;
1401 }
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411 @NonNull
1412 public String getName() {
1413 return _name;
1414 }
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425 public void setName(@NonNull String value) {
1426 _name = value;
1427 }
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438 @Nullable
1439 public ItemType getItemType() {
1440 return _itemType;
1441 }
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453 public void setItemType(@Nullable ItemType value) {
1454 _itemType = value;
1455 }
1456
1457 @Override
1458 public String toString() {
1459 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1460 }
1461
1462
1463
1464
1465
1466 @MetaschemaField(
1467 formalName = "Item Type",
1468 description = "A fully qualified Java type for collection items. When specified, the generated field and getter will use this type instead of Object.",
1469 name = "item-type",
1470 moduleClass = MetaschemaBindingsModule.class)
1471 public static class ItemType implements IBoundObject {
1472 private final IMetaschemaData __metaschemaData;
1473
1474
1475
1476
1477
1478 @BoundFlag(
1479 formalName = "Use Wildcard",
1480 description = "Whether to use a wildcard bounded type (List<? extends Type>). Defaults to true.",
1481 name = "use-wildcard",
1482 defaultValue = "true",
1483 typeAdapter = BooleanAdapter.class)
1484 private Boolean _useWildcard;
1485
1486
1487
1488
1489 @BoundFieldValue(
1490 valueKeyName = "STRVALUE",
1491 typeAdapter = TokenAdapter.class)
1492 private String _value;
1493
1494
1495
1496
1497
1498
1499 public ItemType() {
1500 this(null);
1501 }
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511 public ItemType(IMetaschemaData data) {
1512 this.__metaschemaData = data;
1513 }
1514
1515 @Override
1516 public IMetaschemaData getMetaschemaData() {
1517 return __metaschemaData;
1518 }
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529 @Nullable
1530 public Boolean getUseWildcard() {
1531 return _useWildcard;
1532 }
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544 public void setUseWildcard(@Nullable Boolean value) {
1545 _useWildcard = value;
1546 }
1547
1548
1549
1550
1551
1552
1553 @Nullable
1554 public String getValue() {
1555 return _value;
1556 }
1557
1558
1559
1560
1561
1562
1563
1564 public void setValue(@Nullable String value) {
1565 _value = value;
1566 }
1567
1568 @Override
1569 public String toString() {
1570 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1571 }
1572 }
1573 }
1574 }
1575
1576
1577
1578
1579
1580 @MetaschemaAssembly(
1581 formalName = "Define Field Binding",
1582 description = "Provides binding configurations for a given defined field within the parent metaschema.",
1583 name = "define-field-binding",
1584 moduleClass = MetaschemaBindingsModule.class)
1585 public static class DefineFieldBinding implements IBoundObject {
1586 private final IMetaschemaData __metaschemaData;
1587
1588
1589
1590
1591 @BoundFlag(
1592 formalName = "Name",
1593 description = "The name of the metaschema field. Used for top-level definitions.",
1594 name = "name",
1595 typeAdapter = TokenAdapter.class)
1596 private String _name;
1597
1598
1599
1600
1601
1602 @BoundFlag(
1603 formalName = "Target",
1604 description = "A Metapath expression targeting the field definition(s) within the metaschema. Used for inline definitions.",
1605 name = "target",
1606 typeAdapter = StringAdapter.class)
1607 private String _target;
1608
1609
1610
1611
1612 @BoundAssembly(
1613 formalName = "Java Object Definition Binding",
1614 description = "Field and assembly binding configurations for Java bound classes.",
1615 useName = "java")
1616 private Java _java;
1617
1618
1619
1620
1621 @BoundAssembly(
1622 formalName = "Property Binding",
1623 description = "Provides binding configurations for a property within the parent definition.",
1624 useName = "property-binding",
1625 maxOccurs = -1,
1626 groupAs = @GroupAs(name = "property-bindings", inJson = JsonGroupAsBehavior.LIST))
1627 private List<PropertyBinding> _propertyBindings;
1628
1629
1630
1631
1632
1633
1634 public DefineFieldBinding() {
1635 this(null);
1636 }
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646 public DefineFieldBinding(IMetaschemaData data) {
1647 this.__metaschemaData = data;
1648 }
1649
1650 @Override
1651 public IMetaschemaData getMetaschemaData() {
1652 return __metaschemaData;
1653 }
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663 @Nullable
1664 public String getName() {
1665 return _name;
1666 }
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677 public void setName(@Nullable String value) {
1678 _name = value;
1679 }
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690 @Nullable
1691 public String getTarget() {
1692 return _target;
1693 }
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705 public void setTarget(@Nullable String value) {
1706 _target = value;
1707 }
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717 @Nullable
1718 public Java getJava() {
1719 return _java;
1720 }
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731 public void setJava(@Nullable Java value) {
1732 _java = value;
1733 }
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743 @NonNull
1744 public List<PropertyBinding> getPropertyBindings() {
1745 if (_propertyBindings == null) {
1746 _propertyBindings = new LinkedList<>();
1747 }
1748 return ObjectUtils.notNull(_propertyBindings);
1749 }
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760 public void setPropertyBindings(@NonNull List<PropertyBinding> value) {
1761 _propertyBindings = value;
1762 }
1763
1764
1765
1766
1767
1768
1769
1770
1771 public boolean addPropertyBinding(PropertyBinding item) {
1772 PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
1773 if (_propertyBindings == null) {
1774 _propertyBindings = new LinkedList<>();
1775 }
1776 return _propertyBindings.add(value);
1777 }
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787 public boolean removePropertyBinding(PropertyBinding item) {
1788 PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
1789 return _propertyBindings != null && _propertyBindings.remove(value);
1790 }
1791
1792 @Override
1793 public String toString() {
1794 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1795 }
1796
1797
1798
1799
1800 @MetaschemaAssembly(
1801 formalName = "Java Object Definition Binding",
1802 description = "Field and assembly binding configurations for Java bound classes.",
1803 name = "java",
1804 moduleClass = MetaschemaBindingsModule.class)
1805 public static class Java implements IBoundObject {
1806 private final IMetaschemaData __metaschemaData;
1807
1808
1809
1810
1811 @BoundField(
1812 formalName = "Use Class Name",
1813 description = "The Java class name to use for the generated class.",
1814 useName = "use-class-name",
1815 typeAdapter = TokenAdapter.class)
1816 private String _useClassName;
1817
1818
1819
1820
1821
1822 @BoundField(
1823 formalName = "Implement Interface",
1824 description = "A fully qualified Java interface name that the generated class should implement.",
1825 useName = "implement-interface",
1826 maxOccurs = -1,
1827 groupAs = @GroupAs(name = "implement-interfaces", inJson = JsonGroupAsBehavior.LIST),
1828 typeAdapter = TokenAdapter.class)
1829 private List<String> _implementInterfaces;
1830
1831
1832
1833
1834 @BoundField(
1835 formalName = "Extend Base Class",
1836 description = "A fully qualified Java class name that the generated class should extend.",
1837 useName = "extend-base-class",
1838 typeAdapter = TokenAdapter.class)
1839 private String _extendBaseClass;
1840
1841
1842
1843
1844 @BoundField(
1845 formalName = "Collection Class",
1846 description = "A fully qualified Java collection class name to use instead of the default.",
1847 useName = "collection-class",
1848 typeAdapter = TokenAdapter.class)
1849 private String _collectionClass;
1850
1851
1852
1853
1854
1855
1856 public Java() {
1857 this(null);
1858 }
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868 public Java(IMetaschemaData data) {
1869 this.__metaschemaData = data;
1870 }
1871
1872 @Override
1873 public IMetaschemaData getMetaschemaData() {
1874 return __metaschemaData;
1875 }
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885 @Nullable
1886 public String getUseClassName() {
1887 return _useClassName;
1888 }
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899 public void setUseClassName(@Nullable String value) {
1900 _useClassName = value;
1901 }
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912 @NonNull
1913 public List<String> getImplementInterfaces() {
1914 if (_implementInterfaces == null) {
1915 _implementInterfaces = new LinkedList<>();
1916 }
1917 return ObjectUtils.notNull(_implementInterfaces);
1918 }
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930 public void setImplementInterfaces(@NonNull List<String> value) {
1931 _implementInterfaces = value;
1932 }
1933
1934
1935
1936
1937
1938
1939
1940
1941 public boolean addImplementInterface(String item) {
1942 String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1943 if (_implementInterfaces == null) {
1944 _implementInterfaces = new LinkedList<>();
1945 }
1946 return _implementInterfaces.add(value);
1947 }
1948
1949
1950
1951
1952
1953
1954
1955
1956 public boolean removeImplementInterface(String item) {
1957 String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1958 return _implementInterfaces != null && _implementInterfaces.remove(value);
1959 }
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969 @Nullable
1970 public String getExtendBaseClass() {
1971 return _extendBaseClass;
1972 }
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983 public void setExtendBaseClass(@Nullable String value) {
1984 _extendBaseClass = value;
1985 }
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995 @Nullable
1996 public String getCollectionClass() {
1997 return _collectionClass;
1998 }
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009 public void setCollectionClass(@Nullable String value) {
2010 _collectionClass = value;
2011 }
2012
2013 @Override
2014 public String toString() {
2015 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2016 }
2017 }
2018
2019
2020
2021
2022 @MetaschemaAssembly(
2023 formalName = "Property Binding",
2024 description = "Provides binding configurations for a property within the parent definition.",
2025 name = "property-binding",
2026 moduleClass = MetaschemaBindingsModule.class)
2027 public static class PropertyBinding implements IBoundObject {
2028 private final IMetaschemaData __metaschemaData;
2029
2030
2031
2032
2033 @BoundFlag(
2034 formalName = "Name",
2035 description = "The name of the property within the parent definition.",
2036 name = "name",
2037 required = true,
2038 typeAdapter = TokenAdapter.class)
2039 private String _name;
2040
2041
2042
2043
2044 @BoundAssembly(
2045 formalName = "Java Property Binding",
2046 description = "Java-specific binding configuration for a property.",
2047 useName = "java")
2048 private Java _java;
2049
2050
2051
2052
2053
2054
2055 public PropertyBinding() {
2056 this(null);
2057 }
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067 public PropertyBinding(IMetaschemaData data) {
2068 this.__metaschemaData = data;
2069 }
2070
2071 @Override
2072 public IMetaschemaData getMetaschemaData() {
2073 return __metaschemaData;
2074 }
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084 @NonNull
2085 public String getName() {
2086 return _name;
2087 }
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098 public void setName(@NonNull String value) {
2099 _name = value;
2100 }
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110 @Nullable
2111 public Java getJava() {
2112 return _java;
2113 }
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124 public void setJava(@Nullable Java value) {
2125 _java = value;
2126 }
2127
2128 @Override
2129 public String toString() {
2130 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2131 }
2132
2133
2134
2135
2136 @MetaschemaAssembly(
2137 formalName = "Java Property Binding",
2138 description = "Java-specific binding configuration for a property.",
2139 name = "java",
2140 moduleClass = MetaschemaBindingsModule.class)
2141 public static class Java implements IBoundObject {
2142 private final IMetaschemaData __metaschemaData;
2143
2144
2145
2146
2147 @BoundField(
2148 formalName = "Collection Class",
2149 description = "A fully qualified Java collection class name to use instead of the default.",
2150 useName = "collection-class",
2151 typeAdapter = TokenAdapter.class)
2152 private String _collectionClass;
2153
2154
2155
2156
2157
2158
2159 public Java() {
2160 this(null);
2161 }
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171 public Java(IMetaschemaData data) {
2172 this.__metaschemaData = data;
2173 }
2174
2175 @Override
2176 public IMetaschemaData getMetaschemaData() {
2177 return __metaschemaData;
2178 }
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188 @Nullable
2189 public String getCollectionClass() {
2190 return _collectionClass;
2191 }
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202 public void setCollectionClass(@Nullable String value) {
2203 _collectionClass = value;
2204 }
2205
2206 @Override
2207 public String toString() {
2208 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2209 }
2210 }
2211 }
2212 }
2213 }
2214 }